0% found this document useful (0 votes)
98 views10 pages

Convert From Decimal To Binary

This document provides examples of converting between decimal, binary, octal, and hexadecimal number systems. It includes: 1) Converting decimal numbers to binary, octal, and hexadecimal representations. 2) Converting binary numbers to their decimal equivalents. 3) Converting an octal number to decimal. The examples demonstrate how to break down numbers into their place value components and calculate their values in different number bases.

Uploaded by

KEO PHEAKDEY
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
98 views10 pages

Convert From Decimal To Binary

This document provides examples of converting between decimal, binary, octal, and hexadecimal number systems. It includes: 1) Converting decimal numbers to binary, octal, and hexadecimal representations. 2) Converting binary numbers to their decimal equivalents. 3) Converting an octal number to decimal. The examples demonstrate how to break down numbers into their place value components and calculate their values in different number bases.

Uploaded by

KEO PHEAKDEY
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Institute of Technology of Cambodia GEE-B (1) Digital Electronic

1. Convert from Decimal to Binary, Octal, Hexadecimal.


(a). (364.25)_10
(364.25)_10 = (101101100.01)_2
(364.25)_10
364
8 45 4
85 5
0 5
(364)10 = (554)8
0.25 × 8 = 0 2
(0.25)10 = (0.2)8
(364.25)10 = (554.2)8
(364.25)10 =
364
16 22 12
16 1 6
0 1
(364)10 = (16𝐶𝐶)16
0.25 × 16 = 0 4
(0.25)10 = (0.4)16
((364.25)10 = (16𝐶𝐶. 4)16
(364.25)10 = (16𝐶𝐶. 4)16
(b). (1516)10
1516
2 758 0
2 379 0
2 189 1
2 94 0
2 47 0
2 23 1
2 11 1
2 5 1
2 2 1

PAGE 1
Institute of Technology of Cambodia GEE-B (1) Digital Electronic

2 1 0
(1516)10 = (10111101100)2
1516
8 189 4
8 23 5
8 32 7
0 2
(1516)10 = (2745)8
1516
16 94 12
16 5 14
0 5
(1516)10 = (5𝐸𝐸𝐸𝐸)16
(c). (35.75)`10
35
2 17 1
2 8 1
2 4 0
2 4 0
0 1 0
0 1
(35)10 = (100011)2
0.75 × 2 = 0.5 1
0.5 × 2 = 0 1
(0.75)10 = (11)2
(35.75)10 = (100011.11)2
35
8 4 3
0 4
(35)10 = (43)8
0.75 × 8 = 0 6

PAGE 2
Institute of Technology of Cambodia GEE-B (1) Digital Electronic

(0.75)10 = (0.6)8
35.75 = (43.6)
35
16 2 3
0 2
(35)10 = (23)16
0.75 × 16 = 0 12
(0.75)10 = (23. 𝐶𝐶)16
(d). (798)10
798
2 399 0
2 199 1
2 99 1
2 49 1
2 24 1
2 12 0
2 6 0
2 3 0
2 1 1
0 1
(798)10 = (1100011100)2
798
8 99 7
8 12 3
8 1 4
0 1
(798)10 = (1437)8
798
16 49 14
16 3 1
0 3

PAGE 3
Institute of Technology of Cambodia GEE-B (1) Digital Electronic

(798)10 = (31𝐸𝐸)16
(e). (94.125)10

(34.125)10 =

94

2 47 1

2 23 1

2 11 1

2 5 1

2 2 1

2 1 0

0 1
(94)10 = (1001111)2

0.125 × 2 = 0.25 0

0.25 × 2 = 0.5 0

0.5 × 2 = 0 1

(0.125)10 = (0.001)2

94

8 13 0

8 1 5

0 1

(94)10 = (150)8

0.125 × 8 = 0 1

(0.125)10 = (0.1)8

PAGE 4
Institute of Technology of Cambodia GEE-B (1) Digital Electronic

(94.125)10 = (150.1)8

34

16 5 14

0 5

(94)10 = (5𝐸𝐸)16

(0.125)10 =

0.125 × 16 = 0 2

(0.125)10 = (0.2)16

(94.125)10 = (5𝐸𝐸. 2)16

2. Convert from Binary to decimal.


(a). (10110101)2
(101101.01)2 = 20 + 0 × 21 + 1 × 22 + 1 × 23 + 0 × 24 + 1 × 25
= 1 + 4 + 8 + 32 = 45
(0.01)2 = 0 × 2−1 + 1 × 2−2 = 0.25
(101101.01)2 = (45.025)10
(b). (110110011111)2
(110110011111)2 = 1 × 20 + 1 × 21 + 0 × 22 + 1 × 23 + 1 × 24 + 0 × 25
+0 × 26 + 1 × 27 + 1 × 28 + 0 × 29 + 1 × 1010 + 1 × 1011
= 1 + 2 + 4 + 8 + 16 + 128 + 256 + 1024 = 2048
= 3487
(110110011111)2 = (3487)10
(c). (1101001010)2
(1101001010.11)2 = 0 × 20 + 1 × 21 + 0 × 22 + 1 × 23 + 0 × 24 + 0 × 25 + 1 × 26
+0 × 27 + 1 × 28 + 1 × 29
= 2 + 8 + 64 + 256 + 512
= 842
(0.11)2 = 1 × 2−1 + 1 × 2−2 = 0.75

PAGE 5
Institute of Technology of Cambodia GEE-B (1) Digital Electronic

(1101001010.11)2 = (842.75)10
(d). (10001010.11)2
(100010)2 = 0 × 20 + 1 × 21 + 0 × 22 + 0 × 23 + 0 × 24 + 1 × 25
= 2 + 32 = 40
(0.001)2 = 0 × 2−1 + 0 × 2−2 + 1 × 23 = 0.125
(100010.001)2 = (40.125)10
(e). (1111111010010)2
(11111111010010)2 = 0 × 20 + 1 × 21 + 0 × 22 + 0 × 23 +× 1 × 24 + 0 × 25
+1 × 26 + 1 × 27 + 1 × 28 + 1 × 29 + 1 × 210 + 1 × 211
+1 × 212
= 2 + 16 + 64 + 128 + 256 + 512 + 1024 + 2048 + 4086
= 8146
(1111111010010)2 = (8146)10

3. Convert from octal Octal to decimal


(a). (10742.24)8
(10742)8 = 2 × 80 + 4 × 81 +× 7 × 82 + 0 × 83 + 1 × 84
= 2 + 32 + 448 + 4096 = 4578
(0.24)8 = 2 × 8−1 + 4 × 8−2 = 0.25 + 0.0625 = 0. .3125
(10742.24)8 = (4578.3125)10
(b). (5351.62)8
(5351)8 = 1 × 80 + 5 × 81 + 3 × 82 + 5 × 83
= 1 + 40 + 192 + 2560 = 2793
(0.62)8 = 6 × 8−1 + 2 × 8−2 = 0.75 + 0.03125 = 0.78125
(5351.62)8 = (2793.78125)10
(c). (56.35)8
(56)8 = 6 × 80 + 5 × 81 = 6 + 40 = 46
(0.35)8 = 3 × 8−1 + 5 × 8−2 = 0.375 + 0.078125 = 0.4531125
(56.35)8 = (46.458125)10
(d). (452.76)8

PAGE 6
Institute of Technology of Cambodia GEE-B (1) Digital Electronic

(452)8 = 2 × 80 + 5 × 82 + 4 × 82
= 2 + 40 + 256 = 298
(0.76)8 = 7 × 8−1 + 6 × 8−2 = 0.875 + 0.09375 = 0.96875
(452.76)8 = (296.96875)10
(e). (1015475)8
(1015475)8 = 5 × 80 + 7 × 81 + 4 × 82 + 5 × 83 + 5 × 84 + 0 × 85 + 1 × 86
= 5 + 56 + 256 + 2560 + 4096 + 262144
= 269.117
(1015475)8 = (269117)10
4. Convert from Hexadecimal to Decimal
(a). (1217. 𝐶𝐶)16
(1217)16 = 7 × 160 + 1 × 161 + 2 × 162 + 1 × 163
= 7 + 16 + 512 + 4096 = 4691
(0. 𝐶𝐶) = 12 × 16−1 = 0.75
(1217. 𝐶𝐶)16 = (4631.75)10

(b).(𝐵𝐵09𝐷𝐷4)16
(𝐵𝐵09𝐷𝐷4)16 = 4 × 160 + 13 × 161 + 9 × 162 + 0 × 163 +× 11 × 164
4 + 208 + 2304 + 720896 = 723412
(𝐵𝐵09𝐷𝐷4)16 = (723412)10
(c). (17586)16
(17586)16 = 6 × 160 + 8 × 161 + 5 × 162 + 10 × 163
= 6 + 128 + 1280 + 40960 = 42374
(𝐴𝐴586)16 = (42374)10
(d). (590.4)16
(590)16 = 0 × 160 + 9 × 161 + 5 × 162
= 144 + 1280 = 1424
(0.4)16 = 4 × 16−1 = 0.25
(590.4)16 = (1424.25)10
(e). (1𝐷𝐷0𝐵𝐵. 2)16
(1𝐷𝐷0𝐵𝐵. 2) = 11 × 160 + 0 × 161 + 13 × 1612 + 1 × 163

PAGE 7
Institute of Technology of Cambodia GEE-B (1) Digital Electronic

= 11 + 3328 + 4096 = 7435


(0.2)16 = 2 × 16−1 = 0.125
(1𝐷𝐷0𝐵𝐵. 2)16 = (7435.125)10
5. Add and multiply the following numbers without converting them to decimal
(a). (1011)2 𝑎𝑎𝑎𝑎𝑎𝑎 (101)2
1011 + 101 = (10000)2
(1011) × (101) = (110111)2
(b). (110)2 𝑎𝑎𝑎𝑎𝑎𝑎 (100)2
(110)2 + (100)2 = (1010)2
110 × 100 = 10000
(c). (215)16 𝑎𝑎𝑎𝑎𝑎𝑎 (5𝐴𝐴)16
215 + 5𝐴𝐴 = 26𝐹𝐹
215 × 5𝐴𝐴 = 𝐵𝐵𝐵𝐵52
(d). (2𝐸𝐸)16 𝑎𝑎𝑎𝑎𝑎𝑎 (34)16
2𝐸𝐸 + 34 = (62)16
(2𝐸𝐸) × (34) = 958
6. Obtain the 1’s and 2’s complements of the following binary numbers:
(a). 00010000 → 11101111
11101111 + 1 = 11110000
(b). 00000000 → 11111111
11111111 + 1 = 100000000
(c). 11011010 → 00100101
00100101 + 1 = 00100110
(d). 10101010 → 01010101
01010101 + 1 = 01010110
7. Represent the decimal number 6,248 in
(a). 𝐵𝐵𝐵𝐵𝐵𝐵
𝐵𝐵𝐵𝐵𝐵𝐵 = 011000 100100 1000
(b). 6248
1001 0101 0111 1011
(c). 6248 in 2421 code

PAGE 8
Institute of Technology of Cambodia GEE-B (1) Digital Electronic

2421 = 110 0010 0100 1110


(d). 𝑎𝑎 6311 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐
6311 = 1000 0011 0001 0001
+ (137)10 + (86)10
00137 + 00086 = 00223
+(−137)10 + (−86)10
9’s complement (157)10
99999-00137=99862
10’s complement (137)10
=99862+1=99863=(−137)10
9’s complement (86)10
99999-00086=99914
10’s complement
99913+1=99915=(-86)
→ (−137)10 + (−86)10
=99863+99914=99777
8. The following decimal numbers are shown in sign‐magnitude form: +9,286 and +801.
Convert them to signed-10’s‐complement form and perform the following operations:
(a). (+9386)+(+801)
09286 + 00801 = 10087
(b). (+9286)10 + (801)10
00801
9’s complement
99999-00801=99198
10’s complement 99198
99198+1=99199
=> 09286

99199

08485

9. Decode the following ASCII code:

PAGE 9
Institute of Technology of Cambodia GEE-B (1) Digital Electronic

101001 → 𝑆𝑆
1110100 → 𝑡𝑡
111010 → 𝑒𝑒
1110110 → 𝑣𝑣
1100101 → 𝑒𝑒
0100000 → 𝑠𝑠𝑠𝑠
1001010 → 𝐽𝐽
1101111 → 𝑜𝑜
1100010 → 𝑏𝑏
1110011 → 𝑠𝑠

PAGE 10

You might also like