Number Base Conversion (Lec3)
Number Base Conversion (Lec3)
(3)
1
Digital logic circuit design Lec. (3)
8 1000 10 8
9 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F
2
Digital logic circuit design Lec. (3)
3
Digital logic circuit design Lec. (3)
4
Digital logic circuit design Lec. (3)
5
Digital logic circuit design Lec. (3)
6
Digital logic circuit design Lec. (3)
Divide 37 by 2 18
2 37 R
36
1 1 (LSB)
Divide 18 by 2 9
2 18
18
0 0 Q R
Divide 9 by 2 4
2 37 1 (LSB)
2 9
2 18 0
8
1 1 2 9 1
Divide 4 by 2 2 ≡ 2 4 0
2 4
2 2 0
4
2 1 1 (MSB)
0 0
Divide 2 by 2 1 0
2 2
2 Note: Q; Quotient.
0 0 R; Remainder.
Divide 1 by 2 0
2 1
7
Digital logic circuit design Lec. (3)
8 214
208
6 6 LSB
Divide 26 by 8 3
Q R
8 26
8 214 6 (LSB)
24
2 2 ≡ 8 26 2
8 3 3 (MSB)
Divide 3 by 8 0
0
8 3
3 3 MSB
Octal equivalent=(326)8
Ex. (15) Convert decimal number (3509) to its hexadecimal
equivalent?
Sol. Here; (r) is (16)
Divide 3509 by 16 219 R
16 3509
3504
5 5 LSB
Divide 219 by 16 13
16 219
208
8
Digital logic circuit design Lec. (3)
Q R
11 B
16 13 ≡ 16 219 11(B)
0
16 13 13(D)(LSB)
13 D MSB
0
Hexadecimal equivalent=(DB5)16
4 54
52
2 2 LSB
Divide 13 by 4 3
Q R
4 13
4 54 2 (LSB)
12
1 1 ≡ 4 13 1
Divide 3 by 4 0 4 3 3 (MSB)
4 3
0 0
3 3 MSB
Radix 4 equivalent=(312)4
9
Digital logic circuit design Lec. (3)
10
Digital logic circuit design Lec. (3)
In this case; 0.8 is repeated and if new multiply further, we will get
repeated sequence. If we stop here, we get 7 binary digits, 1111001. This
answer is approximate answer. To get more accurate answer we have to
continue multiplying by 2 until we have as many digits as necessary for
our application.
Binary fraction =0. 1111001, witch is equivalent to 0.8125 decimal.
11
Digital logic circuit design Lec. (3)
Divide 24 by 2 12 R
2 24
24
0 0 LSB
Q R
2 24 0 (LSB)
2 12 0
12
Digital logic circuit design Lec. (3)
Divide 12 by 2 6
2 6 0
2 12
12 2 3 1
2 1 1 (MSB)
0 0 ≡
Divide 6 by 2 3 0
2 6
0 0
Divide 3 by 3 1
2 3
1 1
Divide 1 by 2 0
2 1
1 1 MSB
13
Digital logic circuit design Lec. (3)
Divide 35 by 8 4 R
8 35
32
3 3 LSB Q R
Divide 12 by 2 0
8 35 3 (LSB)
8 4 ≡
8 4 4 (MSB)
0 0
4 4 MSB
14
Digital logic circuit design Lec. (3)
16 22
16
6 6 LSB Q R
Divide 12 by 2 0 16 22 6 (LSB)
16 1 ≡ 16 1 1 (MSB)
0
0
1 1 MSB
15
Digital logic circuit design Lec. (3)
16