Binary Number System And Conversion
Digital Electronics
Bridging the Digital Divide
Decimal-to-Binary Conversion
Binary-to-Decimal Conversion
Decimal to Binary Conversion
The Process : Successive Division a) Divide the Decimal Number by 2; the remainder is the LSB of Binary Number . b) If the quotation is zero, the conversion is complete; else repeat step (a) using the quotation as the Decimal Number. The new remainder is the next most significant bit of the Binary Number.
Example: Convert the decimal number 610 into its binary equivalent.
3 2 6 1 2 3 0 2 1 r 0 Least Significan t Bit r 1 r 1 Most Significan t Bit
3
610 = 1102
Dec Binary : Example #1
Example: Convert the decimal number 2610 into its binary equivalent.
Dec Binary : Example #1
Example: Convert the decimal number 2610 into its binary equivalent. Solution:
13 2 26 6 2 13 3 2 6 1 2 3 0 2 1 r 0 LSB r 1 r 0 r 1 r 1 MSB
5
2610 = 110102
Dec Binary : Example #2
Example: Convert the decimal number 4110 into its binary equivalent.
Dec Binary : Example #2
Example: Convert the decimal number 4110 into its binary equivalent. Solution:
20 2 41 r 1 LSB
10 2 20
5 2 10 2 2 5 1 2 2 0 2 1
r 0
r 0 r 1 r 0 r 1 MSB
7
4110 = 1010012
Dec Binary : More Examples
a) 1310 = ?
b) 2210 = ? c) 4310 = ? d) 15810 = ?
8
Dec Binary : More Examples
a) 1310 = ? 1 1 0 1 2
b) 2210 = ? 101102
c) 4310 = ? 1 0 1 0 1 1 2 d) 15810 = ? 100111102
9
Binary to Decimal Process
The Process : Weighted Multiplication a) Multiply each bit of the Binary Number by it corresponding bitweighting factor (i.e. Bit-020=1; Bit-121=2; Bit-222=4; etc). b) Sum up all the products in step (a) to get the Decimal Number. Example: Convert the decimal number 01102 into its decimal equivalent.
0
23
8 0 +
1
22
4 4 +
1
21
2 2 +
0
20
1 0
Bit-Weighting Factors
0110 2 = 6 10
610
10
Binary Dec : Example #1
Example: Convert the binary number 100102 into its decimal equivalent.
11
Binary Dec : Example #1
Example: Convert the binary number 100102 into its decimal equivalent.
Solution:
1
24
16
0
23
8
0
22
4
1
21
2
0
20
1
16
1810
100102 = 1810
12
Binary Dec : Example #2
Example: Convert the binary number 01101012 into its decimal equivalent.
13
Binary Dec : Example #2
Example: Convert the binary number 01101012 into its decimal equivalent.
Solution:
0
26
64
1
25
32
1
24
16
0
23
8
1
22
4
0
21
2
1
20
1
32
16
5310
01101012 = 5310
14
Binary Dec : More Examples
a) 0110 2 = ?
b) 11010 2 = ? c) 0110101 2 = ? d) 11010011 2 = ?
15
Binary Dec : More Examples
a) 0110 2 = ?
b) 11010 2 = ? c) 0110101 2 = ? d) 11010011 2 = ? 6 10 26 10 53 10 211 10
16
Summary & Review
Successive Division
a) Divide the Decimal Number by 2; the remainder is the LSB of Binary Number .
b) If the Quotient Zero, the conversion is complete; else repeat step (a) using the Quotient as the Decimal Number. The new remainder is the next most significant bit of the Binary Number.
Weighted Multiplication
a) Multiply each bit of the Binary Number by it corresponding bit-weighting factor (i.e. Bit-020=1; Bit-121=2; Bit-222=4; etc). b) Sum up all the products in step (a) to get the Decimal Number.
17
Image Resources
Microsoft, Inc. (2008). Clip Art. Retrieved March 15, 2008 from http://office.microsoft.com/en-us/clipart/default.aspx
18