0% found this document useful (0 votes)
33 views24 pages

FIT Unit 3 Part 1

The document provides an overview of number systems, categorizing them into nonpositional and positional systems. It explains the characteristics of various positional number systems including decimal, binary, octal, and hexadecimal, detailing their bases and how to represent numbers within these systems. Additionally, it outlines methods for converting decimal numbers to other bases using division and multiplication techniques.

Uploaded by

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

FIT Unit 3 Part 1

The document provides an overview of number systems, categorizing them into nonpositional and positional systems. It explains the characteristics of various positional number systems including decimal, binary, octal, and hexadecimal, detailing their bases and how to represent numbers within these systems. Additionally, it outlines methods for converting decimal numbers to other bases using division and multiplication techniques.

Uploaded by

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

12-01-2023

MAHARAJA SURAJMAL INSTITUTE


Department of Computer Applications

Unit – 3
computer number
system
(BCA – 105)

Mr. S.P. Chauhan


Asst. Prof. & Hostel Warden

S.P. Chauhan 1

Number Systems
A number is a mathematical object used to count, label and measure.
A number system is a systematic way to represent numbers. A number system is the
representation of a given number. i.e. number system defines a set of values that is used to
represent or count quantity. Eg. We talk about the number of students attending the class. The
number system can be classified into two broad categories:
i. Nonpositional Number System:-
In early days people used to count on their fingers and when fingers becomes insufficient for
counting, stones or sticks etc might be used to indicate the values. Using such number system
it was very difficult to perform arithmetic operations as it has no symbol for zero.
The number system in which each symbol represent same value regard less its position in a
number is called nonpostional number system. So in such number system one has to count the
number of symbols present in the number.
The most common nonpositional number system is the Roman number system, in this number
system few characters are used to represent the number eg. I, II, III IV, V
ii. Positional Number System:-
It is most widely used number system. In this number system symbols are called digits and
these digits represent different values depending upon the position they occupy in the number.
S.P. Chauhan 2

1
12-01-2023

Number Systems
ii. Positional Number System:-
A positional number system is also known as weighted number system. Following three
considerations determine the value of each digit in such a number.
a. The digit itself.
b. The position of digit in the number
c. The base of the number system
The first positional number system was invented by Babylonians, but the positional number
system, which is currently used is called decimal number system that uses ten symbols or
digits. Apart from it some other positional number system are Binary number system, Octal
number system & Hexadecimal number system.

Eg. Decimal number 2586 consist of 6 digits 6 at unit, 8 at ten, 5 at hundred & 2 at thousands
positions. Its value can be written as
(2x103)+(5x102)+(8x101)+(6x100) = 2000 + 500 + 80 + 6 = 2586 S.P. Chauhan 3

Number Systems
Base (Radix) of Number System:-
It is defined as the total number of digits/symbols available in the number system. The first
digit is always zero. Base of a number system plays an important role. The maximum value of
a single digit in the given number system is equals to on less than the value of base.
In case of binary number system, base is 2 so maximum value of single digit is 2 – 1 = 1
In case of decimal number system, base is 10 so maximum value of single digit is 10 – 1 = 9
In case of octal number system, base is 8 so maximum value of single digit is 8 – 1 = 7
In case of hexadecimal number system, base is 16 so maximum value of digit is 16 – 1 = 15
which is equivalent to F.

S.P. Chauhan 4

2
12-01-2023

Number Systems
Base (Radix) of Number System:-
So value of base in all positional number system has the following characteristics:
i. It determine the total number of different symbols or digits available in the number
system. The first number is always zero (0).
ii. The maximum value of a single digit is always equals to one less than the value of the
base.
Decimal Number System:-
The base of this number system is 10 i.e. this number system consists of 10 digits
0,1,2,3,4,5,6,7,8,9 and any decimal number can be represented in combination of these 10
digits. The name is derived from Decem, which means 10. Each digit in this number system
represents units, which are 10 times the unit of the digit to its right.
i.e. starting from the decimal point and moving to left, each position is represented by the base
value (10) raised to a power. The power starts at 0 for the position just to the left of the
decimal point and power is incremented by one for each position that continue to left. Moving
to the right of decimal point we will need to place a minus sign in the front of each
incremented power.

S.P. Chauhan 5

Number Systems
Decimal Number System:-
As the base of decimal number system is 10 so it is represented as (6734)10. The expended
form is:
(6734)10 = 6 × 1000 + 7 × 100 + 3 × 10 + 4 × 1 (67.34)10 = 6 × 10 + 7 × 1 + 3/10 + 4/100
(6734)10 = 6 × 103 + 7 × 102 + 3 × 101 + 4 × 100 (67.34) = 6 × 101 + 7 × 100 + 3 × 10-1 + 4 × 10-
2 10
Binary Number System:-
The base of this number system is 2 i.e. this number system consists of 2 digits 0 & 1. Any
number can be represented in combination of these 2 digits. This number system was
advocated by Gottfried WilhelmVon Leibnitz in 17th century. As its base is 2 so the largest
single digit is 2-1 = 1 i.e. one less than the base
Starting from the decimal point and moving to left, each position is represented by the base
value(2) raised to a power. The power starts at 0 for the position just to the left of the decimal
point and power is incremented by one for each position that continue to left. Moving to the
right of decimal point we will need to place a minus sign in the front of each incremented
power.
Bit is the short form of binary digit. Hence a bit in computer terminology means either 0 or 1.
An n-bit number is a binary number consisting of n bits.
In binary number system with base 2, the weight of nth bit in a binary number from RHS is
nthbit × 2n-1. S.P. Chauhan 6

