1. Binary to Octal Conversion, 2. Octal to Binary Conversion, 3. Binary to Hexadecimal Conversion, 4. Hexadecimal to Binary Conversion, 5. Octal to Hexadecimal Conversion, 6. Hexadecimal to Octal Conversion, 7. Converting any Radix to Decimal, 8. Conversion of Decimal Number to any Radix Number
Conversion of Numbers
from One Radix to Another Radix
•
The base for octal number is 8 and the base for binary number is 2.
•
The base for octal number is the third power of the base for binary numbers.
Therefore, by grouping 3 digits of binary numbers and then converting each
group digit to its octal equivalent we can convert binary number to its octal
equivalent.
Example: 1
Convert 10101101.0111
to octal equivalent.
Solution :
Step 1 :
Make
group of 3–bits starting from LSB for integer part and MSB for fractional part,
by adding 0s at the end, if required.
Step 2 :
Write
equivalent octal number for each group of 3–bits.

(10101101.0111)2 = (255.34)8
•
Conversion from octal to binary is a reversal of the process explained in the
previous section. Each digit of the octal number is individually converted to
its binary equivalent to get octal to binary conversion of the number.
Example: 2
Convert (125.62)8
to binary.
Solution :
Step 1 :
Write
equivalent 3–bit binary number for each octal digit.
Step 2 :
Remove
any leading or trailing zeros.

(125.62)8 =
(1010101.11001)2
•
The base for hexadecimal numbers is 16 and the base for binary numbers is 2.
•
The base for hexadecimal number is the fourth power of the base for binary
numbers. Therefore, by grouping 4 digits of binary numbers and then converting
each group digit to its hexadecimal equivalent we can convert binary number to
its hexadecimal equivalent.
Example: 3
Convert 1101101110
.1001101 to hexadecimal equivalent
Solution :
Step 1 :
Make
group of 4–bits starting from LSB for integer part and MSB for fractional part,
by adding Os at the end, if required.
Step 2 :
Write
equivalent hexadecimal number for each group of 4–bits.

(1101101110.1001101)2 = (36E.9A)16
•
Conversion from hexadecimal to binary is a reversal of the process explained in
the previous section. Each digit of the hexadecimal number is individually
converted to its binary equivalent to get hexadecimal to binary conversion of
the number.
Convert (8A9. B4)16
to binary.
Solution :
Step 1 :
Write
equivalent 4–bit binary number of each hexadecimal digit.
Step 2 :
Remove
any leading or trailing zeros.

(8A9.
B4)16 = (1000 1010 1001.101101)2
•
The easiest way to convert octal number to hexadecimal number is given below.
1.
Convert octal number to its binary equivalent.
2.
Convert binary number to its hexadecimal equivalent.
Example: 5
Convert (615.25)8
to its hexadecimal equivalent.
Solution :
Step 1 :
Write
equivalent 3–bit binary number for each octal digit.
Step 2 :
Make
group of 4–bits starting from LSB for integer part and MSB for fractional part
by adding 0s at the end, if required.
Step 3 :
Write
equivalent octal number for each group to 4–bits.

The
easiest way to convert hexadecimal number to octal number is given below.
1.
Convert hexadecimal number to its binary equivalent.
2.
Convert binary number to its octal equivalent.
Example: 6
Convert (BC66. AF)16
to its octal equivalent.
Solution :
Step 1 :
Write
equivalent 4–bit binary number for each hexadecimal digit.
Step 2 :
Make
group of 3–bits starting from LSB for integer part and MSB for fractional part
by adding Os at the end, if required.
Step 3 :
Write
equivalent octal number for each group of 3–bits.

• In general, numbers can be represented as
N
= An–1 r n–1 + An–2
rn–2 + … + A 1r1
+ A 0 r0 + A –1 r –1 + A –2 r
–2 + … C –m r –m
where
N
= Number in decimal
A
= Digit
r
= Radix or base of a number system
n
= The number of digits in the integer portion of number
m
= The number of digits in the fractional portion of number
•
From this general equation we can convert number with any radix into its
decimal equivalent. This is illustrated using following example.
Convert (3102.12)4
to its decimal equivalent.
Solution :
N
= 3×43 + 1×42 + 0×41 + 2×40 + 1×4–1
+ 2×4–2
= 192 + 16 + 0 + 2 + 0.25 + 0.125 = 210.37510
Determine the value of
base x, if: (193)x = (623)8.
Solution :
(193)x
= (623)8
Converting
octal into decimal :
6×82
+ 2×8 + 3 = (403)10 = (623)8
(193)x = 1×x2
+ 9×x + 3×x0 = (403)10
x2 + 9x + 3 = 403
x = 16 or x = –25
Negative
is not applicable x = 16
(193)16 = (623)8
Step 1 :
Convert
integer part.
Step 2 :
Convert
fractional part.
•
The conversion of integer part is accomplished by successive division method
and the conversion of fractional part is accomplished by successive
multiplication method.
1.
Divide the integer part of decimal number by desired base number, store
quotient (Q) and remainder (R).
2.
Consider quotient as a new decimal number and repeat step 1 until quotient becomes
0.
3.
List the remainders in the reverse order.
1.
Multiply the fractional part of decimal number by desired base number.
2.
Record the integer part of product as carry and fractional part as new
fractional part.
3.
Repeat steps 1 and 2 until fractional part of product becomes 0 or until you
have many digits as necessary for your application.
4.
Read carries downwords to get desired base number.
Example: 9
Convert 12.125 decimal
into binary.
Solution :
Integer
part : Conversion of integer part by successive division
method.

