(3)Signed binary numbers
A “signed binary number system” is a method of expression for handling binary numbers with negative values. In this method, the first bit is
treated as a “signed bit,” which acts as a symbol that separates positive
and negative values. If the first bit is “0,” it indicates a positive number. If
the first bit is “1,” it indicates a negative number.
Reference
MSB
An “MSB” is the leftmost bit of a binary
number.
Abbreviation for “Most Significant Bit.”
Reference
The range of values which can be expressed by a particular number of bits
is shown below.
Signed bit
An 8-bit unsigned binary number (standard binary number) can express a
value ranging from “0” to “255.” A signed binary number, however, only
uses seven digits to represent values since its first bit is used as a signed
bit. For this reason, an 8-bit signed binary number can, at most, express a
value ranging from “−128” to “127.”
Two typical kinds of signed binary numbers are summarized below.
●One’s complement
A “one’s complement” reverses bits signifying a positive value in order
to express a negative value.
When the value is “−3”
① Determine the bits used for positive “3”
② Reverse the bits
00000011
11111100 ······ One’s complement
Number Unsigned bi- Signed binary
of bits nary number number
4
0~15
−8~7
8
0~255
−128~127
12
0~4095
−2048~2047
16
0~65535
−32768~32767
32
0~
−2147483648~
4294967295 2147483647
Basic theory
“0” represents a positive number. “1” signifies a negative number.
Chapter 7
Expressible value range
Reference
Complement
A “complement” is a value that carries
over one digit when it is added to another number.
●Two’s complement
A “two’s complement” adds “1” to a one’s complement to express a negative value.
When the value is “−3”
the one’s complement
② Add “1” to the one’s complement
① Determine
11111100
+
1
11111101 ·····Two’s complement
160