3
12-01-2023

Number Systems
Binary Number System:-
Binary number is represented as (110011)2.
Above binary number is represented in its extended form as follows:
(110011)2 = 1 × 25 + 1 × 24 + 0 × 23 + 0 × 22 + 1 × 21 + 1 × 20
The weight value of each position is determine as follows:
… 210 29 28 27 26 25 24 23 22 21 20 2-1 2-2 2-3 …
1024 512 256 128 64 32 16 8 4 2 1 . .5 .25 .125
Binary Decimal equivalent Table in the left shows 3 bit binary numbers along with their
000 0 decimal equivalent. In this table there are only two digits 0 &
001 1 1 in binary number and hence, binary equivalent of decimal
010 2 number 2 has to written as 10 and readed as one – zero.
011 3
Form table it is clear that with 3 – bits only 8 i.e. 23 different
patterns of 0s & 1s are possible and hence a 3 bit binary
100 4
number can have one of the 8 values in the range 0 to 7. So
101 5
any decimal number in the range 0 to 2n – 1 can be
110 6
represented in binary form as an n-bit number, where n is
111 7 number of bits. S.P. Chauhan 7

Number Systems
Octal Number System:-
The base of this number system is 8 i.e. this number system consists of 8 digits 0,1,2,3,4,5,6 &
7. Any number can be represented in combination of these 8 digits. As its base is 8 so the
largest single digit is 8-1 = 7 i.e. one less than the base
Starting from the decimal point and moving to left, each position is represented by the base
value(8) raised to a power. The power starts at 0 for the position just to the left of the decimal
point and power is incremented by one for each position that continue to left. Moving to the
right of decimal point we will need to place a minus sign in the front of each incremented
power.
In this number system with base 8, the weight of nth digit from decimal to LHS/ from RHS to
LHS is nthdigit× 8n-1.
Octal number is represented as (4621)8.
Above octal number is represented in its extended form as follows:
(4621)8 = 4 × 83 + 6 × 82 + 2 × 81 + 1 × 80
The weight value of each position is determine as follows:
MSB 5SB 4SB 3SB 2SB LSB MSB LSB
…. 84 83 82 81 80 . 8-1 8-2 …
4096 512 64 8 1 . 0.125 0.015625 S.P. Chauhan 8

4
12-01-2023

Number Systems
Octal Number System:-
As there are only 8 digits in octal number system, so 3 bits (23 = 8) are sufficient to
represent any single octal digit in binary.
Binary Decimal Octal
Table in the left shows 3 bit binary numbers along with their
000 0 0
decimal & octal equivalent. In this table there are only two
001 1 1
digits 0 & 1 in binary number. Form table it is clear that with
010 2 2
3 – bits only 8 i.e. 23 different patterns of 0s & 1s are
011 3 3 possible and hence a 3 – bit number can have one of the 8
100 4 4 values in the range 0 to 7. So 3 bits in binary are required to
101 5 5 represent a digit in octal number system.
110 6 6
111 7 7
001 000 8 10
001001 9 11
001010 10 12

S.P. Chauhan 9

Number Systems
Hexadecimal Number System:-
The base of this number system is 16 i.e. this number system consists of 16 digits
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E & F. i.e. in this number system alphabets A,B,C,D,E & F are
used to represent decimal numbers 10,11,12,13,14 & 15 respectively. As its base is 16 so the
largest single digit is 16-1 = 15 i.e. one less than the base which is written as ‘F’.
Starting from the decimal point and moving to left, each position is represented by the base
value(16) raised to a power. The power starts at 0 for the position just to the left of the decimal
point and power is incremented by one for each position that continue to left. Moving to the
right of decimal point we will need to place a minus sign in the front of each incremented
power.
In this number system with base 16, the weight of nth digit from decimal to LHS/ from RHS to
LHS is nth digit× 16n-1.
Hexadecimal number is represented as (A31)16.
Above hexadecimal number is represented in its extended form as follows:
(A31)16 = 10 × 162 + 3 × 161 + 1 × 160
The weight value of each position is determine as follows:
…. 163 162 161 160 . 16-1 16-2 …
4098 256 16 1 . 0.0625 .0039 S.P. Chauhan 10

5
12-01-2023

