2. • In digital electronics, the number system is used for
representing the information.
• The number system has different bases.
• The base or radix of the number system is the total number of
the digit used in the number system.
• Suppose if the number system representing the digit from 0 – 9
then the base of the system is the 10.
Types of Number Systems
Some of the important types of number system are
Decimal Number System
Binary Number System
Octal Number System
Hexadecimal Number System
These number systems are explained below in details.
3. 1. Decimal Number Systems
The number system is having digit 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 this
number system is known as a decimal number system because
total ten digits are involved.
The base of the decimal number system is 10.
4. 2. Binary Number Systems
• The modern computers do not process decimal number they
work with another number system known as a binary number
system.
• The Binary Number System uses only two digits 0 and1.
• The base of binary number system is 2 because it has only two
digit 0 and 1.
• The digital electronic equipments are works on the binary
number system and hence the decimal number system is
converted into binary system.
5. 3. Octal Numbers
• The base of a number system is equal to the number of digits
used, i.e., for decimal number system the base is ten while for
the binary system the base is two.
• The octal system has the base of eight as it uses eight digits 0, 1,
2, 3, 4, 5, 6, 7.
4. Hexadecimal Numbers
• These numbers are used extensively in microprocessor work.
• The hexadecimal number system has a base of 16, and hence it
consists of the following sixteen number of digits.
• 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
6. Common Number Systems
System Base Symbols
Used by
humans?
Used in
computers?
Decimal 10 0, 1, … 9 Yes No
Binary 2 0, 1 No Yes
Octal 8 0, 1, … 7 No No
Hexa-
decimal
16 0, 1, … 9,
A, B, … F
Yes No
15. Binary to Decimal
• Technique
– Multiply each bit by 2n, where n is the “weight”
of the bit
– The weight is the position of the bit, starting
from 0 on the right
– Add the results
16. Example
1010112 => 1 x 20 = 1
1 x 21 = 2
0 x 22 = 0
1 x 23 = 8
0 x 24 = 0
1 x 25 = 32
4310
Bit “0”
18. Decimal to Binary
• Technique
– Divide by two, keep track of the remainder
– First remainder is bit 0 (LSB, least-significant
bit)
– Second remainder is bit 1
– Etc.
21. Hexadecimal to Decimal
• Technique
– Multiply each bit by 16n, where n is the
“weight” of the bit
– The weight is the position of the bit, starting
from 0 on the right
– Add the results
22. Example
ABC16 => C x 160 = 12 x 1 = 12
B x 161 = 11 x 16 = 176
A x 162 = 10 x 256 = 2560
274810
27. Octal to Decimal
• Technique
– Multiply each bit by 8n, where n is the “weight”
of the bit
– The weight is the position of the bit, starting
from 0 on the right
– Add the results
53. Common Powers (1 of 2)
• Base 10
Power Preface Symbol
10-12 pico p
10-9 nano n
10-6 micro
10-3 milli m
103 kilo k
106 mega M
109 giga G
1012 tera T
Value
.000000000001
.000000001
.000001
.001
1000
1000000
1000000000
1000000000000
54. Common Powers (2 of 2)
• Base 2
Power Preface Symbol
210 kilo k
220 mega M
230 Giga G
Value
1024
1048576
1073741824
• What is the value of “k”, “M”, and “G”?
• In computing, particularly w.r.t. memory,
the base-2 interpretation generally applies
55. Fractions
• Binary to decimal
pp. 46-50
10.1011 => 1 x 2-4 = 0.0625
1 x 2-3 = 0.125
0 x 2-2 = 0.0
1 x 2-1 = 0.5
0 x 20 = 0.0
1 x 21 = 2.0
2.6875
56. Fractions
• Decimal to binary
p. 50
3.14579
.14579
x 2
0.29158
x 2
0.58316
x 2
1.16632
x 2
0.33264
x 2
0.66528
x 2
1.33056
etc.
11.00100
57. Fractions
• Hex decimal to decimal:
B0. A031 => 1 x 16-4 = 0.0001
3 x 16-3 = 0.0007
0 x 16-2 = 0.0000
10 x 16-1 = 0.6250
0 x 160 = 0.0
11 x 161 =176.
176.6258
58. Fractions
• Decimal to Hex Decimal
32.14579
.14579
x 16
2.33264
x 16
5.32224
x 16
5.15584
x 16
2.49344
x 16
7.89504
x 16
14 .32064
etc.
20.25527E
59. Fractions
• Octal to decimal:
27.1031 => 1 x 8-4 = 0.0002
3 x 8-3 = 0.005
0 x 8-2 = 0.000
1 x 8-1 = 0.125
7 x 80 = 7.
2 x 81 = 16.
23.1302
60. Fractions
• Decimal to Octal
32.14579
.14579
x 8
1.16632
x 8
1.33056
x 8
2.64448
x 8
5.15584
x 8
1.24672
x 8
1 .97376
etc.
40.112511
62. Fractional
Hexa-decimal to Binary
(b) BA2.23C16
Solution:
= B A 2 . 2 3 C
= 1011 1010 0010 . 0010 0011 11002
= 101110100010.0010001111
Hence the required binary equivalent is
101110100010 . 0010001111.
63. Fractional
Binary to Octal
(a) 111101.011012
Solution:
111101.0110102
= 75.328
Hence the required octal equivalent is 75.32.
64. Fractional
Octal to Binary
(b) 64.1758
Solution:
= 6 4 . 1 7 5
= 110 100 . 001 111 101
= 110100.0011111012
Hence the required binary number is
110100.001111101.
65. Chapter 1 65
Example: Fractional Octal to Hexadecimal via
Binary
1. Convert octal to binary
2. Use groups of four binary bits and express them as
hexadecimal digits
• Example: Octal Binary Hexadecimal
(6 3 5 . 1 7 5)8
110 011 101. 001 111 101
000110011101. 001111101000
= (1 9 D . 3 E 8)16
Represent Octal in binary
Group into 4 bit groups for
both the integer and
fraction parts, starting at
the radix point
Append leading 0’s to the
left of integer part and
trailing 0’s to the right of
the fraction part as needed
Express each group of 4
bits in hex
Appended 0’s
66. Example: Fractional Hexadecimal to Octal via Binary
1. Convert Hexadecimal to binary
2. Use groups of three binary bits and express them
as octal digits
• Example: Hexadecimal Binary Octal
• (6 3 5 . 1 7 5)16
0110 0011 0101. 0001 0111 0101
=011 000 110 101. 000 101 110 101
= (3065.0565)16