Hi Jeremy.

Maybe your problem is the long type size: it has 64 bits, not
only the 32 bits you are using. If you change your program to:

n = 0xf0f0f0f0L;

You'll get the expected result. When you don't do it, higher
bits are set to 1 and the output seems wrong (only seems).

Try using:

System.out.println(Long.toBinaryString(n>>x));

instead of calling dprint.

Hope this helps.

-- Cassino

Reply via email to