Number Systems
Hexadecimal Number System:-
As there are only 16 digits in this number system, highest digit is ‘F’ so 4 bits (24 = 16)
are sufficient to represent any single hexadecimal digit in binary.
Decimal Octal Hexadecimal Binary
0 0 0 0000
Table in the left shows 4 – bit numbers
1 1 1 0001

2 2 2 0010
along with their decimal & Hexadecimal
3 3 3 0011
equivalent. In this table there are only two
4 4 4 0100 digits 0 & 1 in binary number. Form table
5 5 5 0101 it is clear that with 4 – bits only 16 i.e. 24
6 6 6 0110 different patterns of 0s & 1s are possible
7 7 7 0111
and hence a 4 – bit number can have one
8 10 8 1000
of the 16 values in the range 0 to F. So 4
9 11 9 1001

10 12 A 1010
bits in binary are required to represent a
11 13 B 1011
digit in hexadecimal number system.
12 14 C 1100

13 15 D 1101

14 16 E 1110

15 17 F 1111
16 20 10 10000 S.P. Chauhan 11

Number Base Conversions


Conversion of Decimal to Another Base:-
Following steps will be used to convert a decimal number (Base 10) into another base
number:
1. Begin by dividing the decimal number by the base of new number.
2. Record the remainder form step 1 as the right most digit (Least Significant Digit) of
new base number.
3. Divide the quotient of the previous division by the new base.
4. Record the remainder of step 3 as the next digit (i.e. left) of the new base number.
5. Repeat the step 3 & 4, record reminders from right to left, until quotient become zero.
Note the last remainder and it will be the left most digit (Most Significant Digit) of the
new base number. i.e. write the remainders in the reverse order (Last reminder
written first i.e. left most and first remainder is written at last i.e. right most)
Above method of converting is called Repeated Division OR Division – Remainder
Technique.

S.P. Chauhan 12

6
12-01-2023

Number Base Conversions


Conversion of Decimal Fraction to Another Base Fraction:-
The method used for the conversion of decimal fraction to another base is similar to the
earlier technique expect that instead of division, the mathematical process of
multiplication is used. Also looking for a remainder, we look for a whole number. This
method involve following steps:
1.Multiply the decimal fraction by the base of new number.
2.If whole number is generated, than note this whole number otherwise note 0. It will be
written just after decimal point in new base (MSB).
3.Remove the whole number and continue the step 1 & 2 with the fraction value until it
become 0.
4.Finally, when no more multiplication can occur, write down the whole number in
downward direction.
Above method of converting is called Repeated Multiplication Technique.
During conversion of decimal fraction to another base fraction, the decimal point always
precedes the MSB

S.P. Chauhan 13

Conversion of Decimal to Another Base


Conversion of Decimal to Binary:-
The method of converting decimal number to binary number is by repeated division. In
this method (As discussed previously)the decimal number is successively divided by 2
and the remainders are recorded. The binary equivalent is obtained by grouping all the
remainders, with the last remainder being the Most Significant Bit (MSB) and first
remainder being the Least Significant Bit (LSB).
Eg. Determine the binary equivalent of (36)10
Base Decimal
Reminder
(2) Number
2 36 – 36 0 Least Significant Bit
(LSB) Taking remainders in the reverse
2 18 – 18 0
order , we have 100100. Thus
2 9–8 1 binary equivalent of (36)10 is
2 4–4 0 (100100)2.

2 2–2 0
Most Significant Bit
2 1–0 1 (MSB)
0 S.P. Chauhan 14

7
12-01-2023

Conversion of Decimal to Another Base


Conversion of Decimal to Binary:-
Eg. Determine the binary equivalent of (671)10
Base
Decimal Number Reminder
(2)
Taking remainders in the reverse order,
2 671 1 Least Significant
Bit (LSB) we have 1010011111. Thus binary
2 335 1
equivalent of (671)10 is (1010011111)2.
2 167 1 In every number system, we will number
2 83 1 each bit as follows:
2 41 1 • First bit form the right in binary is bit
2 20 0 position zero.
2 10 0 • Each bit to the left is given as the next
successive bit number.
2 5 1
• The first bit at position zero is called
2 2 0 Least Significant Bit (LSB) and the first
2 1 1 Most Significant bit from the left is called Most Significant
Bit (MSB)
0 Bit (MSB)
S.P. Chauhan 15

Conversion of Decimal to Another Base


Conversion of Decimal to Binary:-
Let us consider the following examples:

Binary equivalent of an odd decimal number ends with 1 and binary of even decimal
number ends with zero .
S.P. Chauhan 16

8
12-01-2023

Conversion of Decimal to Another Base


Conversion of Decimal Fraction to Binary Fraction :-
To convert a fractional decimal number to binary, we use the method of repeated
multiplication by 2. At first the decimal fraction is multiplied by 2. The integer part of the
answer will be the MSB of binary fraction. Again the fractional part of the answer is
multiplied by 2 to obtain the next significant bit of binary fraction. The procedure is
continued till the fractional part of product is zero or a desired precision is obtained.
Eg. Determine the binary equivalent of (0.375)10
Decimal Number
0.375 × 2 = 0.750 0 Most Significant Bit Taking remainders/whole
(MSB)
number in the downward
0.750 × 2 = 1.500 1
direction, we have .011. Thus
0.500 × 2 = 1.00 1 Least Significant Bit binary equivalent of (0.375)10 is
(LSB)
(.011)2.
.000 × 2 = 0 0

