G
George Cherry
How do I display the bit pattern of a negative
int (i.e., the TWO's COMPLEMENT binary form)?
Integer.toString(n, 2) doesn't print out the
2's complement form of a negative int. I
don't want to concoct it for my students:
I want to display what's there. I wonder why
Integer.toString(n, 2) changes the form of
negative numbers.
George
int (i.e., the TWO's COMPLEMENT binary form)?
Integer.toString(n, 2) doesn't print out the
2's complement form of a negative int. I
don't want to concoct it for my students:
I want to display what's there. I wonder why
Integer.toString(n, 2) changes the form of
negative numbers.
George