0% found this document useful (0 votes)
9 views35 pages

Digital Principle

The document explains various number systems, including decimal, binary, octal, and hexadecimal, detailing their bases, digits, and conversion methods. It emphasizes the importance of the binary system in digital computers and provides examples for converting between different number systems. Additionally, it outlines the positional value and weight of digits in these systems, illustrating how to perform conversions for both integer and fractional parts.

Uploaded by

harribritish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views35 pages

Digital Principle

The document explains various number systems, including decimal, binary, octal, and hexadecimal, detailing their bases, digits, and conversion methods. It emphasizes the importance of the binary system in digital computers and provides examples for converting between different number systems. Additionally, it outlines the positional value and weight of digits in these systems, illustrating how to perform conversions for both integer and fractional parts.

Uploaded by

harribritish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 35

Number system

A set of values used to represent different quantities is


known as number system.

For example: - A number system can be used to


represent the number of students in a class or number of
viewers watching a TV program etc.
The digital computer represents all kinds of data and
information in binary numbers.
It includes audio, graphics, video, text and numbers.
The total number of digits used in a number system is
called its base or radix.
The base is written after the number

Some important number systems are.


Types of number system
1)Decimal number system.
2)Binary number system.
3)Octal number system.
4)Hexadecimal number system.

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.

Types of number systems


Decimal Binary octal Hexadecimal
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

2|Page
Number system and their base value
Numbering systems0123456789ABCDEF
System Base Digits
Binary 2 01
Octal 8 01234567
Decimal 10 0123456789
Hexadecimal 16

Conversion: - The process in which a one system is


converted to another system is called conversion.

Decimal conversion: - the process in which a one


system is converted to decimal system is called decimal
conversion.

Binary conversion: - The process in which a one


system is converted to binary system is called binary
conversion.

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

The above table indicates that.


The value of digit 4 = 4Χ102 = 400
The value of digit 5 = 5Χ101 = 50
The value of digit 3 = 5Χ100 = 3
The actual number can be found by adding the values
obtained by the digits as follows.
5|Page
400+50+3 = 45310

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

The above table indicates that.


The value of digit 1 = 1Χ102 = 100
The value of digit 3 = 3Χ101 = 30
The value of digit 9 = 9Χ100 = 9
The value of digit 7 = 7Χ10-1 = 0.7
The value of digit 8 = 8Χ10-2 = 0.08
The actual number can be found by adding the values
obtained by the digits as follows.
100+30+9+0.7+0.08 =139.7810

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

Example 1:- convert 101112 to decimal number.


Position 4 3 2 1 0
Face value 1 0 1 1 1
Weights 24 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

Example 2 : convert 101.1012 to decimal number.


Position 2 1 0 -1 -2 -3
Value 1 0 1  1 0 1
Weights 22 21 20 Decimal point 2-1 2-2 2-3

101.1012= 1 Χ22 + 0 Χ21+ 1 Χ20+ 1 Χ2-1+1 Χ2-2 +1 Χ2-3


=1 Χ 4 + 0 + 1 Χ 1 + 1 / 2 + 0 + 1 / 8
= 4 + 0 + 1 + 0.5 + 0.125
=5.62510

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

Example 1:- Convert 458 to decimal number.


458 = 4 Χ81+ 5 Χ80
=4Χ8+5Χ1
=32 + 5 =37 10

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

231 .258 = 2 Χ82 + 3 Χ81 + 1 Χ80 +2 Χ8-1 +5 Χ8-2


=2 Χ 64 + 3 Χ 8 + 1 Χ 1 + 2/8 + 5 /64
=128 + 24 + 1 + 0.25 + 0.078125
= 153.32810

4. Hexadecimal number system


The hexadecimal number system consists of 16 digit from
0 to 9 and A to F. The alphabets A to F represent decimal
numbers from 10 to 15.
The base of this number system is 16. Each digit position
in hexadecimal system represents a power of 16.
The number 764 16 is a valid hexadecimal number.
It is different from 764 10 is which are seven hundred and
sixty four. This number system provides shortcut method
represent long binary numbers.
10 | P a g e
The place value of each digit according to position and
weights is as follows.
Position 4 3 2 1 0
Weights 164 163 162 161 160

A=10 B=11 C=12 D=13 E=14 F=15