S.P. Chauhan 17

Conversion of Decimal to Another Base


Conversion of Decimal Fraction to Binary Fraction :-
Eg. Determine the binary equivalent of (0.29)10
Decimal Number
0.29× 2 = 0.58 0 Most Significant
Bit (MSB) The conversion is not ended and still
0.58 × 2 = 1.16 1
continue, so the approximation of
0.16 × 2 = 0.32 0
(0.29)10 in 16 bits is
0.32 × 2 = 0.64 0 (.0100101000111101)2.
0.64 × 2 = 1.28 1 In this method always remember to
0.28 × 2 = 0.56 0 strip-off the whole number before
0.56 × 2 = 1.12 1 multiplying again for the next digit.
0.12 × 2 = 0.24 0
0.24 × 2 = 0.48 0
.. ..
… …
…. ….
Least Significant
∞ Bit (LSB) S.P. Chauhan 18

9
12-01-2023

Conversion of Decimal to Another Base


Conversion of Decimal Fraction to Binary Fraction :-
Problems in conversion of
Decimal to Binary:-
• Binary takes larger number
of digits to represent the
numerical values, so it is very
cumbersome to write down.
• It is very difficult to
represent the fractional
values. Many times it can not
represent the values
accurately and needs many
digits to even come close to
value approximation.

S.P. Chauhan 19

Conversion of Decimal to Another Base


Conversion of Decimal to Octal:-
The method of converting decimal number to octal number is also by repeated division. In
this method (As discussed previously)the decimal number is successively divided by 8
and the remainders are recorded. The octal equivalent is obtained by grouping all the
remainders, with the last remainder being the Most Significant Bit (MSB) and first
remainder being the Least Significant Bit (LSB). Remainders will be either 0, 1, 2, 3, 4, 5, 6
or 7.
Eg. Determine the octal equivalent of (359)10
Base Decimal
Reminder Taking remainders in the reverse
(8) Number
Least Significant
8 359 – 352 7 order , we get 547. Thus octal
Bit (LSB)
equivalent of (359)10 is (547)8.
8 44 – 40 4 In octal base conversion, the
Most Significant concept of LSB & MSB is similar
8 5–0 5
Bit (MSB)
to that of binary conversions.
0

S.P. Chauhan 20

10
12-01-2023

Conversion of Decimal to Another Base


Conversion of Decimal to Octal:-
Eg. Determine the octal equivalent of (432267)10
Base
Decimal Number Reminder Taking remainders in the reverse order,
(8)
we have 1514213. Thus octal equivalent
8 432267 3 Least Significant
Bit (LSB) of (432267)10 is (1514213)8.
8 54033 1 In this number system, we will also
8 6754 2 number each bit/digit as follows:
8 844 4 • The position of first bit/digit form the
8 105 1 right is zero.
• Each bit/digit to the left is given as the
8 13 5
next successive bit number.
8 1 1 Most Significant • The first bit/digit at position zero is
Bit (MSB)
0 called Least Significant Bit (LSB) and the
first bit from the left is called Most
Significant Bit (MSB)

S.P. Chauhan 21

Conversion of Decimal to Another Base


Conversion of Decimal to Octal:-

S.P. Chauhan 22

11
12-01-2023

Conversion of Decimal to Another Base


Conversion of Decimal Fraction to Octal Fraction:-
To convert a fractional decimal number to octal, we use the method of repeated
multiplication by 8. At first the decimal fraction is multiplied by 8. The integer part of the
answer will be the MSB of octal fraction. Again the fractional part of the answer is
multiplied by 8 to obtain the next significant bit of octal fraction. The procedure is
continued till the fractional part of product is zero or a desired precision is obtained.
Eg. Determine the octal equivalent of (0.3125)10
Decimal Number
Most Significant Bit Taking remainders/whole
0.3125 × 8 = 2.5000 2 (MSB)
number in the downward
0.5 × 8 = 4.0 4
direction, we have .240. Thus
Least Significant Bit
.0 × 8 = 0 0 (LSB) octal equivalent of (0.3125)10 is
(.24)8.

S.P. Chauhan 23

Conversion of Decimal to Another Base


Conversion of Decimal Fraction to Octal Fraction:-
Eg. Determine the octal equivalent of (0.1325)10
Decimal Number
0.1325 × 8 = 1.0600 1 Most Significant
.0600 × 8 = 0.4800 0
Bit (MSB) The conversion is not ended and still
continue, so the approximate octal
0.4800 × 8 = 3.8400 3
equivalent of (0.1325)10 will be
0.8400 × 8 = 6.7200 6
(.10365605075)8.
0.7200 × 8 = 5.7600 5 In this method always remember to
0.7600 × 8 = 6.0800 6 strip-off the whole number before
0.0800 × 8 = 0.6400 0 multiplying again for the next digit.
0.6400 × 8 = 5.1200 5
0.1200 × 8 = 0.9600 0
0.9600 × 8 = 7.6800 7
0.6800 × 8 = 5.4400 5
…. …. Least Significant
Bit (LSB)

