|
-
Dec 15th, 2012, 02:30 PM
#1
Thread Starter
Member
[RESOLVED] Inverting Bits
Hi,
I am trying to find a way to invert the lower 4 bits of a byte. For example, I need to convert:
0x64 (0110 0100) to 0x6B (0110 1011)
I can do it with what I think is an unreasonable amount of code. Lots of if statements and a loop.
Is there an easier way using bitwise operators?
Thanks
Sonny
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|