Representation of Numbers
Representation of Numbers
Page 2
Number Systems
• Number systems are the technique to represent numbers in the
computer system architecture, every value that you are saving or
getting into/from computer memory has a defined number system
BASE 2
1 1
101 101 101
(+) 101 (+) 101 (+) 101
0 10 1010
3. 1 0 1 0 1 10101
(+) 1 1 0 1 1 (+) 1 1 0 1 1
110000
0 - 0 = 0
0 - 1 = 1 (Borrow 1 from the next high order digit)
1 - 0 = 1
1 - 1 = 10
1
11010 11010 11010
(+) 10110 (+) 10110 (+) 10110
0 00 00100
3. 0 0 1 1 0 1 0 0011010
(-) 0 0 1 1 0 0 (-) 0 0 1 1 0 0
0001110
174 ÷ 2 87 0 (LSB)
87 ÷ 2 43 1
Bottom to Top
43 ÷ 2 21 1
Answer:
21 ÷ 2 10 1
10 ÷ 2 5 0 101011102
5÷ 2 2 1
2÷ 2 1 0
1÷ 2 0 1 (MSB)
156 ÷ 2 78 0 (LSB)
78 ÷ 2 39 0
Bottom to Top
39 ÷ 2 19 1
Answer:
19 ÷ 2 9 1
9 ÷ 2 4 1 100111002
4 ÷ 2 2 0
2 ÷ 2 1 0
1 ÷ 2 0 1 (MSB)
Hexadecimal 5 5 0101
Number System
6 6 0110
7 7 0111
8 8 1000
9 9 1001
A 10 1010
B 11 1011
C 12 1100
D 13 1101
E 14 1110
F 15 1111
21 November 2022 Page 23
Hexadecimal Number System
Method 1: Convert Hexadecimal to Binary with Conversion Table
Example: Convert hexadecimal (67F)16 to binary.
Answer:
(7) 10 = (0111)2
(F) 10 = (1111)2 (67F)16 = 0110011111112
BOTTOM TO TOP
59 ÷ 2 = 29 1
29 ÷ 2 = 14 1
Answer:
14 ÷ 2 = 7 0
7 ÷ 2 = 3 1 (76F)16 = 11101102
3 ÷ 2 = 1 1
1 ÷ 2 = 1
LEFT TO RIGTH
(121)8 = 1 x 82 + 2 x 81 + 1 x 80
= 1 x 64 + 2 x 8 + 1 x 1
= 64 + 16 + 1
Answer:
(121)8 = 8110
12.5
To get exact remainder, we need to multiply 0.5x 8
12 ÷ 8 = 1 1
1.5
To get exact remainder, we need to multiply 0.5x 8
0.1
To get exact remainder, we need to multiply 0.1x 8
29 ÷ 8 = 0 1 (100)10 = 1448
21 November 2022 Page 33
Octal Number System
Example: Convert decimal number (321)10 to its octal number.
BOTTOM TO TOP
321 ÷ 8 = 40 1
Answer:
40 ÷ 8 = 5 0
5 ÷ 8 = 0 5 (100)10 = 5018
(2322)8 = 2 x 83 + 3 x 82 + 2 x 81 + 2 x 80
= 2 x 512 + 3 x 64 + 2 x 8 + 2 x 1
= 1024 + 192 + 16 + 2
Answer:
(2322)8 = 123410
= 10101111002
= 001 010 111 1002
= 1 2 7 4
Answer:
(1010111100)2 = 12748
92 ÷ 8 = 11 4
Answer:
11 ÷ 8 = 1 3
1 ÷ 8 = 0 1 (192)10 = 1348