S.P. Chauhan 24

12
12-01-2023

Conversion of Decimal to Another Base


Conversion of Decimal Fraction to Octal Fraction:-
Eg. Determine the octal equivalent of (243.15)10
In such cases we need to treat the integer part & fraction part differently, i.e. divide
integer part by 8 & multiply the fraction part by 8 , as follows:
Base Decimal Number
Decimal Number Reminder
(8) Most Significant Bit
Least Significant 0.15 × 8 = 1.20 1 (MSB)
8 283 3 Bit (LSB)
8 30 6 0.20 × 8 = 1.60 1
8 3 3 Most Significant 0.60 × 8 = 4.80 4
Bit (MSB)
0 0.80 × 8 = 6.40 6
Least Significant Bit
0.40 × 8 = 3.20 3 (LSB)

Taking remainders in the reverse order, we have 363 and whole numbers in the
downward direction, we have .11463. Thus octal equivalent of (243.15)10 will be
(363.11463)8.
S.P. Chauhan 25

Conversion of Decimal to Another Base


Conversion of Decimal to Hexadecimal:-
The method of converting decimal number to hexadecimal number is also by repeated
division. In this method (As discussed previously)the decimal number is successively
divided by 16 and the remainders are recorded. The hexadecimal equivalent is obtained
by grouping all the remainders, with the last remainder being the Most Significant Bit
(MSB) and first remainder being the Least Significant Bit (LSB). Remainders will be either
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E or F.
Eg. Determine the hexadecimal equivalent of (5112)10
Base
(16)
Decimal Number Reminder Taking remainders in the reverse
Least Significant Bit order , we get 13F8. Thus
16 5112 – 5104 8=8 (LSB) hexadecimal equivalent of
16 319 – 304 15 = F (5112)10 is (13F8)16.
16 19 – 16 3=3 In hexadecimal base conversion,
the concept of LSB & MSB is
16 1–0 1=1 Most Significant Bit similar to that of binary & octal
0 0 (MSB) conversions.

S.P. Chauhan 26

13
12-01-2023

Conversion of Decimal to Another Base


Conversion of Decimal to Hexadecimal:-
Eg. Determine the hexadecimal equivalent of (584666)10
Base
Decimal Number Reminder Taking remainders in the reverse
(8)
order, we have 8EBDA. Thus
16 584666 10 = A Least Significant
Bit (LSB) hexadecimal equivalent of (584666)10
16 36541 13 = D is (8FBDA)16.
16 2283 11 = B In this number system, we will also
16 142 14 = E number each bit/digit as follows:
16 8 8=8 Most Significant
• The position of first bit/digit form
Bit (MSB) the right is zero.
0
• Each bit/digit to the left is given as
the next successive bit number.
• The first bit/digit at position zero is
called Least Significant Bit (LSB) and
the first bit from the left is called
Most Significant Bit (MSB)
S.P. Chauhan 27

Conversion of Decimal to Another Base


Conversion of Decimal to Hexadecimal:-

S.P. Chauhan 28

14
12-01-2023

Conversion of Decimal to Another Base


Conversion of Decimal Fraction to Hexadecimal Fraction:-
To convert a fractional decimal number to hexadecimal, we use the method of repeated
multiplication by 16. At first the decimal fraction is multiplied by 16. The integer part of
the answer will be the MSB of octal fraction. Again the fractional part of the answer is
multiplied by 16 to obtain the next significant bit of hexadecimal fraction. The procedure
is continued till the fractional part of product is zero or a desired precision is obtained.
Eg. Determine the hexadecimal equivalent of (0.625)10
Decimal Number
Most Significant Bit
Taking remainders/whole
0.625 × 16 = 10.000 10 = A (MSB) number in the downward
0.000 × 16 = 0.000 0 direction, we have .100. Thus
Least Significant Bit hexadecimal equivalent of
.0 × 8 = 0 0 (LSB) (0.625)10 is (.A0)16.

S.P. Chauhan 29

Conversion of Decimal to Another Base


Conversion of Decimal Fraction to Hexadecimal Fraction:-
Eg. Determine the hexadecimal equivalent of (0.2715)10
Decimal Number
0.2715 × 16 = 4.3440 4=4 Most Significant Bit
0.3440 × 16 = 5.5040 5=5
(MSB) The conversion is not ended and still
continue, so the approximate
0.5040 × 16 = 8.0640 8=8
hexadecimal equivalent of (0.2715)10
0.0640 × 16 = 1.0240 1=1
will be (.45810624DD2)16.
0.0240 × 16 = 0.3840 0=0 In this method always remember to
0.3840 × 16 = 6.1440 6=6 strip-off the whole number before
0.1440 × 16 = 2.3040 2=2 multiplying again for the next digit.
0.3040 × 16 = 4.8640 4=4
0.8640 × 16 = 13.8240 13 = D
0.8240 × 16 = 13.1840 13 = D
0.1840 × 16 = 2.9440 2=2 Least Significant Bit
…. …. (LSB)