(12)10 = (1
1 0 0)2
Fractional
part : Conversion of fractional part by successive
multiplication method.

(0.125)10 = (0.001)2
(12.125)10 = (1100.001)2
Example: 10
Convert 658.825 decimal
into octal.
Solution
Integer
part : Conversion of integer part by successive division
method.

(658)10
= (1222)8
Fractional
part
:
Conversion of fractional part by successive multiplication method.

(0.825)10 = (0.646)8
(658.825)10 = (1222.646)8
In
this example, we have restricted fractional part up to 3 digits. This answer is
an approximate answer. To get more accurate answer we have to continue
multiplying by 8 until we have as many digits as necessary for our application.
Example: 11
Convert 5386.345
decimal into hexadecimal.
Solution :
Integer
part : Conversion of integer part by successive division
method.

(5386)10 = (150A)16
Fractional
part : Conversion of fractional part by successive
multiplication method.

(0.345)10 =
(0.585)16
(5386.345)10 = (150A.585)16
In
this example, we have restricted fractional part up to 3 digits. This answer is
an approximate answer. To get more accurate answer we have to continue
multiplying by 16 until we have as many digits as necessary for our
application.
Example:
12
The solution to the
quadratic equation x2 – 11x + 22 = 0 is x = 3 and x = 6. What is the
base of the numbers?
Solution :
Given
quadratic equation is x2 – 11x + 22 = 0 and it is given that x = 3 and x = 6
(x
− 3) (x − 6) = x2 – 11x + 22
The
numbers 3 and 6 are same in any base, whose value is more than 6.
i.e.,
(3)b
= (3)10
(6)b
= (6)10
where
b = Base
Solving
equation (1) we have,
(x2 – 9x+18)10 = (x2
– 11x + 22)b
Comparing
coefficients of x we have
(–9)10
= (–11)b
(9)10
= (11)b
9
= b1 + b0 = b + 1
b
= 8
or
comparing constants we have
(18)10
= (22)b
18
= 2b + 2
b
= 8
Example: 13
Determine the value of
b for the following:
i) (292)10
=(1204)ь
ii) (16)10 =
(100)b
Solution :
i)
(292)10 = 1×b3 + 2×b2 + 0×b1 + 4×b0
292
= b3+2b2 + 4
b
= 6
ii)
(16)10 = 1×b2 + 0×b1 + 0×b0 = b2
b
= 4
Example: 14
Convert (101101.1101)2
to decimal and hexadecimal form.
Solution :
D
= 1×25 + 0×24 + 1×23 + 1×22 + 0×21
+ 1×20 + 1×2–1 + 1×2–2 + 0×2–3 +
1×2–4
= 32 + 8 + 4 + 1 + 0.5 + 0.25 + 0.0625 =
45.8125

(101101.1101)2 = (45.8125)10 =
(2D.D)16
Example: 15
Convert the given
decimal numbers to their binary equivalent 108.364, 268.025.
Solution: i)

Restricting
fractional part upto 8 digits we have
(108.364)10 = (1101100.01011101)2
ii) Integer part

Restricting
fractional part upto 7 digit we have (268.025)10 =
(100001100.0000011)2
Example: 16
Convert the following
number from one base to other (65.342)8 = ( )7
[ Answer: (65.342)8 =
(1144.3042)7]
Example: 17
Convert the (153.513)10
to octal.
[ Answer: (231.4065)8 ]
Example: 18
Perform the following
code conversions: (1010.10)16 → (?)2 →(?)2
→(?)10
[ Answer:
(1000000010000.0001)2, (10020.02)8, (4112.0625)10
]
Example: 19
Convert (1947)10
into its equivalent octal and hexadecimal representations.
[ Answer:
(1947)10 = (79B)16 : (3633)8]
Digital Principles and Computer Organization: Chapter 1: Fundamentals of Digital Systems and Arithmetic : Tag: Digital, Computer : - Conversion of Numbers from One Radix to Another Radix
Digital Principles and Computer Organization
CS25C06 2nd Semester AIDS, CSE, IT, CSE(CY) Dept | 2025 Regulation | 2nd Semester 2025 Regulation
English Essentials II
EN25C02 2nd Semester | 2025 Regulation | 2nd Semester 2025 Regulation
Tamils and Technology தமிழர்களும் தொழில்நுட்பமும்
UC25H02 2nd Semester | 2025 Regulation | 2nd Semester 2025 Regulation
Linear Algebra
MA25C02 2nd Semester | 2025 Regulation
Applied Physics (CSIE) II
PH25C03 2nd Semester AIDS, CSE, IT, CSE(CY) Dept | 2025 Regulation | 2nd Semester 2025 Regulation
Digital Principles and Computer Organization
CS25C06 2nd Semester AIDS, CSE, IT, CSE(CY) Dept | 2025 Regulation | 2nd Semester 2025 Regulation
Basic Electrical and Electronics Engineering
EE25C01 2nd Semester | 2025 Regulation | 2nd Semester 2025 Regulation
Python for Data Science
AD25201 2nd Semester AIDS Dept | 2025 Regulation | 2nd Semester 2025 Regulation
Re-Engineering for Innovation
ME25C05 2nd Semester | 2025 Regulation | 2nd Semester 2025 Regulation
Python for Data Science - Laboratory
AD25201 2nd Semester AIDS Dept | 2025 Regulation | 2nd Semester 2025 Regulation