Conversions Between Numbering systems
1
Number Systems
There are four systems of arithmetic which
are often used in digital electronics.
Decimal Number System
Binary Number System
Octal Number System
Hexa Decimal System
Decimal System
In the decimal system there are 10 digits:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9
EX: 230
And thus the base is 10.
Binary System
Computers use binary system, binary system
uses 2 digits:
0, 1
And thus the base is 2.
Hexadecimal System
Hexadecimal System uses 16 digital
values:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
And thus the base is 16.
Note:
Hexadecimal numbers are compact and
easy to read.
It is very easy to convert numbers from
binary system to Hexadecimal system and
vice-versa, every 4 bits
Octal Number System
Also known as the Base 8 System
Uses digits 0 - 7
Readily converts to binary
Groups of three (binary) digits can be used to
represent each octal digit
(0010)2 = (2)16 =(2)10 (B)16 = (1011)2
REFERENCE TABLE
Example 1
Convert the decimal number (12)10 into binary number.
Solution:
1- Generate Series 16 8 4 2 1
x x x x x
2- Convert to binary
0 1 1 0 0
3- Sum 0 + 8 + 4 + 0 + 0 = 12
12 10 = (01100)2 = (1100)2
https://www.youtube.com/watch?v=rsxT4FfRBaM
Example 2
Convert the binary number 1010102 into decimal number.
Solution:
1-Binary Number 1 0 1 0 1 0
2-Generate Series 32 16 8 4 2 1
3- Sum 32 + 0 + 8 +0 + 2 + 0 = 42
(101010)2 = 42 10
https://www.youtube.com/watch?v=VLflTjd3lWA
Least significant bit
Example 3
Convert a binary number 101101012 into a
Hexadecimal number. Extract from Reference Table
101101012 = B516
https://www.youtube.com/watch?v=tSLKOKGQq0Y
Example 4
Convert a Hexadecimal number (2F)16 Extract from Reference Table
to binary number:
1-Hex Digits 2 F
2-Convert to Decimal 2 15
3-Convert to Binary 8 4 2 1 8 4 2 1
0010 1111
(2F)16 = (00101111)2
https://www.youtube.com/watch?v=D_YC6DSPpQE
Example 5
Convert the decimal number (28)10 into Hexadecimal number.
Solution:
Convert Decimal à Binary then convert Binary à Hexa
Extract from Reference Table
Step1: Generate series 32 16 8 4 2 1
Step 2: Convert to binary 0 1 1 1 0 0
8 4 2 1 8 4 2 1
Step 3: Group bits in four 0001 1100
Step 4: Convert 0+0+0+1 8+4+0+0
Step 5: Hex digits 1 C
28 10 = (1C)16
Example 6
Convert Hexadecimal number 4F16 to its decimal equivalent:
Extract from Reference Table
Solution:
Convert Hexa à Binary then convert Binary à decimal
4 F
1-Convert each digit to
decimal 4 15
8 4 2 1
8 4 2 1
2-Convert each group to 0100 1111
binary
128 64 32 16 8 4 2 1
3-Generate series 0100 1111
4-Sum 0+64+0+0+8+4+2+1
79
(4F)16 = (79)10