Skip to main content
gamedev.net
🔒 Locked

Bitwise operation question

Started by Teric 3 replies 250+ views
Original Post
Teric
Teric
I''m trying to figure out the bitwise reverse of a UINT. For example, if I have the number 23, the binary code is 0010111. The bitwise reverse of 23 would be 1101000, or 208. Is there an operator or function that will do this for me? Or do I have do code the thing bit by bit? Thanks in advance!
I am always open to feedback, positive or negative...
I am always open to feedback, positive or negative...
Teric
Teric
That''s great! Thanks for the help.


I am always open to feedback, positive or negative...
I am always open to feedback, positive or negative...
Shannon Barber
Shannon Barber
quote:
Original post by Teric
I''m trying to figure out the bitwise reverse of a UINT.

For example, if I have the number 23, the binary code is 0010111. The bitwise reverse of 23 would be 1101000, or 208.


That would be the bitwise inverse .
1110100 (116) would be the bitwise reverse.

The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.