0% found this document useful (0 votes)
42 views77 pages

Number System & Conversion

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)
42 views77 pages

Number System & Conversion

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/ 77

MAHARAJA SURAJMAL INSTITUTE

Department of Computer Applications

Unit – 3
computer number
system
(BCA- 103T )

Mr. S.P. Chauhan


Asst. Prof. & Hostel Warden

S.P. Chauhan 1
Number Systems
A number is a mathematical symbol/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 which is used to
represent quantity 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
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
(2×103)+(5×102)+(8×101)+(6×100) = 2000 + 500 + 80 + 6 = 2586 S.P. Chauhan 3
Number Systems
Base (Radix) of Number System:-
It is defined as the total number of unique 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
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 position 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
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
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
000 0 0
their decimal & octal equivalent. In this table there are
001 1 1
only two digits 0 & 1 in binary number. Form table it is
010 2 2
clear that with 3 – bits only 8 i.e. 23 different patterns of
011 3 3
0s & 1s are possible and hence a 3 – bit number can have
100 4 4
one of the 8 values in the range 0 to 7. So 3 bits in binary
101 5 5
are required to 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
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
4 4 4 0100 two digits 0 & 1 in binary number. Form
5 5 5 0101 table it is clear that with 4 – bits only 16
6 6 6 0110
i.e. 24 different patterns of 0s & 1s are
7 7 7 0111

8 10 8 1000
possible and hence a 4 – bit number can
9 11 9 1001 have one of the 16 values in the range 0
10 12 A 1010 to F. So 4 bits in binary are required to
11 13 B 1011 represent a digit in hexadecimal number
12 14 C 1100
system.
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
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 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

2 18 – 18 0
(LSB) Taking remainders in the
reverse order , we have 100100.
2 9–8 1 Thus binary equivalent of
2 4–4 0 (36)10 is (100100)2.
2 2–2 0
Most Significant Bit
2 1–0 1 (MSB)
0 S.P. Chauhan 14
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 – 670 1 Least Significant
Bit (LSB) we have 1010011111. Thus binary
2 335 – 334 1
equivalent of (671)10 is (1010011111)2.
2 167 – 166 1 In every number system, we will number
2 83 – 81 1 each bit as follows:
2 41 – 40 1 • First bit position form the right in binary
2 20 – 20 0 is zero.
2 10 – 10 0 • Each bit to the left is given as the next
successive bit number.
2 5–4 1
• The first bit at position zero is called
2 2–2 0 Least Significant Bit (LSB) and the first
2 1–0 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
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 Taking remainders/whole