Example 1 :- convert 3A16 to decimal number.


3A16 =3 Χ 161 + A Χ 160
=3 Χ 16 + 10 Χ 1
=48 + 10
= 58 10

Example 2: convert 1D7F.1316 to decimal number.


1D7F.13= 1 Χ 163 + D Χ 162 + 7 Χ 161 + FX160 + 1X16-1
+3X16-2
=1X4096+13X256+7X16+15X1+1/16+3/256
=4096+3328+112+15+0.0652+0.0117
=7551.63710
11 | P a g e
Conversation of decimal number System to
other number system
A decimal number may consist of two parts.
These parts are integer ‫ بشپړ‬،‫عدد چې کسر نه لری صحیح عدد‬
‫ عدد یا هغه‬part and fractional‫ کسری‬part.
Different methods are used to convert these parts
to other number systems.
Conversation of Decimal Integer to other
Number System
The following method is used to convert integer
part of decimal number to other number system.
1.Progressively‫ په ارتقايي بڼه‬،‫ د پرمختګ په ډول‬divide decimal
integer by the base of the number system in
which the number is to be converted until the
number becomes zero.
2.Write down the remainder in reverse ‫ په شا‬،‫سرچپه‬
order to get the required number.

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

Example 2:- convert 6610 to binary.


Number Remainder
2 66

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

Example 3:- covert 2710 to binary.


Number Remainder
2 27
2 13 1
2 6 1
2 3 0
2 1 1
0 1
2710=0110112

Example 4:- covert 5510 to binary.


Number Remainder
2 55
14 | P a g e
2 27 1
2 13 1
2 6 1
2 3 1
2 1 1
0 1

5510=001101112

Examples:- decimal to octal


Example 1:- convert 11910 to octal.

Number Remainder
8 119
8 14 7
8 1 6
0 1
11910= o1678

Example 2 :- convert 18510 octal number.


Number Remainder
8 185
15 | P a g e
8 23 1
8 2 7
0 2
18510= 02718

Example 3 :- convert 202110 octal number.


Number Remainder
8 1021
8 127 5
8 15 7
8 1 7
0 1
102110= 017758

Examples: - Decimal to hexadecimal

Example 1:- convert 18510 to hexadecimal.


Number Remainder
16 185

16 | P a g e
16 11 9
0 11=B
18510= 0B916

Example 2:- convert 22510 to hexadecimal.


Number Remainder
16 225
16 14 1
0 14=E
22510=0E116

Example 3:- convert 755110 to hexadecimal.


Number Remainder
16 7551
16 471 15=F
16 29 7
16 1 13=D
0 1
755110=01D7F16

Example 4:- convert 40310 to hexadecimal.


Number Remainder
17 | P a g e
16 403
16 25 3
16 1 9
0 1
40310=019316

Conversion of decimal fractional part to other


number system
The following steps are used to convert fractional part of
decimal number to other number system.
1. Multiply the fraction part of decimal number with
the base of the system into which fraction is to be
converted. The result may have two parts.
EX:-Integer part I1 and fraction part F1
2. Multiply the resulting fraction part F1 with the base
again. It will give F2 and I2
3. Multiply the resulting fraction part vanishes. The
process to end the fraction part may be unlimited.
The user may have to do minimum 5 steps.
4. The answer is written as follows: I1 I2 I2…..In

Examples converting fractional decimal


number to binary
18 | P a g e
Example 1:- convert 0.5610 into binary.
Result fractional part integral part
0.56X2 1.12 .12 1
0.12X2 0.24 .24 0
0.24X2 0.48 .48 0
0.48X2 0.96 .96 0
0.96X2 1.92 .92 1
0.5610=0.100012

Example 2:- convert 0.2310 into binary.


Result fractional part integral part
0.23X2 0.46 .46 0
0.46X2 0.92 .92 0
0.92X2 1.84 .84 1
0.84X2 1.68 .68 1
0.68X2 1.36 .36 1
0.2310=0. 001112

Example:- converting fractional decimal number to octal


19 | P a g e
Example 1:- convert 0.310 into octal.
Result fractional part integral part
0. 3X8 2.4 .4 2
0.4X8 3.2 .2 3
0. 2X8 1.6 .6 1
0.6X8 4.8 .8 4
0. 8X8 6.4 .4 6
0.310=0. 231468

