Digital Principle
Digital Principle
1|Page
The decimal number system is used in general.
However the computer uses binary number system.
Octal and hexadecimal number systems are also used
in computer system.
2|Page
Number system and their base value
Numbering systems0123456789ABCDEF
System Base Digits
Binary 2 01
Octal 8 01234567
Decimal 10 0123456789
Hexadecimal 16
3|Page
1) Decimal number system
The decimal number system consists of ten digits from 0
to 9. These digits can be used to represent any numeric
value.
The base of decimal number system is 10. It is the most
widely used number system.
The value represented by individual digit.
Depends on weight and position of the digit.
Each number in this system consists of digits which are
located at different positions.
The position of first digit towards left side of the decimal
point is 0.
The position of second digits towards left side of the
decimal point is 1. The position of first digit towards right
side of decimal point is -1.
The position of second digit toward right side of decimal
point is -2 and so on. The value of the number
determined by multiplying the digits with weight of their
position and adding the results.
4|Page
This method in known as expansion method.
The right most digit of a number has the lowest weight.
This digit is calked least significant digit (LSD).
The left most digit of a number has the highest weight.
This digit is called most significant digit (MSD). The digit 7
in the number 724 most significant digit and 4 is the least
significant digit.
Example 1
The weights and positions of each digit of the number
453 are as follows.
Position 2 1 0
Weights 102 101 100
Face value 4 5 3
Example 2
The weights and positions of each digit of the number
139.78 are as follows.
Position 2 1 0 -1 -2
Weights 102 101 100 10-1 10-2
Face value 4 5 3 Decimal point 7 8
6|Page
2. Binary number system
Digital computer represents all kinds of data and
information in binary system. Binary number system
consists of two digits 0 and 1. Its base is 2.
Each digit or bit in binary number system can be 0 or 1.
A combination of binary numbers may be used to
represent different quantities like 10001. The positional
value of each digit in binary number is twice the place
value or face value of the digit of its right side.
The weight of each position is a power of 2.
The place value of the digits according to position and
weight is as follows.
Position 3 2 1 0
Weights 23 22 21 20
7|Page
101112= 1 Χ24 + 0 Χ23+ 1 Χ22+ 1 Χ21+1 Χ20
= 1 Χ 16 + 0 + 1 Χ 4 + 1 Χ 2 + 1 Χ 1
20=1
= 16 + 0 + 4 + 2 + 1
21=2
=2310
8|Page
3. Octal number system
Octal number system consists of eight digits from 0 to 7.
The base of octal system is 8. Each digit position in this
system represents a power of 8. Any digit in this system
is always less than 8. Octal number system is used as a
shorthand representation of long binary numbers.
The number 6418 is valid in this number system.
It is different form six hundred and forty one. The
number 8518 is not valid in this number system as 8 is not
a valid digit.
The place value of each digit according to position and
weights is as follows.
Position 4 3 2 1 0
Weights 84 83 82 81 80
9|Page
Example 2 :- convert 231.258 to decimal number.
Position 2 1 0 -1 -2
Value 2 3 1 2 5
Weights 82 81 80 Decimal point 8-1 8-2
12 | P a g e
Examples: Decimal to Binary
Example 1:- convert 8810 to Binary
Number Remainder
2 88
2 44 0
2 22 0
2 11 0
2 5 1
2 2 1
2 1 0
0 1
8810=010110002
13 | P a g e
2 33 0
2 16 1
2 8 0
2 4 0
2 2 0
2 1 0
0 1
6610=10000102
5510=001101112
Number Remainder
8 119
8 14 7
8 1 6
0 1
11910= o1678
16 | P a g e
16 11 9
0 11=B
18510= 0B916
20 | P a g e
Example: - converting fractional decimal numbers to
Hexadecimal
22 | P a g e
0.2310=000111
Combining both the integral and fractional part
673.2310=01010100001.000111
22510=0E116
B. Fractional part
Result fractional part integral part
0. 225X16 3.600 .600 1
0.600X16 9.600 .600 6
0.600X16 9.600 .600 3
.22510=3916
Combining both integral & fractional part
225.22510=0E1.3916
25 | P a g e
Conversion of octal to binary & binary to
octal number
Octal number system is often sued to provide shorthand
for expressing long binary numbers.
Each octal digit represents three binary digits.
The table used to convert octal to binary and vice versa is
Octal Binary
0 000
1 001
2 010
3 011
4 100
5 101
6 110
7 111
26 | P a g e
Example 1:- convert 3728 to binary.
From octal to binary conversion table
3 7 2
011 111 010
3728= 0111110102
28 | P a g e
Example 2:- convert the number 11010.11 to octal
number system.
Step 1:- Make group of three binary digits starting from
decimal point toward left.
Add extra 0s to the left if digits are less than three.
Make group of three binary digits staring from decimal
point toward right.
Add extra 0s to the right if the digits are less than three.
011 010 110
Step 3:- convert each group into octal number system.
3 2. 6
011 010 110
Therefore, 11010.112=32.68
29 | P a g e
Conversion of hexadecimal to binary & binary
to hexadecimal
Each hexadecimal digit represents four binary digits.
The table used to convert hexadecimal to binary and vice
versa is.
Hexadecimal Binary Hexadecimal Binary
0 000 8 1000
1 0001 9 1001
2 0010 A 1010
3 0011 B 1011
4 1000 C 1100
5 0101 D 1101
6 0110 E 1110
7 0111 F 1111
30 | P a g e
4F16=010011112
31 | P a g e
Example 5:- Convert C2.0316 to binary.
From hexadecimal to binary conversion table
C 2 . 0 3
1100 0010 0000 0011
C2.0316 =11000010000000112
32 | P a g e
Examples: - Binary to Hexadecimal Convert the
following binary numbers to hexadecimal
number system.
Example 1:- convert the number 100100112 to
hexadecimal number system.
Step 1:- Make group of four binary digits from right to
left.
Add extra 0’s to the left if required.
1001 0011
Step 2:- convert each group into hexadecimal number
system.
9 3
1001 0011
Therefore, 100100112=9316
33 | P a g e
Example 2:- convert the number
0101111010101001102to hexadecimal number system
Step 1:- Make groups of four binary digits from right to
left.
Add extra 0’s to the left if required.
1010 1110 1010 0110
Step 2:- convert each group into hexadecimal number
system.
5 8 A 6
0101 1000 1010 0110
Therefore, 01011110101001102=5EA616
Example 3:- covert the number 101100.12to hexadecimal
number system.
Step 1:- Make group of four binary digits starting from
decimal point toward left.
Add extra 0’s to the left if required.
Make group of four binary digit staring from decimal
point toward right.
34 | P a g e
Add extra 0’s to the right if required.
Step 3:- convert each group into hexadecimal number
system.
2 C. 8
0010 1100 . 1000
Therefore, 00101100.12=2C.816
35 | P a g e