S.P. Chauhan 30

15
12-01-2023

Conversion of Decimal to Another Base


Conversion of Decimal Fraction to Hexadecimal Fraction:-
Eg. Determine the hexadecimal equivalent of (127.50)10
In such cases we need to treat the integer part & fraction part differently, i.e. divide
integer part by 16 & multiply the fraction part by 16 , as follows:

Base Decimal Number


Decimal Number Reminder
(16)
Least Significant Most Significant Bit
16 127 15 = F Bit (LSB) 0.50 × 16 = 8.00 8 = 8 (MSB)
16 7 7=7 Least Significant Bit
0 0.00 × 16 = 0.00 0 (LSB)
Most Significant
Bit (MSB)

Taking remainders in the reverse order, we have 7F and whole numbers in the
downward direction, we have .80. Thus hexadecimal equivalent of (127.50)10 will be
(7F.80)16.

S.P. Chauhan 31

Conversion of Decimal to Another Base


Conversion of Decimal to Base 6:-
Convert (32)10 to a number with base 6.
Base
Decimal Number Reminder
(6)
Least Significant
6 32 2 Bit (LSB)
Taking remainders in the reverse
6 5 5 order, we have 52. Thus base 6
Most Significant equivalent of (32)10 will be (52)6.
0 Bit (MSB)
Conversion of Decimal to Base 11:-
Convert (1715)10 to a number with base 11.
Base
Decimal Number Reminder
(11)
Least Significant Taking remainders in the reverse
11 1715 10 = A Bit (LSB) order, we have 131A. Thus base 11
11 155 1 equivalent of (1715)10 will be
11 14 3 (131A)11.
11 1 1 Most Significant
0 Bit (MSB)
S.P. Chauhan 32

16
12-01-2023

Conversion of Another Base to Decimal


Following steps will be used to convert an another base to decimal i.e. Base 10:
1. Determine the positional value/weight of each digit/bit. This depends upon the
position of the digit/bit and the base of the number system to be converted.
2. Multiply the obtained positional/weight values form step 1 by the digit/bit at the
corresponding position/column.
3. Sum the product obtained from step2. The total will equivalent to decimal value.
4. A fraction number of another base can be converted into its decimal equivalent by
summing up the product of each bit and its weight.

S.P. Chauhan 33

Conversion of Another Base to Decimal


Conversion of Binary to Decimal:-
In binary to decimal conversion, each digit/bit of binary number is multiplied by its weighted
position and each of the weighted values is added together to get the decimal number.
Weights are some power of 2. Eg. Determine the decimal equivalent of (11010)2.
Binary Number 1 1 0 1 0
Weight of each Bit 24 23 22 21 20
Thus the decimal
Weighted Value 1 × 24 1 × 23 0 × 22 1 × 21 0 × 20 equivalent of
Solved Multiplication 16 8 0 2 0 (11010)2 is (26)10.
Sum of weight of all bits 16 + 8 + 0 + 2 + 0 = 26
Eg. Determine the decimal equivalent of (10110011)2.
Binary Number 1 0 1 1 0 0 1 1
Weight of each Bit 27 26 25 24 23 22 21 20
Weighted Value 1 × 27 0 × 26 1 × 25 1 × 24 0 × 23 0 × 22 1 × 21 1 × 20
Solved Multiplication 128 0 32 16 0 0 2 1
Sum of weight of all bits 128 + 0 + 32 + 16 + 0 + 0 + 2 + 1 = (179)10
S.P. Chauhan 34

17
12-01-2023

Conversion of Another Base to Decimal


Conversion of Binary to Decimal:-
So a binary number can be converted into its decimal equivalent by summing up the
product of each bit and its weight.
Eg. Convert (11001)2 into decimal.
(11001)2 = 1× 24 + 1 × 23 + 0 × 22 + 0 × 21 + 1 × 20
(11001)2 = 1×16 + 1×8 + 0×4 + 0×2 + 1×1
(11001)2 = 16 + 8 + 0 + 0 + 1
(11001)2 = (25)10

Powers of 2:

S.P. Chauhan 35

Conversion of Another Base to Decimal


Conversion of Binary Fractions to Decimal Fractions:-
The conversion of binary fraction is also similar, the only difference is the negative
exponents, which are used to denote the negative powers of two. Here instead of decimal
point we have binary point. The rest of the steps are similar to the conversion to decimal.
i.e. A binary fraction number can be converted into its decimal equivalent by summing up
the product of each bit and its weight. Weights of binary fractions are negative powers of
2
Eg. Convert (0.01101)2 into decimal.

