Docsity

Decimal to Binary, Exams of Elementary Mathematics

Toggle sidebar
bg1
Page | 1
EET121
Schoelen
RevB: corrected section in octal, 12-28-2015
RevC: Added a base-5 example to demonstrate that we can have number systems of any base, 01-14-2016
Number System Conversion
Binary to Decimal
Convert: 11110001b to decimal
Method: Positional value
27 26 25 24 23 22 21 20
1
1
1
1
0
0
0
1
(1*27) +(1*26) +(1*25) +(1*24) +(0*23) +(0*22) +(0*21) +(1*20)
11110001b = (1*27)+(1*26)+(1*25)+(1*24)+(0*23)+(0*22)+(0*21)+(1*20) d
11110001b = 128 + 64 + 32 + 16 + 0 + 0 + 0 + 1 d
11110001b = 241d
Decimal to Binary
Convert: 241d to binary
Method: Repeated division by 2
Decimal Operation Quotient Remainder Result
241 ÷ 2 120 1 -----------------> 1
120 ÷ 2 60 0 ----------------> 01
60 ÷ 2 30 0 ---------------> 001
30 ÷ 2 15 0 --------------> 0001
15 ÷ 2 7 1 -------------> 10001
7 ÷ 2 3 1 ------------> 110001
3 ÷ 2 1 1 -----------> 1110001
1 ÷ 2 0 1 ----------> 11110001b
Therefore: 241d = 11110001b
Hex to Decimal
Convert: 3FEh to decimal
Method: Positional value
162 161 160
3
F
E
3FEh = (3*162) + (15*161) + (14*160) d
3FEh = 3*256 + 15*16 + 14*1 d
3FEh = 768 + 240 + 14 d
3FEh = 1022d
pf3
pf4
pf5

Partial preview of the text

Download Decimal to Binary and more Exams Elementary Mathematics in PDF only on Docsity!

EET Schoelen RevB: corrected section in octal, 12-28- RevC: Added a base-5 example to demonstrate that we can have number systems of any base, 01-14-

Number System Conversion

Binary to Decimal

Convert: 11110001b to decimal Method: Positional value

27 26 25 24 23 22 21 20 1 1 1 1 0 0 0 1 (12^7 ) +(12^6 ) +(12^5 ) +(12^4 ) +(02^3 ) +(02^2 ) +(02^1 ) +(12^0 )

11110001b = (12^7 )+(12^6 )+(12^5 )+(12^4 )+(02^3 )+(02^2 )+(02^1 )+(12^0 ) d 11110001b = 128 + 64 + 32 + 16 + 0 + 0 + 0 + 1 d 11110001b = 241d

Decimal to Binary

Convert: 241d to binary Method: Repeated division by 2

Decimal Operation Quotient Remainder Result 241 ÷ 2 120 1 -----------------> 1 120 ÷ 2 60 0 ----------------> 0 1 60 ÷ 2 30 0 ---------------> 0 01 30 ÷ 2 15 0 --------------> 0 001 15 ÷ 2 7 1 -------------> 1 0001 7 ÷ 2 3 1 ------------> 1 10001 3 ÷ 2 1 1 -----------> 1 110001 1 ÷ 2 0 1 ----------> 1 1110001b

Therefore: 241d = 11110001b

Hex to Decimal

Convert: 3FEh to decimal Method: Positional value

162 161 160 3 F E

3FEh = (316^2 ) + (1516^1 ) + (1416^0 ) d 3FEh = 3256 + 1516 + 141 d 3FEh = 768 + 240 + 14 d 3FEh = 1022d

Decimal to Hex

Convert: 1022d to hex Method: Repeated division by 16 Remember that: 10d = Ah 11d = Bh 12d = Ch 13d = Dh 14d = Eh 15d = Fh

Decimal Operation Quotient Remainder Result 1022 ÷ 16 63d 14d ---------------> E h 63 ÷ 16 3d 15d --------------> F Eh 3 ÷ 16 0d 3d -------------> 3 FEh

1022d = 3FEh

Binary to Hex

Method: Lookup Table Convert: 1011101111110010111b to hex

  1. Separate into groups of four bits, starting from the right

101,1101,1111,1001,0111 to hex

  1. Convert the binary number grouping to hex using lookup table Remember that: 0000b = 0h 0100b = 4h 1000b = 8h 1100b = Ch 0001b = 1h 0101b = 5h 1001b = 9h 1101b = Dh 0010b = 2h 0110b = 6h 1010b = Ah 1110b = Eh 0011b = 3h 0111b = 7h 1011b = Bh 1111b = Fh

5 D F 9 7 101,1101,1111,1001,

1011101111110010111b = 5DF97h

Hex to Binary

Method: Lookup Table Convert: F01D8h

  1. Separate into groups of one digit F 0 1 D 8

Octal to Hex

Method: Lookup Table

  1. Convert Octal to Binary
  2. Convert Binary to Hex

Hex to Octal

Method: Lookup Table

  1. Convert Hex to Binary
  2. Convert Binary to Octal

Octal to Decimal

Method: Positional value Convert: 3572o

3572o = (38^3 ) + (58^2 ) + (78^1 ) + (28^0 ) d 3572o = (1536) + (320) + (56) + (2) d 3572o = 1914d

Decimal to Octal

Convert: 710d to octal Method: Repeated division by 8

Decimal Operation Quotient Remainder Result 720 ÷ 8 88d 6d ----------------> 6 o 88 ÷ 8 11d 0d ---------------> 0 6o 11 ÷ 8 1d 3d -------------> 3 06o 1 ÷ 8 0d 1d ------------> 1 306o

710d = 1306o

Base-5 (new added 01/14/2016)

http://www.unitconversion.org/numbers/base-10-to-base-5-

conversion.html

Base-5 Counting:

0 1 2 3 4 <- you only get five symbols, 0->

Base-5 to Decimal

Convert: 104 base-5 to decimal Method: Positional value

52 51 50 1 0 4

= (15^2 ) + (05^1 ) + (45^0 ) d = 125 + 05 + 41 d = 25 + 0 + 4 d 105 base-5 = 29d

Decimal to Base-

Convert: 720d to Base- Method: Repeated division by 5

Decimal Operation Quotient Remainder Result 720 ÷ 5 144d 0d ----------------> 0 base- 144 ÷ 5 28d 4d ---------------> 40 base- 28 ÷ 5 5d 3d -------------> 340 base- 5 ÷ 5 1d 0d ------------> 0340 base- 1 ÷ 5 0d 1d ------------>10340 base-

720d = 10340 base-