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?
Answer:
negative numbers are expressed in the complement form of the original code.
the positive and negative numbers add up to 0, overflow the highest bit, exactly equal to 0.
the complement is a positive number to take the inverse plus one.
How is 2.-128 stored in memory? Extrapolation Process
Answer:
-the result of the 1282 binary is 10000000 (according to the 8-bit calculation), as in the original code.
The 1272 binary result is 0111 1111 (according to the 8-bit calculation), take the inverse plus one-127 is 1000 0001 and then minus one to -128 0000
3. If the byte is represented as 11111111, what is its true data?
Answer:
11111111 of the original code is 0000 0001, so 11111111 of the real data is-1.
minus an inverse or take the reverse plus one to draw source 0000 0001 So the real data is -1
4. Do positive and negative numbers support the complement approach?
Answer:
all support
5. Is the positive number minus one negation?
Answer:
it is. Verification.
two ways can be reduced by a reverse or take the reverse plus a
This article is from the "Jobs" blog, so be sure to keep this source http://10718270.blog.51cto.com/10708270/1769352
It 18 Palm Job _java Foundation second day _ binary conversion principle and complement storage method