Number System Conversion
Number System Conversion
Number System Conversion
&
CONVERSION
WHAT IS NUMBER SYSTEM…?
The number system that we use in our day-to-day life
is the decimal number system. Decimal number
system has base 10 as it uses 10 digits from 0 to 9. In
decimal number system, the successive positions to
the left of the decimal point represent units, tens,
hundreds, thousands and so on.
COMPLEMENT OF NUMBER
• The possibilities:
Decimal Octal
Binary Hexadecimal
EXAMPLE
Base
BINARY TO DECIMAL
Decimal Octal
Binary Hexadecimal
BINARY TO DECIMAL
• Technique
• Multiply each bit by 2n, where n is the “weight” of the bit
• The weight is the position of the bit, starting from 0 on the
right
• Add the results
EXAMPLE
Bit “0”
1010112 => 1 x = 1
20
1 x = 2
0 x 21 = 0
1 x = 8
0 x 22 = 0
1 x 23 = 32
24
4310
25
OCTAL TO DECIMAL
Decimal Octal
Binary Hexadecimal
OCTAL TO DECIMAL
• Technique
• Multiply each bit by 8n, where n is the “weight” of the bit
• The weight is the position of the bit, starting from 0 on the
right
• Add the results
EXAMPLE
7248 => 4 x 80 = 4
2 x 81 = 16
7 x 82 = 448
46810
HEXADECIMAL TO DECIMAL
Decimal Octal
Binary Hexadecimal
HEXADECIMAL TO DECIMAL
• Technique
• Multiply each bit by 16n, where n is the “weight” of the bit
• The weight is the position of the bit, starting from 0 on the
right
• Add the results
EXAMPLE
Decimal Octal
Binary Hexadecimal
HEXADECIMAL TO BINARY
• Technique
• Convert each hexadecimal digit to a 4-bit equivalent binary
representation
EXAMPLE
10AF16 = ?2
1 0 A F
10AF16 = 00010000101011112
DECIMAL TO BINARY
Decimal Octal
Binary Hexadecimal
DECIMAL TO BINARY
• Technique
• Divide by two, keep track of the remainder
• First remainder is bit 0 (LSB, least-significant bit)
• Second remainder is bit 1
• Etc.
EXAMPLE
12510 = ?2 2 125
2 62 1
2 31 0
2 15 1
2 7 1
2 3 1
2 1 1
0 1
12510 = 11111012
OCTAL TO BINARY
Decimal Octal
Binary Hexadecimal
OCTAL TO BINARY
• Technique
• Convert each octal digit to a 3-bit equivalent binary
representation
EXAMPLE
7058 = ?2
7 0 5
7058 = 1110001012
OCTAL TO HEXADECIMAL
• 132 8 = (?)
16
1 3 2 0101 1 01
0
FRACTIONS
• Binary to decimal
10.1011 => 1 x 2-4 = 0.0625
1 x 2-3 = 0.125
0 x 2-2 = 0.0
1 x 2-1 = 0.5
0 x 20 = 0.0
1 x 21 = 2.0
2.6875
Thank You
all