Chapter 2 : Digital Number System
Topics covered in this snacksized chapter:
The study of Number System is useful for understanding how data is represented before it can be processed by any digital system including digital computer.
There are four number system used in digital electronics:
 Hexadecimal number system
Understanding these number system operations requires the ability to convert from one number system to another.
R is the radix or base of any number system.
 R must be a positive number.
 R digits in the number system ranges from 0 to R – 1
The decimal number system is a radix 10 number system therefore it has 10 symbols. These are 0,1,2,3,4,5,6,7,8,9
The decimal number system is a positional value system in which the value of digit depends upon its position.
 For example, in decimal number 534, the digit 5 represents hundreds, the 3 represents tens and 4 represents ones.
 Here 5 carries the most weight of three digits hence it is the most significant bit (MSB) and 3 carries the least weight and is called least significant bit (LSB).
Starting from the decimal point the place values of different digits in a mixed decimal number are 10^{0
}, 10^{1
}, 10^{2
}, and so on (for the integral part) and 10^{1
}, 10^{2
}, 10^{3
} and so on (for the fractional part).
Table shows the decimal position values as powers of
Integral Part

10^{2
}
 10^{1
}
 10^{0
}

MSB


Fractional Part

.
 10^{1
}
 10^{2
}

Decimal Point

 LSB

Digital computers internally use the binary (base2) number system to represent data and perform arithmetic calculations.
In binary number system, there are only two symbols 0 and 1, that is binary number system requires working with long strings of zeros and ones.
0 and 1 symbols used in the binary number system are referred as bit.
The group of four binary digits (bits) is known as Nibble while group of eight bits is known as Byte.
Starting from the binary point the place values of different digits in a mixed binary number are 2^{0
}, 2^{1
}, 2^{2
} and so on (for the integral part) and 2^{1
}, 2^{2
}, 2^{3
} and so on (for the fractional part).
Table shows that each digit position in a binary number represents a power of two.
Integral Part

2^{3
}
 2^{2
}
 2^{1
}
 2^{0
}

8
 4
 2
 1

MSB


Fractional Part


 2^{1
}
 2^{2
}
 2^{3
}


 1/2
 1/4
 1/8

Binary Point


The Octal number system is a radix 8 number system therefore it has 8 symbols. These are 0,1,2,3,4,5,6 and 7.
The place values or weights of different digits in a mixed octal number are 8^{0
}, 8^{1
}, 8^{2
}, 8^{3
} and so on (for the integral part) and 8^{1
}, 8^{2
}, 8^{3
} and so on (for the fractional part).
Table shows the octal position values as powers of 8.
Integral Part
 Fractional Part

8^{3
}
 8^{2
}
 8^{1
}
 8^{0
}
 
 8^{1
}
 8^{2
}
 8^{3
}

512
 64
 8
 1
 
 1/8
 1/64
 1/512

MSB



 Octal Point


 LSB

The Hexadecimal number system is a radix 16 number system.
In hexadecimal number system there are sixteen symbols.
The symbols used in hexadecimal number system are ten digits (0 to 9) and six characters (A to F).
These are:
 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
The place values or weights of different digits in a mixed hexadecimal number are 16^{0
},^{
}16^{1
},^{
}16^{2
}and so on (for the integral part) and 16^{1
},^{
}16^{2
},^{
}16^{3
} and so on (for the fractional part).
The decimal equivalent of A, B, C, D, E and F are 10, 11, 12, 13, 14 and 15 respectively.
Table shows that the hexadecimal position values as powers of 16
Integral Part

16^{2
}
 16^{1
}
 16^{0
}

MSB


Fractional Part


 16^{1
}
 16^{2
}

Hexadecimal Point
 LSB

Relationship among Decimal, Binary, Octal and Hexadecimal Number System arrow_upward
Decimal
 Binary
 HexaDecimal
 Octal

0
 0000
 0
 0

1
 0001
 1
 1

2
 0010
 2
 2

3
 0011
 3
 3

4
 0100
 4
 4

5
 0101
 5
 5

6
 0110
 6
 6

7
 0111
 7
 7

8
 1000
 8
 8

9
 1001
 9
 9

10
 1010
 A
 10

11
 1011
 B
 11

12
 1100
 C
 12

13
 1101
 D
 13

14
 1110
 E
 14

15
 1111
 F
 15

