2. Created By: Dharmendra A. Chauhan
Number System
Contents
: Introduction of Number System
Different Types Of RadixBase
Base Conversion
Addition, Subtraction
3. Created By: Dharmendra A. Chauhan
Number System
Introductio
n:• The base of all system is a number system.
• There are four main number system in world.
1.Decimal
2.Binary
3.Octal
4.Hexadecimal
• The binary system are widely used in digital system.
• Everyday used in our life
• When binary system in no of digit is more then hexadecimal & octal system in digital
system.
4. Created By: Dharmendra A. Chauhan
Number System
Different Types Of
RadixBase:
o Decimal Number System:
Radix: radix means base value.
• The decimal number system has 10 digits(0,1,2,3,4,5,6,7,8,9).
• The decimal number system has a base or radix of 10.
Decimal
Point
… … … · 10 𝑛 · 102 · 101· 100 · 10−1· 10−2 · 10−3 · 10−𝑛………..
5. Created By: Dharmendra A. Chauhan
Number System
o Binary Number System:
• The binary system used in digital system.
• i.e. computer, programming etc.
• The binary number system has 2 digits(0,1).
• The binary number system has a base or radix of 2.
• Weight:
MSB(Most Significant Bit)
LSB(Least Significant Bit)
… … … · 2 𝑛 · 22 · 21· 20 · 2−1· 2−2 · 2−3 · 2−𝑛………..
Binary
Point
MSB
LSB
0010100
(Least Significant Bit)(Most Significant Bit)
6. Created By: Dharmendra A. Chauhan
Number System
Page 5
o Octal Number System:
• The octal number system has 8 digits(0,1,2,3,4,5,6,7).
• The binary number system has a base or radix of 8.
… … … · 8 𝑛
· 82
· 81
· 80
· 8−1
· 8−2
· 8−3
· 8−𝑛
………..
Octal Point
7. Created By: Dharmendra A. Chauhan
Number System
o Hexadecimal Number
System:
• The hexadecimal number system has 16 digits(0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F).
• The hexadecimal number system has a base or radix of 16.
Hexadecimal
Point
… … … · 16 𝑛
· 162
· 161
· 160
· 16−1
· 16−2
· 16−3
· 16−𝑛
………..
8. Created By: Dharmendra A. Chauhan
Number System
Base Conversion:
Conversion from any Radix to
Decimal:
• Binary to Decimal
• Octal to Decimal
• Hexadecimal to Decimal
9. Created By: Dharmendra A. Chauhan
Number System
o Binary to Decimal:
Integer Number Example:
Example 1: 0110 2 ? 10
Solution:
0 x 23 + 1 x 22 +1 x 21 +0 x 20
0 4 2 0
=
=
= 0+4+2+0
6=
10. Created By: Dharmendra A. Chauhan
Number System
o Binary to Decimal:
Fraction Number Example:
Example 2: 010.101 2 ? 10
Solution:
0 x 22 + 1 x 21 + 1 x 20 · 1 x 2−1 +0 x 2−2 +1 x 2−3
0 2 0 0.5
=
=
= 0+2+0+0.5+0+0.1.25
2.625=
0 0.125
11. Created By: Dharmendra A. Chauhan
Number System
o Octal to Decimal:
Example:
Example 3: 113 8 ? 10
Solution: 1 x 82 + 1 x 81 + 3x 80
64 8 3
=
=
= 64+8+3
75=
12. Created By: Dharmendra A. Chauhan
Number System
o Hexadecimal to Decimal:
Example:
Example 4: 16F2 16 ? 10
Solution: 1 x 163 + 4 x 162 + 15x161 + 2x160
4096 1536
=
=
= 4096+1536+240+2
5874=
240
F=15
13. Created By: Dharmendra A. Chauhan
Number System
Conversion from Decimal, Binary, Octal to
any Radix:
• Decimal to Binary
• Decimal to Octal
• Decimal to Hexadecimal
• Binary to Octal
• Binary to Hexadecimal
• Octal to Hexadecimal
14. Created By: Dharmendra A. Chauhan
Number System
o Decimal to Binary
2 105 1
2 52 0
2 26 0
2 13 1
2 6 0
2 3 1
2 1 1
0
Remainder
Integer Number Example:
Example 5: 105 10 ? 2
Solution:
LSB
MSB
So, The Answer is
105 10 1101001 2
15. Created By: Dharmendra A. Chauhan
Number System
o Decimal to Binary
Remainder
Example 6: 0.17 10 ? 2
Solution:
MSB
LSB
So, The Answer is
0.17 10 0.0010101 2
0.17x2=0.34
0
0.34x2=0.68
0
0.68x2=1.36
1
0.36x2=0.72
0
Fraction Numbers
Example
16. Created By: Dharmendra A. Chauhan
Number System
o Decimal to Octal
8 135 7
8 16 0
8 2 2
0
Remainder
Example:
Example 7: 105 10 ? 8
Solution:
LSB
MSB
So, The Answer is
105 10 207 2
17. Created By: Dharmendra A. Chauhan
Number System
o Decimal to Hexadecimal
16 3509 5
16 219 11=B
16 13 13=D
0
Remainder
Example 8: 3509 10 ? 16
Solution:
LSB
MSB
So, The Answer is
105 10 DB5 2
18. Created By: Dharmendra A. Chauhan
Number System
o Binary to Hexadecimal
Example 9: 001100 2 ? 8
Solution:
1 4 So, The Answer is
001100 2 14 8
001 100
19. Created By: Dharmendra A. Chauhan
Number System
o Binary to Octal
Example 10: 000111100000 2 ? 16
Solution:
1 14=E 0 So, The Answer is
000111100000 2 1E0 8
0001 1110 0000
20. Created By: Dharmendra A. Chauhan
Number System
o Octal to Hexadecimal
Example 11: 000111100000 2 ? 16
Solution:
1 14=E 0 So, The Answer is
000111100000 2 1E0 8
0001 1110 0000
21. Created By: Dharmendra A. Chauhan
Number System
o Addition
11
1101
1100
Example 12:Perform addition of
1101 2 𝑎𝑛𝑑 1100 2
+
11001
Carry
Answer
Answer:
Example 13:Perform addition of
101.111 2 𝑎𝑛𝑑 110.011 2
Addition Rule
Carry
0+0=0 -
0+1=1 -
1+0=1 -
1+1=10 10
1111.11
101.111
110.011
1100.01
0
Answer
Answer:
+
Carry
22. Created By: Dharmendra A. Chauhan
Number System
o Subtraction
1101
1100
Example 12:Perform addition of
1101 2 𝑎𝑛𝑑 1100 2
-
10001
Carry
Answer
Answer:
Example 13:Perform addition of
101.111 2 𝑎𝑛𝑑 110.011 2
Subtraction
Rule
1-1=0 0
1-0=0 -
0-1=1 1
0-0=0 0
1111.11
101.111
110.011
1100.01
0
Answer
Answer:
+
Carry