Convert the following numbers as directed.


Q.) Convert the following numbers as directed.

Subject: Digital Logic Design

1. Convert the decimal number 123.45 to binary.

Solution:

  1. Divide the decimal number by 2 and note the remainder.
  2. Repeat step 1 with the quotient until the quotient is 0.
  3. Write the remainders in reverse order to obtain the binary representation.

123.45 ÷ 2 = 61 remainder 1

61 ÷ 2 = 30 remainder 1

30 ÷ 2 = 15 remainder 0

15 ÷ 2 = 7 remainder 1

7 ÷ 2 = 3 remainder 1

3 ÷ 2 = 1 remainder 1

1 ÷ 2 = 0 remainder 1

Therefore, 123.45 in binary is 1111011.1.

2. Convert the hexadecimal number A5C to decimal.

Solution:

  1. Multiply each hexadecimal digit by its corresponding power of 16.
  2. Add the products to obtain the decimal representation.

A = 10 × 16^2 = 2560

5 = 5 × 16^1 = 80

C = 12 × 16^0 = 12

Therefore, A5C in decimal is 2560 + 80 + 12 = 2652.

3. Convert the binary number 1101011 to decimal.

Solution:

  1. Multiply each binary digit by its corresponding power of 2.
  2. Add the products to obtain the decimal representation.

1 × 2^6 = 64

1 × 2^5 = 32

0 × 2^4 = 0

1 × 2^3 = 8

0 × 2^2 = 0

1 × 2^1 = 2

1 × 2^0 = 1

Therefore, 1101011 in decimal is 64 + 32 + 8 + 2 + 1 = 107.

4. Convert the octal number 357 to decimal.

Solution:

  1. Multiply each octal digit by its corresponding power of 8.
  2. Add the products to obtain the decimal representation.

3 × 8^2 = 192

5 × 8^1 = 40

7 × 8^0 = 7

Therefore, 357 in decimal is 192 + 40 + 7 = 239.