0.375 × 2 = 0.750 0 Most Significant Bit number in the downward
(MSB) direction, we have .011. Thus
0.750 × 2 = 1.500 1 binary equivalent of (0.375)10 is
0.500 × 2 = 1.00 1 Least Significant Bit (.011)2.
(LSB)
.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
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
Taking remainders in the reverse
Base Decimal
(8) Number
Reminder order , we get 547. Thus octal
Least Significant equivalent of (359)10 is (547)8.
8 359 – 352 7 Bit (LSB) In octal base conversion, the
8 44 – 40 4 concept of LSB & MSB is similar
8 5–0 5 Most Significant to that of binary conversions.
Bit (MSB)
0
S.P. Chauhan 20
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
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
Taking remainders/whole
Most Significant Bit
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
octal equivalent of (0.3125)10 is
.0 × 8 = 0 0 (LSB) (.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
0.4800 × 8 = 3.8400 3
continue, so the approximate octal
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
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
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
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
0.5040 × 16 = 8.0640 8=8
continue, so the approximate
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
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.00 × 16 = 0.00 0
0 Most Significant (LSB)
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
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
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
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
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
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
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
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
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
Converting from a base other than 10 to another base other than 10
Following are the steps to convert a number in a base other than 10, to a number in
another base other than 10:
1. Convert the original number to base 10 (i.e. Decimal) number (As discussed earlier).
2. Convert the decimal number obtained in step 1 to the new base number (As
discussed earlier).
Eg. Convert (545)6 to (?)4.
Step 2: Convert base (209)10 to base 4.
Step 1: Convert from base 6 to base 10.
Base
(545)6 = 5×62 + 4×61 + 5×60 Decimal Number Reminder
(4)
Least Significant
(545)6 = 5×36 + 4×6 + 5×1 4 209 – 209 1 Bit (LSB)
(545)6 = 180 + 24 + 5 4 52 – 52 0
4 13 – 12 1
(545)6 = (209)10 .
4 3–0 3 Most Significant
0 Bit (MSB)

(209)10 = (3101)4
Therefore, (545)6 = (209)10 = (3101)4
Hence, (545)6 = (3101)4 S.P. Chauhan 48
Converting from a base other than 10 to another base other than 10
Eg. Convert (101110)2 to (?)8.
Step 1: Convert from base 2 to base 10.
(101110)2 = 1×25 + 0×24 + 1×23 + 1×22 + 1×21 + 0×20
(101110)2 = 1×32 + 0×16 + 1×8 + 1×4 + 1×2 + 0×1
(101110)2 = 32 + 0 + 8 + 4 + 2 + 0
(101110)2 = (46)10 .
Step 2: Convert base (46)10 to base 8.
Base
Decimal Number Reminder
(4)
Least Significant
8 46 – 40 6 Bit (LSB)
8 5–0 5
Most Significant
0 Bit (MSB)

(46)10 = (56)8
Therefore, (101110)2 = (46)10 = (56)8
Hence, (101110)2 = (56)8 S.P. Chauhan 49
Converting from a base other than 10 to another base other than 10
 Shortcut method for Binary to Octal:-
As we know 3 bits in binary are required to represent an octal digit/bit. A binary
number can be converted into its octal equivalent by grouping binary digits to group of
3 bits and then each group is converted to its octal equivalent. Start grouping from right
to left. Following are the steps to convert a binary number into octal number.
1. Take binary number.
2. Divide the binary number into groups of three bit section starting from the LSB (i.e. right )
to MSB (i.e. left)for integer part. So each group will represents an octal digit.
3. Convert each group of three binary bits/digits to one octal digit.
This is simple algorithm where we have to grouped binary number and replace their
equivalent octal digit. Depending on the number of bit, some time it may require to add
zero to the MSB to complete the grouping of three bits. By adding zero to the LHS of
MSB, it will not change the value of binary number.
Eight possible octal digits and their binary equivalents are shown below:

S.P. Chauhan 50
Converting from a base other than 10 to another base other than 10
 Shortcut method for Binary to Octal:-

S.P. Chauhan 51
Converting from a base other than 10 to another base other than 10
 Shortcut method for Binary to Octal:-
Eg. Determine octal equivalent of (1010111110110010)2
Binary Number 001(MSB) 010 111 110 110 010(LSB)
Octal Number 1 2 7 6 6 2
So the octal equivalent of (1010111110110010)2 is (127662)8.
Shortcut method for Binary Fractions to Octal Fractions:-
As binary number can be converted into its octal equivalent by grouping binary digits to
group of 3 bits and then each group is converted to its octal equivalent. Start grouping
from right to decimal point i.e. left to right after decimal point:
1. Take binary number.
2. Divide the binary number into groups of three bit section starting from the MSB (i.e. left )
to LSB (i.e. right) after decimal point i.e. for fraction part. So each group will represents
an octal digit.
3. Convert each group of three binary bits/digits to one octal digit.
Depending on the number of bit, some time it may require to add zero to the LSB to
complete the grouping of three bits. By adding zero to the RHS of LSB in fraction part, it
will not change the value of binary number S.P. Chauhan 52
Converting from a base other than 10 to another base other than 10
Shortcut method for Binary Fractions to Octal Fractions:-
Eg. Determine octal equivalent of (0.110101)2
Binary Number 000 110 (MSB) 101 (LSB)
Octal Number 6 5
So the octal equivalent of (0.110101)2 is (0.65)8.

Eg. Determine octal equivalent of (1100010.1110111)2

Binary Number 001 100 010 111 011 100


Octal Number 1 4 2 7 2 4
So the octal equivalent of (1100010.1110111)2 is (142.724)8
S.P. Chauhan 53
Converting from a base other than 10 to another base other than 10
 Shortcut method for Binary to Hexadecimal:-
As we know 4 bits in binary are required to represent an octal digit/bit. A binary
number can be converted into its hexadecimal equivalent by grouping binary digits to
group of 4 bits and then each group is converted to its hexadecimal equivalent. Start
grouping from right to left. Following are the steps to convert a binary number into octal
number.
1. Take binary number.
2. Divide the binary number into groups of four bit section starting from the LSB (i.e.
right ) to MSB (i.e. left)for integer part. So each group will represents an hexadecimal
digit.
3. Convert each group of four binary bits/digits to one hexadecimal digit.
This is simple algorithm where we have to grouped binary number and replace their
equivalent hexadecimal digit. Depending on the number of bit, some time it may require
to add zero to the MSB to complete the grouping of four bits. By adding zero to the LHS
of MSB, it will not change the value of binary number.
S.P. Chauhan 54
Converting from a base other than 10 to another base other than 10
 Shortcut method for Binary to Hexadecimal:-
Sixteen possible hexadecimal digits and their binary equivalents are shown below:

S.P. Chauhan 55
Converting from a base other than 10 to another base other than 10
 Shortcut method for Binary to Hexadecimal:-
Eg. Determine hexadecimal equivalent of (111010111110110010)2
Binary Number 0011(MSB) 1010 1111 1011 0010(LSB)
Hexadecimal Number 3=3 10 = A 15 = F 11= B 2
So the hexadecimal equivalent of (111010111110110010)2 is (3AFB2)16.
Shortcut method for Binary Fractions to Hexadecimal Fractions:-
As binary number can be converted into its hexadecimal equivalent by grouping binary
digits to group of 4 bits and then each group is converted to its hexadecimal equivalent.
Start grouping from right to decimal point i.e. left to right after decimal point:
1. Take binary number.
2. Divide the binary number into groups of four bit section starting from the MSB (i.e. left )
to LSB (i.e. right) after decimal point i.e. for fraction part. So each group will represents
an hexadecimal digit.
3. Convert each group of three binary bits/digits to one hexadecimal digit.
Depending on the number of bit, some time it may require to add zero to the LSB to
complete the grouping of four bits. By adding zero to the RHS of LSB in fraction part, it will
not change the value of binary number S.P. Chauhan 56
Converting from a base other than 10 to another base other than 10
Shortcut method for Binary Fractions to Hexadecimal Fractions:-
Eg. Determine hexadecimal equivalent of (0.11101000)2
Binary Number 0000 1110 (MSB) 1000 (LSB)
Hexadecimal Number 0 14 = E 8=8
So the hexadecimal equivalent of (0.11101000)2 is (0.E8)16.

S.P. Chauhan 57
Converting from a base other than 10 to another base other than 10
Shortcut method for Binary Fractions to Hexadecimal Fractions:-
Eg. Determine octal equivalent of (1100010.1110111)2
Binary Number 0110 0010 1110 1110
Hexadecimal Number 6=6 2=2 14 = E 14 = E

So the Hexadecimal equivalent of (1100010.1110111)2 is (62.EE)16


Shortcut method for Octal to Binary:-
As we know an octal digit/bit can be represented by three bit binary number . An
octal number can be converted into its binary equivalent by converting each octal
digit to its 3 bit binary equivalent. Following are the steps to convert an octal number
into its binary equivalent.
1.Take an octal number.
2.Convert every octal digit/bit into three-bit binary equivalent.
3.Combine three-bit binary section of each octal digit/bit by removing the space

S.P. Chauhan 58
Converting from a base other than 10 to another base other than 10
 Shortcut method for Octal to Binary:-

S.P. Chauhan 59
Converting from a base other than 10 to another base other than 10
 Shortcut method for Octal to Binary:-
Eg. Determine binary equivalent of (453267)8
Octal Number 4 5 3 2 6 7
Binary Coded Value 100 101 011 010 110 111
So by combining the three bits of the binary coded values we have 100101011010110111
Thus binary equivalent of (453267)8 is (100101011010110111)2
Shortcut method for Octal fraction to Binary Fraction:-
The steps of this conversion are similar to that of octal to binary conversion.
Eg. Determine the binary equivalent of (2.335)8
Octal Number 2 . 3 3 5
Binary Coded Value 010 . 011 011 101

So by combining the three bits of the binary coded values we have 010.011011101
Thus binary equivalent of (2.335)8 is (010.011011101)2

S.P. Chauhan 60
Converting from a base other than 10 to another base other than 10
Shortcut method for Octal fraction to Binary Fraction:-
Eg. Determine the binary equivalent of (5667.2411)8
Octal Number 5 6 6 7 . 2 4 1 1
Binary Coded Value 101 110 110 111 . 010 100 001 001
So by combining the three bits of the binary coded values we have
101110110111.010100001001
Thus binary equivalent of (5667.2411)8 is (101110110111.010100001001)2

S.P. Chauhan 61
Converting from a base other than 10 to another base other than 10
Shortcut method for Octal to Hexadecimal:-
As we know an octal & hexadecimal have certain relation with binary. Any single
octal can be represented by three binary-bits and any single hexadecimal digit can
be represented by four binary-bits. This makes the conversion of octal to
hexadecimal quite easy. Following are the steps to convert an octal number into its
hexadecimal equivalent.
1.Take an octal number.
2.Convert every octal digit/bit into three-bit binary equivalent.
3.Combine three-bit binary section of each octal digit/bit by removing the space.
4.Divide the binary number into groups of four bit section starting from the LSB (i.e.
right ) to MSB (i.e. left)for integer part. So each group will represents an hexadecimal
digit. Depending on the number of bit, some time it may require to add zero to the
MSB to complete the grouping of four bits
5. Convert each group of four binary bits/digits to one hexadecimal digit.
So Octal number is first converted into binary. This binary equivalent is then
converted into hexadecimal. S.P. Chauhan 62
Converting from a base other than 10 to another base other than 10
Shortcut method for Octal to Hexadecimal:-
Eg. Determine hexadecimal equivalent of (2327)8.
Octal Number 2 3 2 7
Binary Coded Value 010 011 010 111
Combining three bit binary blocks, we have 010011010111
Now divide the above binary bits into the group of four bits from LSB.
0100 1101 0111
Hexadecimal Value 4 13 = D 7
So hexadecimal equivalent of (2327)8 is (4D7)16
Eg. Determine hexadecimal equivalent of (5473261)8.
Octal Number 5 4 7 3 2 6 1
Binary Coded Value 101 100 111 011 010 110 001 So hexadecimal
Combining three bit binary blocks, we have 101100111011010110001 equivalent of
Now divide the above binary bits into the group of four bits from LSB. (5473261)8 is
0001 0110 0111 0110 1011 0001 (1676B1)16

Hexadecimal Value 1=1 6=6 7=7 6 = 6 11 = B 1 = 1 S.P. Chauhan 63


Converting from a base other than 10 to another base other than 10
Shortcut method for Octal to Hexadecimal:-

S.P. Chauhan 64
Converting from a base other than 10 to another base other than 10
Shortcut method for Octal Fraction to Hexadecimal Fraction:-
The method of conversion is based on the same procedure, as discussed in octal to
hexadecimal conversion.
1. Take an octal number.
2. Convert every octal digit/bit into three-bit binary equivalent.
3. Combine three-bit binary section of each octal digit/bit by removing the space.
4. Divide the binary number into groups of four bit section starting from the LSB (i.e.
right ) to MSB (i.e. left)for integer part and from MSB (i.e. left) to LSB (i.e. right) for
fraction part. So each group will represent a hexadecimal digit. Depending on the
number of bit, some time it may require to add zero to the MSB or to LSB to
complete the grouping of four bits
5. Convert each group of four binary bits/digits to one hexadecimal digit.
So Octal fractional number is first converted into binary fractional. This binary
fractional equivalent is then converted into hexadecimal fractional

S.P. Chauhan 65
Converting from a base other than 10 to another base other than 10
Shortcut method for Octal Fraction to Hexadecimal Fraction:-
Eg. Determine hexadecimal equivalent of (31.57)8.
Octal Number 3 1 . 5 7
Binary Coded Value 011 001 . 101 111
Combining three bit binary blocks, we have 011001.101111
Now divide the above binary bits into the group of four bits from LSB.
0001 1001 . 1011 1100
Hexadecimal Value 1 = 1 9=9 . 11 = B 12 = C
So hexadecimal equivalent of (31.57)8 is (19.BC)16
Eg. Determine hexadecimal equivalent of (76.665)8.
Octal Number 7 6 . 6 6 5
Binary Coded Value 111 110 . 110 110 101
So hexadecimal
Combining three bit binary blocks, we have111110.110110101 equivalent of
Now divide the above binary bits into the group of four bits from LSB. (76.665)8 is
0011 1110 . 1101 1010 1000 (3E.DA8)16
Hexadecimal Value 3 = 3 14 = E . 13 = D 10 = A 8 S.P. Chauhan 66
Converting from a base other than 10 to another base other than 10
Shortcut method for Hexadecimal to Binary:-
As we know any hexadecimal digit/bit can be represented by four bit binary number. So
any hexadecimal number can be converted into its binary equivalent by converting each
hexadecimal digit to its 4-bit binary equivalent. Following are the steps to convert an octal
number into its binary equivalent.
1. Take hexadecimal number.
2. Convert each hexadecimal digit/bit into four-bit binary equivalent.
3. Combine the four-bit binary section of each hexadecimal digit/bit by removing the space
to get equivalent binary number.
Eg. Determine binary equivalent of (5AF)16
Hexadecimal Number 5=5 A = 10 F = 15
Binary Coded Value 0101 1010 1111

So by combining the four bits of the binary coded values we have 010110101111
Thus binary equivalent of (5AF)8 is (010110101111)2
S.P. Chauhan 67
Converting from a base other than 10 to another base other than 10
Shortcut method for Hexadecimal to Binary:-
So a hexadecimal number can be converted into binary by converting each hexadecimal
digit to its 4 bit binary equivalent. Sixteen possible hexadecimal digits and their binary
equivalents are as follows:

S.P. Chauhan 68
Converting from a base other than 10 to another base other than 10
Shortcut method for Hexadecimal to Binary:-

S.P. Chauhan 69
Converting from a base other than 10 to another base other than 10
Shortcut method for Hexadecimal fraction to Binary Fraction:-
The steps of this conversion are similar to that of hexadecimal to binary conversion.
Eg. Determine the binary equivalent of (2B.6C)16
Hexadecimal Number 2 B = 11 . 6 C
Binary Coded Value 0010 1011 . 0110 1100
So by combining the four bits of the binary coded values we have 00101011.0110110
Thus binary equivalent of (2BC.6C)8 is (010.011011101)2
Eg. Determine the binary equivalent of (576E.34DF)16
Hexadecimal Number 5 7 6 E = 14 . 3 4 D = 13 F = 15
Binary Coded Value 0101 0111 0110 1110 . 0011 0100 1101 1111
So by combining the four bits of the binary coded values we have 0101011101101110.0011010011011111
Thus binary equivalent of (576E.34DF)16 is (0101011101101110.0011010011011111)2

S.P. Chauhan 70
Converting from a base other than 10 to another base other than 10
Shortcut method for Hexadecimal to Octal:-
Following are the steps to convert a hexadecimal number into its octal equivalent.
1. Take an hexadecimal number.
2. Convert every hexadecimal digit/bit into four-bit binary equivalent.
3. Combine four-bit binary section of each hexadecimal digit/bit by removing the space.
4. Divide the binary number into groups of three bit section starting from the LSB (i.e.
right ) to MSB (i.e. left)for integer part. So each group will represents an octal digit.
Depending on the number of bit, some time it may require to add zero to the MSB to
complete the grouping of four bits
5. Convert each group of three binary bits/digits to one octal digit.
So hexadecimal number is first converted into binary. This binary equivalent is then
converted into octal.

S.P. Chauhan 71
Converting from a base other than 10 to another base other than 10
Shortcut method for Hexadecimal to Octal:-

S.P. Chauhan 72
Converting from a base other than 10 to another base other than 10
Shortcut method for Hexadecimal to Octal:-
Eg. Determine hexadecimal equivalent of (2B6)16.
Hexadecimal Number 2 B = 11 6
Binary Coded Value 0010 1011 0110
Combining four bit binary blocks, we have 001010110110
Now divide the above binary bits into the group of three bits from LSB.
001 010 110 110
Octal Value 1 2 6 6
So octal equivalent of (2B6)16 is (1266)8
Eg. Determine octal equivalent of (5DE247)16.
Hexadecimal Number 5 D E 2 4 7
Binary Coded Value 0101 1101 1110 0010 0100 0111 So octal
Combining four bit binary blocks, we have 010111011110001001000111 equivalent of
Now divide the above binary bits into the group of three bits from LSB. (5DE247)16 is
010 111 011 110 001 001 000 111 (27361107)16

Hexadecimal Value 2 7 3 6 1 1 0 7 S.P. Chauhan 73


Converting from a base other than 10 to another base other than 10
Shortcut method for Hexadecimal Fraction to Octal Fraction:-
The method of conversion is based on the same procedure, as discussed in
hexadecimal to octal conversion.
1. Take any hexadecimal number.
2. Convert every hexadecimal digit/bit into four-bit binary equivalent.
3. Combine four-bit binary section of each hexadecimal digit/bit by removing the space.
4. Divide the binary number into groups of three bit section starting from the LSB (i.e.
right ) to MSB (i.e. left)for integer part and from MSB (i.e. left) to LSB (i.e. right) for
fraction part. So each group will represent an octal digit. Depending on the number of
bit, some time it may require to add zero to the MSB or to LSB to complete the
grouping of four bits
5. Convert each group of three binary bits/digits to one octal digit.
So hexadecimal fractional number is first converted into binary fraction. This binary
fraction equivalent is then converted into octal fraction

S.P. Chauhan 74
Converting from a base other than 10 to another base other than 10
Shortcut method for hexadecimal Fraction to Octal Fraction:-
Eg. Determine octal equivalent of (4.3C)16.
Hexadecimal Number 4 . 3 C
Binary Coded Value 0100 . 0011 1100
Combining four bit binary blocks, we have 0100.00111100
Now divide the above binary bits into the group of three bits from LSB/MSB.
000 100 . 001 111 000
Octal Value 0 4 . 1 7 0
So octal equivalent of (4.3C)16 is (04.170)8
Eg. Determine octal equivalent of (7A.64D)16.
Hexadecimal Number 7 A . 6 4 D
Binary Coded Value 0111 1010 . 0110 0100 1101
So octal
Combining four bit binary blocks, we have 01111010.011001001101 equivalent of
Now divide the above binary bits into the group of three bits from LSB/MSB. (7B.64D)16 is
001 111 010 . 011 001 001 101 (172.3115)8
Octal Value 1 7 2 . 3 1 1 5 S.P. Chauhan 75
Converting from a base other than 10 to another base other than 10
Shortcut method for hexadecimal Fraction to Octal Fraction:-
Eg. Determine octal equivalent of (4.3C)16.
Hexadecimal Number 4 . 3 C
Binary Coded Value 0100 . 0011 1100
Combining four bit binary blocks, we have 0100.00111100
Now divide the above binary bits into the group of three bits from LSB/MSB.
000 100 . 001 111 000
Octal Value 0 4 . 1 7 0
So octal equivalent of (4.3C)16 is (04.170)8
Eg. Determine octal equivalent of (7B.64D)16.
Hexadecimal Number 7 B . 6 4 D
Binary Coded Value 0111 1010 . 0110 0100 1101
So octal
Combining four bit binary blocks, we have 01111010.011001001101 equivalent of
Now divide the above binary bits into the group of three bits from LSB/MSB. (7B.64D)16 is
001 111 010 . 011 001 001 101 (172.3115)8
Octal Value 1 7 2 . 3 1 1 5 S.P. Chauhan 76
Conversion process of number system from a base to another base

S.P. Chauhan 77

You might also like