Number Systems
Number Systems
Way to represent
numbers
Has 10 symbols
0, 1, 2, 3, 4, 5, 6, 7, 8, 9
459
100s 10s
1s
10x Bigger
2 1
10 10
0
10
= =
0
10
=
1 0
1
4 5 9
Has 2 symbols
0, 1
8s 4s 2s 1s
State of
Power Binary
bulb/led
On 1
Off 0
Ones (1s)
Twos (2s)
Fours (4s)
101
4s 2s 1s
2x Bigger
2 1
2 2
20
= =
=
4 2
1
1 0 1
101 = 1 x 22 + 0 x 21 + 1 x 20
=1x4 + 0x2 + 1x1
= 4+0+1
= 5
1012 = 510
Hexadecimal Number System
Has 16 symbols
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
1 1 1 1 1 1
Decimal 0 1 2 3 4 5 6 7 8 9
0 1 2 3 4 5
Hexadecim
0 1 2 3 4 5 6 7 8 9 A B C D E F
al
2 1
16 16
0
16
6 = =
25 16
=
1
3 B E
3BE16 = 95810
Why do we need Binary
System?
Step 2:
Fill the first row with digits from the binary number
1 1 0 0
Convert the binary number 1100 to denary
Step 3:
Fill the second row with powers of 2 starting from right
1 1 0 0
23 22 21 20
Step 4:
Fill the third row with decimal equivalent values of the second
row
1 1 0 0
23 22 21 20
8 4 2 1
Convert the binary number 1100 to denary
Step 5:
Fill the last/fourth row with the product of the values from row 1
and row 3
1 1 0 0
23 22 21 20
8 4 2 1
8 4 0 0
Step 6:
Add up all the values from the fourth row. That gives the
decimal equivalent of the binary number
11002 = 1210
Decimal to Binary
Method 1
Method 2
Step 1:
Draw a table with two rows and ‘n’ columns. Choose ‘n’ in such
a way that 2n gives a value greater than or equal to the given
decimal number
Step 2:
Fill the first row with integral powers of 2 (1, 2, 4 8, ….) starting
from right
Step 3:
Compare the decimal number with the value in the first column
of row 1. If it is less put a zero in the first column of the second row
and move to the next column. If it is greater or equal put a 1
subtract the decimal number from the value in the column. Take
the result and repeat the above process with the next column. Do
this till you reach the last column.
Step 4:
Read the values of the second row from left to right. That is the
binary equivalent of the given decimal number
Method 2
(25)
32 16 8 4 2 1
0
25 < 32
Method 2
32 16 8 4 2 1
0 1
25 > 16
25 – 16 = 9
Method 2
32 16 8 4 2 1
0 1 1
9>8
9–8=1
Method 2
32 16 8 4 2 1
0 1 1 0
1<4
Method 2
32 16 8 4 2 1
0 1 1 0 0
1<2
Method 2
32 16 8 4 2 1
0 1 1 0 0 1
2510 = 110012
Hexadecimal to Binary
Convert the hexadecimal number 3C5 to binary
2. Write down the binary equivalent of each digit as a four digit number
3C5
3 C 5
0011 1100 0101
3C516 = 11110001012
Binary to Hexadecima
onvert the binary number 1110110101 to hexadecim
1110110101
0011 1011 0101
3 B 5
11101101012 = 3B516
Summary of conversions
1. Divide the decimal number with ‘n’ and note the quotient and the
remainder
4. Read all the remainders from bottom to top (last to first). This is the
equivalent of the decimal number in base ‘n’
ASCII and Unicode are important character sets that are used
as standard.
For example:
11010100 in binary would be D4 in hex
FFFF3 in hex would be 11111111111111110011 in binary
Colours
MAC Addresses
e.g. D5-BE-E9-8D-44-9C
%77 %77 %77 %2E %63 %69 %65 %2E %6F %72 %67 %2E %75 %6B