Binary Number 0 1 1 0 1
Weight of each Bit 2-1 2-2 2-3 2-4 2-5
Thus the decimal
Weighted Value 0 × 1/2 1 × 1/4 1 × 1/8 0× 1/16 1 × 1/32 equivalent of
(0.01101)2 is
Solved Multiplication 0 1/4 1/8 0 1/32 (0.40625)10.

Sum of weight of all bits 0 + 0.25 + 0.125 + 0 + 0.03125 = 0.40625

S.P. Chauhan 36

18
12-01-2023

Conversion of Another Base to Decimal


Conversion of Binary Fractions to Decimal Fractions:-
Eg. Determine decimal equivalent of (11101.10111)2 .
(11101.10111)2 = 1× 24 + 1 × 23 + 1 × 22 + 0 × 21 + 1 × 20 + 1×2-1 + 1×2-2 + 1×2-3 + 1×2-4 + 1×2-5
(11101.10111)2 = 1×16 + 1×8 + 1×4 + 0×2 + 1×1 + 1×1/2 + 0×1/4 + 1×1/8 +1×1/16 + 1×1/32

(11101.10111)2 = 16 + 8 + 4 + 0 + 1 + 1/2 + 0 + 1/8 +1/16 + 1/32


(11101.10111)2 = 16 + 8 + 4 + 0 + 1 + 0.5 + 0 + 0.125 + 0.0625 + 0.03125
(11101.10111)2 = (29.71875)10 .

Negative powers of 2

S.P. Chauhan 37

Conversion of Another Base to Decimal


Conversion of Binary Fractions to Decimal Fractions:-

S.P. Chauhan 38

19
12-01-2023

Conversion of Another Base to Decimal


Conversion of Octal to Decimal:-
In octal to decimal conversion, each digit of octal number is multiplied by its weighted
position and each of the weighted values is added together to get the decimal number.
Weights are some power of 8. Eg. Determine the decimal equivalent of (45601)8.
Octal Number 4 5 6 0 1
Weight of each digit 84 83 82 81 80
Thus the decimal
Weighted Value 4 × 4096 5 × 512 6 × 64 0×8 1×1 equivalent of
Solved Multiplication 16384 2560 384 0 1 (45601)8 is
Sum of weight of all digits 16384 + 2560 + 384 + 0 + 1 = 19329 (19329)10.

Eg. Determine the decimal equivalent of (12706610)8.


Octal Number 1 2 7 0 6 6 1 0
Weight of each digit 87 86 85 84 83 82 81 80
Weighted Value 1 × 87 2 × 86 7 × 85 0 × 84 6 × 83 6 × 82 1 × 81 0 × 80
Solved Multiplication 2097152 524288 229376 0 3072 384 8 0
Sum of weight of all digits 2097152 + 524288 + 229376 + 0 + 3072 + 384 + 8 + 0 = (2854280)10
S.P. Chauhan 39

Conversion of Another Base to Decimal


Conversion of Octal to Decimal:-
So an octal number can be converted into its decimal equivalent by summing up the
product of each octal digit and its weight. Weights are some powers of 8.
Eg. Convert (56021)8 into decimal.
(56021)8 = 5× 84 + 6 × 83 + 0 × 82 + 2 × 81 + 1 × 80
(56021)8 = 5×4096 + 6×512 + 0×64 + 2×8 + 1×1
(56021)8 = 20480 + 3072 + 0 + 16 + 1
(56021)8 = (23579)10

S.P. Chauhan 40

20
12-01-2023

Conversion of Another Base to Decimal


Conversion of Octal Fractions to Decimal Fractions:-
The conversion of octal fraction to digital fraction is also similar, the only difference is the
negative exponents, which are used to denote the negative powers of 8. The rest of the
steps are similar to the conversion to decimal.
i.e. An octal fraction number can be converted into its decimal fraction equivalent by
summing up the product of each bit/digit of octal and its weight. Weights of octal
fractions are negative powers of 8
Eg. Convert (0.01001)8 into decimal.

Octal Number 0 1 0 0 1
Weight of each digit 8-1 8-2 8-3 8-4 8-5
Weighted Value 0 × 1/8 1 × 1/64 0 × 1/512 0× 1/4096 1 × 1/32768
Solved Multiplication 0 1/64 1/512 0 1/32768
Sum of weight of all digits 0 + 0.0156 + 0.00195 + 0 + 0.000025 = 0.017575

Thus the decimal equivalent of (0.01001)8 is (0.17575)10.


S.P. Chauhan 41

Conversion of Another Base to Decimal


Conversion of Octal Fractions to Decimal Fractions:-
Eg. Determine decimal equivalent of (6732.032)8 .
(6732.032)8 = 6×83 + 7×82 + 3×81 + 2×80 + 0×8-1 + 3×8-2 + 2×8-3
(6732.032)8 = 6×512 + 7×64 + 3×8 + 2×1 + 0×1/8 + 3×1/64 + 2×1/512
(6732.032)8 = 3072 + 448 + 24 + 2 + 0 + 3/64 + 2/512
(6732.032)8 = 3072 + 448 + 24 + 2 + 0 + 0.04687 + 0.00390
(6732.032)8 = (3546.05077)10 .