Any binary number can be converted to its equivalent decimal number by summing the weights of various positions.
Suppose we have binary number 11001.001
Decimal conversion:
For integral part:
(11001)_{2
}=
(1 x 2^{4
} + 1 x 2^{3
} + 0 x 2^{2
} + 0 x 2^{1
} + 1 x 2^{0
})
(11001)_{2
} = (16+ 8 + 0 + 0 + 1)
(11001)_{2
} = (25)_{10
}
For fractional part:
(.001)_{2
} = 0 x 2^{1
} + 0 x 2^{2
} + 1 x 2^{3
}
(.001)_{2
} = 0 + 0 + 0.125
(.001)_{2
} = (0.125)_{10
}
Decimal equivalent of (11001.001)_{2
} is (25.125)_{10
}
(11001.001)_{2
} = (25.125)_{10
}
Decimal to binary conversion can be done by dividing the integral part by 2 and writing down reminder after each division until a quotient 0 is obtained.
Binary equivalent is obtained by writing the first remainder as least significant bit and last reminder as most significant bit.
For fractional part it can be done by, multiplying the fractional part by 2 and write integer bit of the product and repeat this process till the fractional part of the product is 0.
We can understand decimal to binary conversion by the following example:
(22.625)_{10
}can be converted to binary as:
 For integral part: (22)_{10
}
For fractional part:
Decimal Fraction
 Product
 Integer Bit


0.625 X 2
 1.250
 1
 MSB

0.250 X 2
 0.50
 0


0.50 X 2
 1.0
 1
 LSB

(.625)_{10
} = (.101)_{2
}
Binary equivalent of (22.625)_{10
} is (10110.101)_{2
}
(22.625)_{10
} = (10110.101)_{2
}
The bits of the binary number are grouped into groups of three bits starting at the LSB, and then each group of these three bits is converted into its octal equivalent.
Binary Digits
 Octal Equivalent

000
 0

001
 1

010
 2

011
 3

100
 4

101
 5

110
 6

111
 7

For example:
 (101010011)_{2
} = (523)_{8
}
Sometimes the binary number may not have even groups of three bits.
In those cases we can add one or two zeros to the left of MSB of the binary number to fill out the last group.
For example, binary number (1011011) can be converted as adding two zeros to the left of MSB so binary number will be (001011011)_{2
} = (133)_{8
}
The octal to binary conversion is reverse of the binary to octal conversion.
For example:
(133)_{8
} = (001011011)_{2
}
For binary to hexadecimal conversion the binary numbers are arranged in group of four bits starting from LSB to MSB and adding number of zeros to the left of MSB if required for integral part.
For fractional part arranged in group of four bits from decimal and adding number of zeros to the right if required (to make it a group of four bits).
In this system (hexadecimal, or Base 16), the numbers are counted from 0 to 9, then letters A to F before adding another digit. The letter A through F represent decimal numbers 10 through 15, respectively.
For example:
(1110110101.11101)_{2
} = 0011 1011 0101 . 1110 1000 = (3.B5.E8)_{16
}
Base 16 is fourth power of 2 i.e. 2^{4
} = 16
We can replace each hexadecimal digit by a group of four binary digits. Thus it is easier to convert hexadecimal number to binary number.
For example: (1B87.E1)_{16
}can be converted as:
1
 B
 8
 7.
 E
 1

0001
 1011
 1000
 0111.
 1110
 0001

(1B87.E1) =(0001101110000111.11100001)_{2
}
An octal number can be converted to its decimal equivalent by multiplying each octal digit by its position weight.
For example, (35.8)_{8
}can be converted to its decimal equivalent as:
(35.8)_{8
} = (3 x 8^{1
} + 5 x 8^{0
} + 8 x 8^{1
}) = (24 +5+ 0.1)
(35.8)_{8
} = (29.1)_{10
}
Decimal equivalent of (35.8)_{8
} is (29.1)_{10
}
Decimal to octal conversion can be done by dividing the integral part by 8 and writing down the remainder after each division until a quotient of 0 is obtained.
For example, (156.1640625)_{10
} can be converted to its octal equivalent as:
Division
 Solution
 Octal

156/8
 19 + Remainder of 4
 4 (LSB)

19/8
 2 + Remainder of 3
 3

2/8
 0 + Remainder of 2
 2 (MSB)

 (156)_{10
}
 = (234)_{8
}
