Number Systems
Number Systems
Decimal Number System
Decimal number system has only ten (10) digits from 0 to 9.
Every number (value) represents with 0,1,2,3,4,5,6, 7,8 and 9 in this
number system.
The base of decimal number system is 10, because it has only 10 digits.
2710 is a decimal number
Binary Number System
• A Binary number system has only two digits that are 0 and 1.
• Every number is represented with 0 and 1 in this number system.
• The base of binary number system is 2, because it has only two digits.
101102 is a Binary number
Octal Number System
Octal number system has only eight (8) digits from 0 to 7.
Every number (value) represents with 0,1,2,3,4,5,6 and 7 in this number
system.
The base of octal number system is 8, because it has only 8 digits.
658 is an Octal number
Hexadecimal Number System
• A Hexadecimal number system has sixteen (16) alphanumeric values
from 0 to 9 and A to F.
• Every number (value) represents with 0,1,2,3,4,5,6, 7,8,9,A,B,C,D,E and
F in this number system.
• The base of hexadecimal number system is 16, because it has 16
alphanumeric values. Here A is 10, B is 11, C is 12, D is 13, E is 14 and F
is 15.
9F is an Hexadecimal Number
9116 is an Hexadecimal Number
Number Conversions
• Binary To Decimal
• Binary to Octal
• Binary to Hexadecimal
Other conversions are based on the above conversions.
Binary To Decimal
Use the following table:
7 6 5 4 3 2 1 0
128 64 32 16 8 4 2 1
Binary To Decimal
Convert the following Binary Numbers To Decimal:
1001101 = 64+8+4+1
110111 = 32+16+4+2+1
101101 = 32+8+4+1
1011111 = 64+16+8+4+2+1
11111111 = 255
Decimal To Binary
7 6 5 4 3 2 1 0
128 64 32 16 8 4 2 1
Convert the following Decimal Numbers To Binary:
26 = 11010
75 = 1001011
178 = 10110010
254 = 11111110
Binary To Octal
Note: Base of Octal Number is 8 (23)
Procedure:
Starting at the binary point, work towards left (from right to
left)
Separate the bits into groups of three
Replace each group with the corresponding octal digit.
Binary To Octal
Convert 1100110 and 1110101 to octal:
1100110 → 001 100 110 → 1468
1110101 → 001 110 101 → 1658
Octal To Binary
Replace each octal digit with the corresponding
3-bit binary string:
7038 = 111 000 011
7328 = 111 011 010
Binary To Hexadecimal
Note: Base of Hexadecimal Number is 16
Procedure:
Starting at the binary point, work towards left (Right to left)
Separate the bits into groups of four
Replace each group with the corresponding hexadecimal digit.
An Example:
1000 10112 = 1000 1011 = 8B
Hexadecimal To Binary
Replace each hexadecimal digit with the corresponding 4-bit binary string.
333 (Hexadecimal) = 0011 0011 0011 (binary)
2F = 0010 1111
4DE = 0100 1101 1110
13A = 0001 0011 1010
Assignment
Binary Decimal Octal Hexadecimal
10110010 178 262 B2
11110110 246 366 F6
Hexadecimal To Decimal
Use two steps to convert.
Step-1: Convert Hexa-Decimal to Binary
Step-2: Convert Binary to Decimal
Octal To Decimal
Use two steps to convert.
Step-1: Convert Octal to Binary
Step-2: Convert Binary to Decimal
Hexadecimal To Decimal
Convert 5F to Decimal
5F = 1011111 (In Binary) = 95 (In Decimal)
Octal To Decimal
Convert the Octal number 34 to Decimal
34 = 011100 (In Binary) = 28 (In Binary)
Practice Assignment on Number Conversion
Fill-up the table:
Binary Octal Decimal Hexadecimal
123
3DE
1010101
91A
48