- Joined
- Mar 13, 2008
- Messages
- 38
- Reaction score
- 2
Hi, how are you? i need help to convert a data type BYTE to binary and modify binary; or modify BYTE
for example I have:
I want change the 4(four to A) and the 0(zero to 8)
So when finish I must have: converted: 0xA8
Do you have some idea?
for example I have:
BYTE convert=0x40
I want change the 4(four to A) and the 0(zero to 8)
So when finish I must have: converted: 0xA8
My idea:
Convert(40 Hex, 64 decimal, to binary: 01000000
take the first 4 bits(0100) and change for: 1010
take the last 4 bits(0000) and change for: 1000
So the modified byte is: 10101000 converted to hex: A8
Do you have some idea?
Last edited: