Lab 2. Binary Integer Representation. Normal Values
Lab 2. Binary Integer Representation. Normal Values
Lab 2. Binary Integer Representation. Normal Values
N bn 1 ...b1b0 bi 2 i
(1)
i 0
A 0, a1 a 2 ...a n 1 a n ai 2 i
(2)
i 1
(3)
7
111
0111
6
110
0110
5
101
0101
4
100
0100
3
011
0011
2
010
0010
1
001
0001
0
000
0000
-0
1000
-1
1001
-2
1010
-3
1011
-4
1100
-5
1101
-6
1110
-7
1111
-8
1s
2s
Binary offset
complement
complement
(BO)
(1s C)
(2s C)
0111
1111
0111
0110
1110
0110
0101
1101
0101
0100
1100
0100
0011
1011
0011
0010
1010
0010
0001
1001
0001
0000
1000
0000
1111
1110
0111
1111
1101
0110
1110
1100
0101
1101
1011
0100
1100
1010
0011
1011
1001
0010
1010
1000
0001
1001
0000
1000