Number System
Number System
conversions
1
10 4 103 10 2 101 100 10 10 2 10 3 10 4 105
Decimal Number System
• The decimal number system is a positional
number system.
• Example:
5 6 2 1 1 X 100 = 1
103 102 101 100 2 X 101 = 20
6 X 102 = 600
5 X 103 = 5000
Binary Number System
• The binary number system is also a positional
numbering system.
24 23 22 21 20 2 1 2 2 2 3 2 4 2 5
84 83 82 81 80 8 1 8 2 8 3 8 4 8 5
• Use to represent long binary numbers in computers and
microprocessors.
Hexadecimal Number System
• Base 16 system
• Uses digits 0-9 &
letters A,B,C,D,E,F
• Groups of four bits
represent each
base 16 digit
Fractional HEXADECIMAL NUMBER
SYSTEM
• The hexadecimal system uses base 16. Thus, it has 16 possible digit
symbols. It uses the digits 0 through 9 plus the letters A, B, C, D, E,
and F as the 16 digit symbols.
000 0 20 1
001 1 21 2
010 2 22 4
011 3 23 8
100 4 24 16
101 5 25 32
110 6 26 64
111 7 27 128
Significant Digits
Binary: 11101101
Hexadecimal: 1D63A7A
25 24 23 22 21 20
32 16 8 4 2 1
1 0 1 0 1 0
DECIMAL TO BINARY
CONVERTION
• There are two methods to convert it:-
= 1 0 1 1 0 12
ii. Repeat division method
The numbers is divide by 2.
Balance for the question is written until the last answer.
1 0 0 0 0 1 12
Decimal to binary (fractional)
• Examples:
• Convert the decimal number (12.0625)10 into binary number.
Solution:
Fractional part:
0.0625 x 2 = 0.1250 0
0.1250 x 2 = 0.2500 0
0.2500 x 2 = 0.500 0
0.500 x 2 = 1.000 1
(12.0625)10 = (1100.0001)2
Decimal to Octal Conversion
Examples:
• (315)10 = (473)8
8 315 3 LSD
8 39 7
8 4 4 MSD
0
DECIMAL TO OCTAL CONVERTION
• Convert from decimal to octal by using the repeated division
method used for decimal to binary conversion.
• Divide the decimal number by 8
• The first remainder is the LSB and the last is the MSB.
6538
Decimal to Octal (fractional)
• Examples:
• Convert the decimal number (225.225)10 into octal number.
Solution:
Fractional part:
0.225 x 8 = 1.800 1
0.800 x 8 = 6.400 6
0.400 x 8 = 3.200 3
0.200 x 8 = 1.600 1
0.600 x 8 = 4.800 4
(225.225)10 = (341.16314)8
Decimal to Hexadecimal Conversion
– Examples
• (315)10 = (13B)16
16 315 B LSD
16 19 3
16 1 1 MSD
0
Decimal to Hexadecimal Conversion
33E16
Decimal to Hexadecimal (fractional)
• Examples:
• Convert the decimal number (225.225)10 into hexadecimal
number.
Solution:
Fractional part:
0.225 x 16 = 3.600 3
0.600 x 16 = 9.600 9
(225.225)10 = (E1.39)16
Converting from Binary to
Decimal
Binary 1 0 1 0 1 1 0 1
x x x x x x x x
Positional Values 27 26 25 24 23 22 21 20
Products 128 + 32 + 8 + 4 + 1
17310
Converting from Binary to
Decimal
Practice conversions:
Binary Decimal
11101
1010101
100111
Converting From Decimal to
Binary
Practice conversions:
Decimal Binary
59
82
175
BINARY TO OCTAL CONVERSION
B 5
Exercise
Octal Digits 6 5 3
x x x
Positional Values
82 81 80
Products 384 + 40 + 3
42710
OCTAL TO BINARY CONVERTION
6 5 3
Hex Digits
3 B 4 F
x x x x
Positional Values
163 162 161 160
Products 12288 +2816 + 64 +15
15,18310
HEXADECIMAL TO binary
Solution: (23.AB)16 = 2 3 . A B
(23.AB)16 = (00100011.10101011)2
HEXADECIMAL TO OCTAL CONVERTION