11/22/2019 9:19 AM | |
Joined: 9/16/2013 Last visit: 1/5/2024 Posts: 511 Rating: (106) |
Hello Dongerpure, Just like with the normal data types or just like in the real world is the case with the money. IN a case you have 10$ and 10€, and you want to do a SUM, well you convert $ -> € or vice versa, after that you do SUM. In your example: 3488+P#2.0=3490 Let's convert all to the same currency : binary for an example: //---------------------------------------------------------------------- focus on this part: 0000 1101 1010 0000 Now separate this even more: Byte address:0000 1101 1010 0 (dec 436) Bit address: 000 (dec 0 ) //------------------------------------------------------------------------- //---------------------------------------------------------------------- focus on this part: 0000 0000 0001 0000 Now separate this even more: Byte address:0000 0000 0001 0 (dec 2) Bit address: 000 (dec 0 ) //------------------------------------------------------------------------- Now = 3488+P#2.0 = 0000 1101 1010 0000 + 0000 0000 0001 0000 = 3504 = 0000 1101 1011 0000. Now let's separate Byte address:1101 1011 0 (dec 438) Bit address: 000 (dec 0 ) So you moved 2 bytes inside opened Data blocks. Always when you work with Pointers in STL pay attention on this: Format of the Parameter Type POINTER Best Regards Soble |
Last edited by: SOble at: 11/22/2019 09:20:37Website: |
|
This contribution was helpful to2 thankful Users |
11/22/2019 9:41 AM | |
Joined: 3/8/2011 Last visit: 5/17/2023 Posts: 262 Rating: (21) |
hello soble Thank you very much for such a brief explaination Could you please clarify how we get this Now separate this even more: Byte address:0000 1101 1010 0 (dec 436) ?? Bit address: 000 (dec 0 )
|
If this post helped you, you may use the Rate-button |
|
Follow us on