NUMBER SYSTEM
Number system is a basis for counting varies items. Modern computers communicate and operate
with binary numbers which use only the digits 0 &1. Basic number system used by humans is Decimal
number system.
For Ex: Let us consider decimal number 18. This number is represented in binary as 10010.
We observe that binary number system take more digits to represent the decimal number. For large
numbers we have to deal with very large binary strings. So this fact gave rise to three new number systems.
i) Octal number systems
ii) Hexa Decimal number system
iii) Binary Coded Decimal number(BCD) system
To define any number system we have to specify
• Base of the number system such as 2,8,10 or 16.
• The base decides the total number of digits available in that number system.
• First digit in the number system is always zero and last digit in the number system is always
base-1.
Binary number system:
The binary number has a radix of 2. As r = 2, only two digits are needed, and these are 0 and 1. In
binary system weight is expressed as power of 2.
The left most bit, which has the greatest weight is called the Most Significant Bit (MSB). And the
right most bit which has the least weight is called Least Significant Bit (LSB).
DIGITAL LOGIC DESIGN Page no. 3
For Ex: 1001.012 = [ ( 1 ) × 23 ] + [ ( 0 ) × 22 ] + [ ( 0 ) × 21 ] + [ ( 1 ) × 20 ] + [ ( 0 ) × 2-1 ] + [
( 1 ) × 22 ]
1001.012 = [ 1 × 8 ] + [ 0 × 4 ] + [ 0 × 2 ] + [ 1 × 1 ] + [ 0 × 0.5 ] + [ 1 × 0.25 ]
1001.012 = 9.2510
Decimal Number system
The decimal system has ten symbols: 0,1,2,3,4,5,6,7,8,9. In other words, it has a base of 10.
Octal Number System
Digital systems operate only on binary numbers. Since binary numbers are often very long, two
shorthand notations, octal and hexadecimal, are used for representing large binary numbers. Octal systems
use a base or radix of 8. It uses first eight digits of decimal number system. Thus it has digits from 0 to 7.
Hexa Decimal Number System
The hexadecimal numbering system has a base of 16. There are 16 symbols. The decimal digits 0 to
9 are used as the first ten digits as in the decimal system, followed by the letters A, B, C, D, E and F, which
represent the values 10, 11,12,13,14 and 15 respectively.
Decima Binar Octal Hexadeci
l y mal
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 10 8
9 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F
DIGITAL LOGIC DESIGN Page no. 4
Number Base conversions
The human beings use decimal number system while computer uses binary number system.
Therefore it is necessary to convert decimal number system into its equivalent binary.
i) Binary to octal number conversion
ii) Binary to hexa decimal number conversion
iii) Octal to binary Conversion
iv) Hexa to binary conversion
v) Octal to Decimal conversion
Ex: convert 4057.068 to octal
=4x83+0x82+5x81+7x80+0x8-1+6x8-2
=2048+0+40+7+0+0.0937
DIGITAL LOGIC DESIGN Page no. 5
=2095.093710
vi) Decimal to Octal Conversion
Ex: convert 378.9310 to octal
37810 to octal: Successive division:
8 | 378
|
8 |47 --- 2
|
8 |5 --- 7 ↑
|
0 --- 5
=5728
0.9310 to octal :
0.93x8=7.44
0.44x8=3.52 ↓
0.53x8=4.16
0.16x8=1.28
=0.73418
378.9310=572.73418
vii) Hexadecimal to Decimal Conversion
Ex: 5C716 to decimal
=(5x162)+(C x161)+ (7 x160)
=1280+192+7
=14710
viii) Decimal to Hexadecimal Conversion
Ex: 2598.67510
1 6 2598
16 162 -6
10 -2
= A26 (16)
DIGITAL LOGIC DESIGN Page no. 6
0.67510=0.675x16 -- 10.8
=0.800x16 -- 12.8 ↓
=0.800x16 -- 12.8
=0.800x16 -- 12.8
=0.ACCC16
2598.67510 = A26.ACCC16
ix) Octal to hexadecimal conversion:
The simplest way is to first convert the given octal no. to binary & then the binary no. to
hexadecimal.
Ex: 756.6038
7 5 6 . 6 0 3
111 101 110 . 110 000 011
0001 1110 1110 . 1100 0001 1000
1 E E . C 1 8
x) Hexadecimal to octal conversion:
First convert the given hexadecimal no. to binary & then the binary no. to octal.
Ex: B9F.AE16
B 9 F . A E
1011 1001 1111 . 1010 1110
101 110 011 111 . 101 011 100
5 6 3 7 . 5 3 4
=5637.534
Complements:
In digital computers to simplify the subtraction operation & for logical manipulation complements
are used. There are two types of complements used in each radix system.
i) The radix complement or r’s complement
ii) The diminished radix complement or (r-1)’s complement
DIGITAL LOGIC DESIGN Page no. 7