Eg. Determine decimal equivalent of (512.3)8 .

Soln: (512.3)8 = (330.375)10 .

S.P. Chauhan 42

21
12-01-2023

Conversion of Another Base to Decimal


Conversion of Hexadecimal to Decimal:-
In hexadecimal to decimal conversion, each digit of hexadecimal number is multiplied by its
weighted position and each of the weighted values is added together to get the decimal
number. Weights are some power of 16. Eg. Determine the decimal equivalent of (B014)16.
Hexadecimal Number B = 11 0 1 4
Weight of each digit 163 162 161 160 Thus the decimal
Weighted Value 11 × 4096 0 × 256 1 × 16 4×1 equivalent of
(B014)16 is
Solved Multiplication 45056 0 16 4 (45076)10.
Sum of weight of all digits 45056 + 0 + 16 + 4 = 45076
Eg. Determine the decimal equivalent of (8AFE2B)16.
Hexadecimal Number 8 A = 10 F = 15 E = 14 2 B = 11
Weight of each digit 165 164 163 162 161 160
Weighted Value 8 × 1048576 10 × 65536 15 × 4096 14 × 256 2 × 16 11 × 1
Solved Multiplication 8388608 655360 61440 3584 32 11
Sum of weight of all digits 8388608 + 655360 + 61440 + 3584 + 32 + 11 = (9109035)10
S.P. Chauhan 43

Conversion of Another Base to Decimal


Conversion of Hexadecimal to Decimal:-
So a hexadecimal number can be converted into its decimal equivalent by summing up the
product of each hexadecimal digit and its weight. Weights are some powers of 16.
Eg. Convert (2AC01)16 into decimal.
(2AC01)16 = 2×164 + 10×163 + 12×162 + 0×161 + 1×160
(2AC01)16 = 2×65536 + 10×4096 + 12×256 + 0×16 + 1×1
(2AC01)16 = 131072 + 40960 + 3072 + 0 + 1
(2AC01)16 = (175105)10

S.P. Chauhan 44

22
12-01-2023

Conversion of Another Base to Decimal


Conversion of hexadecimal Fractions to Decimal Fractions:-
The conversion of hexadecimal fraction to decimal fraction is also similar, the only
difference is the negative exponents, which are used to denote the negative powers of 16.
The rest of the steps are similar to the conversion to decimal.
i.e. An hexadecimal fraction number can be converted into its decimal fraction equivalent
by summing up the product of each bit/digit of hexadecimal and its weight. Weights of
hexadecimal fractions are negative powers of 16
Eg. Convert (0.E103)8 into decimal.

Hexadecimal Number E = 14 1 0 3
Weight of each digit 16-1 16-2 16-3 16-4
Weighted Value 14 × 1/16 1 × 1/256 0 × 1/4096 3× 1/65536
Solved Multiplication 14/16 1/256 0 3/65536
Sum of weight of all digits 0.875 + 0.00390 + 0 + 0.0000457 = 0.8789457

Thus the decimal equivalent of (0.E103)16 is (0.8789457)10.


S.P. Chauhan 45

Conversion of Another Base to Decimal


Conversion of Hexadecimal Fractions to Decimal Fractions:-
Eg. Determine decimal equivalent of (45C.8BE3)16 .
(45C.8BE3)16 = 4×162 + 5×161 + 12×160 + 8×16-1 + 11×16-2 + 14×16-3 + 3×16-4
(45C.8BE3)16 = 4×256 + 5×16 + 12×1 + 8×1/16 + 11×1/256 + 14×1/4096 + 3×/65536
(45C.8BE3)16 = 1024 + 80 + 12 + 8/16 + 11/256 + 14/4096 + 3/65536
(45C.8BE3)16 = 1024 + 80 + 12 +0.5 + 0.0429687 + 0.0034179 + 0.0000457
(45C.8BE3)16 = (1116.5464323)10 .

Eg. Determine decimal equivalent of (512.3)16 .

Soln: (512.3)16 = (1298.1875)10 .

S.P. Chauhan 46

23
12-01-2023

Conversion of Another Base to Decimal


Conversion of Base 6 to Decimal:-
Convert (2513)6 to a decimal.
(2513)6 = 2×63 + 5×62 + 1×61 + 3×60
(2513)6 = 2×216 + 5×36 + 1×6 + 3×1
(2513)6 = 432 + 180 + 6 + 3
(2513)6 = (621)10 .
Conversion of Base 11 to Decimal :-
Convert (1715)11 to a decimal.
(1715)11 = 1×113 + 7×112 + 1×111 + 5×110
(1715)11 = 1×1331 + 7×121 + 1×11 + 5×1
(1715)11 = 1331 + 847 + 11 + 5
(1715)11 = (2194)10 .

S.P. Chauhan 47

24

You might also like