1. What is the representation of negative numbers and why is it so designed?
How is 2.-128 stored in memory? The calculation process?
3. If the byte represents no 11111111, what is its true data?
4. Do positive and negative numbers support the complement approach?
5. Is the positive number minus one negation?
----------------------------------------------------------
1. What is the representation of negative numbers and why is it so designed?
Negative numbers are expressed in the complement form of the original code.
Positive negative numbers add up to 0
How is 2.-128 stored in memory? Extrapolation process
126 01111110
127 01111111
-126 10000010
-127 10000001
The law is negative minus 1, reasoning
-128 10000000
3. If the byte is represented as 11111111, what is its true data?
11111111 take reverse +1 0000 0001
is +1 of the original code, so the real data is-1
4. Do positive and negative numbers support the complement approach?
All support
+5 Source Code 00000101
Take the inverse +1 11111011 yes-5
Take the inverse +1 00000101 is +5
5. Is the positive number minus one negation?
Is
-1 of the complement is 1111 1111,
Minus one 1111 1110.
Take 0000 0001.
+1 of the source code
Java The second day _ binary conversion principle and complement storage method