reverse all the bits in a unsigned integer

H

hijkl

.. How to reverse all the bits in a unsigned integer? an signed
integer (you have to keep the sign of the integer)?
 
A

Alf P. Steinbach

* hijkl:
. How to reverse all the bits in a unsigned integer? an signed
integer (you have to keep the sign of the integer)?

Check out the FAQ's solutions to homework problems.
 
H

hijkl

* hijkl:


Check out the FAQ's solutions to homework problems.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?

Hi Alf,
what is that?? i didnt get you :)
 
J

Jim Langston

hijkl said:
Hi Alf,
what is that?? i didnt get you :)

Alf is saying we won't do your homework for you. However, I will point you
in the right direction. If you want to reverse the bits, look at xor
(exclusive or).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top