Convert (138.32)<sub>10</sub> to i. Binary ii. Octal iii. Hexadecimal


Q.) Convert (138.32)10 to i. Binary ii. Octal iii. Hexadecimal

Subject: Digital Systems

Answer:

Converting a decimal number to binary, octal, and hexadecimal involves two different processes for the integer and fractional parts. Let's break down the conversion process for each number system.

i. Binary Conversion:

For the integer part (138):

  1. Divide the number by 2.
  2. Write down the remainder.
  3. Replace the number with the quotient.
  4. Repeat the process until the quotient is 0.
Division by 2 Quotient Remainder
138 / 2 69 0
69 / 2 34 1
34 / 2 17 0
17 / 2 8 1
8 / 2 4 0
4 / 2 2 0
2 / 2 1 0
1 / 2 0 1

Reading the remainders from bottom to top gives the binary equivalent of 138 as 10001010.

For the fractional part (0.32):

  1. Multiply the fraction by 2.
  2. Write down the whole number part.
  3. Replace the fraction with the fractional part of the result.
  4. Repeat the process until the fraction is 0 or until you have enough accuracy.
Multiplication by 2 Whole Number Fraction
0.32 * 2 0 0.64
0.64 * 2 1 0.28
0.28 * 2 0 0.56
0.56 * 2 1 0.12
0.12 * 2 0 0.24
0.24 * 2 0 0.48
0.48 * 2 0 0.96
0.96 * 2 1 0.92

Reading the whole numbers from top to bottom gives the binary equivalent of 0.32 as 0.01011000. Therefore, (138.32)10 = (10001010.01011000)2.

ii. Octal Conversion:

For the integer part, we can convert the binary equivalent to octal by grouping the binary digits into sets of three from right to left, then replacing each group with the corresponding octal digit.

Binary Octal
001 1
000 0
101 5
010 2

So, the octal equivalent of 138 is 210.

For the fractional part, we group the binary digits into sets of three from left to right, then replace each group with the corresponding octal digit.

Binary Octal
010 2
110 6
000 0

So, the octal equivalent of 0.32 is 0.260. Therefore, (138.32)10 = (210.260)8.

iii. Hexadecimal Conversion:

For the integer part, we can convert the binary equivalent to hexadecimal by grouping the binary digits into sets of four from right to left, then replacing each group with the corresponding hexadecimal digit.

Binary Hexadecimal
1010 A
0010 2
0001 1

So, the hexadecimal equivalent of 138 is 8A.

For the fractional part, we group the binary digits into sets of four from left to right, then replace each group with the corresponding hexadecimal digit.

Binary Hexadecimal
0101 5
1000 8

So, the hexadecimal equivalent of 0.32 is 0.58. Therefore, (138.32)10 = (8A.58)16.