Example 2:- convert 0.22510 into octal.


Result fractional part integral part
0. 225X8 1.800 .800 1
0.800X8 6.400 .400 6
0.400X8 3.200 .200 3
0.200X8 1.600 .600 1
0.600X8 4.800 .800 4
0.25510=163148

20 | P a g e
Example: - converting fractional decimal numbers to
Hexadecimal

Example: - convert 0.310 into hexadecimal number


Result fractional part integral part
0. 3X16 4.8 .8 4
0.8X16 12.8 .8 12=C
0.8X16 12.8 .8 12=c
0.310=0.4C16

Not: - C is the representing value. It will be taken once


conventionally.

Examples: - converting decimal (integral & fractional


part) to binary

Example: - convert 673.2310 into binary.


21 | P a g e
A. integral part
Number Remainder
2 673
2 336 1
2 168 0
2 84 0
2 42 0
2 21 0
2 10 1
2 5 0
2 2 1
2 1 0
0 1
67310=010101000012
B. Fractional part
Result fractional part integral part
0. 23X2 0.46 .46 0
0.46X2 0.92 .92 0
0.92X2 1.84 .84 1
0.84X2 1.68 .68 1
0.68X2 1.36 .36 1

22 | P a g e
0.2310=000111
Combining both the integral and fractional part
673.2310=01010100001.000111

Example 3:- convert 56.2510 into binary.


A. integral part
Number Remainder
2 56
2 28 0
2 14 0
2 7 0
2 3 1
2 1 1
0 1
5610=0111000
B. Fractional part
Result fractional part integral part
0. 25X2 0.50 .50 0
0.5X2 1. 00 .00 1
0.2510=012
Combining both the integral and fractional part
23 | P a g e
56.2510=111000.012

Examples: - converting decimal numbers(integral &


fractional part) to octal and hexadecimal number.
Example 1:- convert 225.22510 into octal.
A. integral part
Number Remainder
8 255
8 28 1
8 3 4
0 3
22510=03418
B. Fractional part
Result fractional part integral part
0. 225X8 1.80 .80 1
0.80X8 6.40 .40 6
0.40X8 3.20 .20 3
0.20X8 1.60 .60 1
0.60X8 4.80 80 4
.22510=163148
24 | P a g e
Combining both integral and fractional part
225.22510=0341.163148

Example 2:- convert 225.22510 into hexadecimal


A. integral part
Number Remainder
16 255
16 14 1
0 14=E

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

Example 1:- convert 27538 to binary.


2 7 5 3
010 111 101 011
27538=0101111010112

Example 3:- convert 25.578 to binary.


2 5. 5 7
010 101 101 111
25.578 = 010101.1011112

Example 4:- convert 107.528 to binary.


1 0 7 . 5 2
001 000 111 101 010
107.528=001000111.1010102
27 | P a g e
Conversion from binary to octal
The following steps are used to convert binary number to
octal.
1. Make groups of three binary digits from right to lift.
2. Add extra 0 to the left side if digits are less than
three.
3. Convert each group into octal number system.

Example1:- convert the number 110101112 to octal


number system.
Step 1:- Make groups of three binary digits from right to
left. Add extra 0s to the left if required.
011 010 111
Step 2:- convert each group into octal number system.
3 2 7
011 010 111

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

Examples: - Hexadecimal converts to binary


Example 1:- Convert 4F16 to binary.
From hexadecimal to binary conversion table
4 F
0100 1111

30 | P a g e
4F16=010011112

Example 2:- Convert 29D16 to binary.


From hexadecimal to binary conversion table
2 9 D
0010 1001 1101
29D16 =0010100111012

Example 3:- Convert A1.0316 to binary.


From hexadecimal to binary conversion table
A 1 . 0 3
1010 0001 0000 0011
A1.0316 =10100001000000112

Example 4:- Convert B1.0316 to binary.


From hexadecimal to binary conversion table
B 1 . 4 8
1011 0001. 0100 1000
B1.0316 =10110001010010002

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

Conversion from binary to hexadecimal


number
The following steps are used to convert binary number to
hexadecimal number.
 Make groups of four binary digits from right to left.
 Add extra 0 to the left side if digits are less number
four.
 Convert each group into hexadecimal number
system.

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

You might also like