You are on page 1of 18

Number Systems

 Decimal Number System


 Binary Number System
 Octal Number System
 Hexadecimal Number System
Decimal Number System

 Base is 10
 Use 10 symbols 0,1,2,3,4,5,6,7,8,9
 Each place is weighted by the power of 10
Binary Number System
 Base is 2 or ‘b’ or ‘B’ or ‘Bin’
 Two symbols: 0 and 1
 Each place is weighted by the power of 2
Example:
10112 or 1011 B
Converting Decimal to Binary

 For example convert 13 to Base 2

2 13

2 6 ---- 1
2 3 ---- 0

1 ---- 1

(1101)2
Converting decimal to binary
 Example: 162:

162 / 2 = 81 rem 0
81 / 2 = 40 rem 1
40 / 2 = 20 rem 0
20 / 2 = 10 rem 0
10 / 2 =5 rem 0
5/2 =2 rem 1
2/2 =1 rem 0
1/2 =0 rem 1

So, 16210 = 101000102


Some Exercises
 13D = (?) B
1101B

 23D = (?) B

 72D = (?) B
Conversion from binary number system
to decimal system
Hexadecimal Number System
 Base is 16 or ‘Hex’ or ‘H’
 16 symbols: {0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F}
 Each place is weighted by the power of 16

Example:
(3AB)H
Conversion from Decimal to
Hexadecimal
 Same as that of Decimal to Binary

 Repeatedly divide by 16

16 93

5 ---- D
Conversion from Hexadecimal to
Decimal
 (3AB4)H to Base 10

 (3AB4) = 3x163+10x162+11x161+4x 160


= 15028
Hexadecimal to Binary (Direct Method)

 Hexadecimal to Binary
 Expand each hexadecimal digit to 4 binary bits.
Example: (E29)16 = (1110 | 0010 | 1001)2

 Binary to Hexadecimal
 Combine every 4 bits into one hexadecimal digit
Example: (0101 | 1111 | 1010 | 0110)2 = (5FA6)16
Octal Number System
 Base is 8
 8 symbols: {0,1,2,3,4,5,6,7}
 Each place is weighted by the power of 8

Example:
(345)8
Conversion from Decimal to Octal
 Repeatedly divide by 8

Conversion from Octal to Hexadecimal

(34)8 to Base 10
 Octal to Binary
 Expand each octal digit to 3 binary bits.
Example: (725)8 = (111 | 010 | 101)2

Binary to Octal
 Combine every 3 bits into one octal digit
Example: (110 | 010 | 011)2 = (623)8
Some important Conversions to Remember
Base 10 Base 2 Base 16
0 0 0
1 1 1
2 10 2
3 11 3
4 100 4
5 101 5
6 110 6
7 111 7
8 1000 8
9 1001 9
10 1010 A
11 1011 B
12 1100 C
13 1101 D
14 1110 E
15 1111 F
Post Class Activity
 Find out what is
 Bit, Byte, KB, MB, GB, TB
 Find out why today’s computers operate on
Binary Number System.
 Pick out some numbers and try the conversion
you have learnt in this lecture.
THANKYOU

You might also like