issues
search
yozyyyqls
/
leetcode-notebook
Slowly constructing my leetcode notes...
0
stars
0
forks
source link
计算机基础知识
#5
Open
yozyyyqls
opened
1 year ago
yozyyyqls
commented
1 year ago
How do modern computers represent negative numbers
Integer Values
Sign-Magnitude
: The leftmost bit is dedicated to representing the sign of the value ( 1 for positive, 0 for negative).
One's-Complement
: All bits of the value are inverted to represent the negative value.
Two's-Complement
: All the bits are inverted and then a 1 is added.
reference
How do modern computers represent negative numbers
Integer Values
reference