Decimal to Binary Conversion

Decimal to Binary Conversion

Convert each decimal number to binary using the sum-of-weights method:

(a) 23
(b) 57
(c) 45.5
Convert each decimal number to binary using the repeated division-by-2 method (repeated multiplication-by-2 for fractions):

(a) 14
(b) 21
(c) 0.375

The correct answer and explanation is:

Decimal to Binary Conversion Using Sum-of-Weights Method

Sum-of-Weights Method Explanation

The sum-of-weights method involves determining the binary representation of a decimal number by finding which powers of 2 (weights) add up to the decimal number. Starting from the largest power of 2 less than or equal to the number, subtract and continue until the remainder is zero.

Solutions

  1. (a) 23
    • Largest power of 2 ≤ 23 is 24=162^4 = 16. Subtract: 23−16=723 – 16 = 7.
    • Largest power of 2 ≤ 7 is 22=42^2 = 4. Subtract: 7−4=37 – 4 = 3.
    • Largest power of 2 ≤ 3 is 21=22^1 = 2. Subtract: 3−2=13 – 2 = 1.
    • Largest power of 2 ≤ 1 is 20=12^0 = 1. Subtract: 1−1=01 – 1 = 0.
    • Binary: 23=10111223 = 10111_2.
  2. (b) 57
    • Largest power of 2 ≤ 57 is 25=322^5 = 32. Subtract: 57−32=2557 – 32 = 25.
    • Largest power of 2 ≤ 25 is 24=162^4 = 16. Subtract: 25−16=925 – 16 = 9.
    • Largest power of 2 ≤ 9 is 23=82^3 = 8. Subtract: 9−8=19 – 8 = 1.
    • Largest power of 2 ≤ 1 is 20=12^0 = 1. Subtract: 1−1=01 – 1 = 0.
    • Binary: 57=111001257 = 111001_2.
  3. (c) 45.5
    • Integer part: 4545. Use sum-of-weights: 45=101101245 = 101101_2.
    • Fractional part: 0.5=2−1=0.120.5 = 2^{-1} = 0.1_2.
    • Binary: 45.5=101101.1245.5 = 101101.1_2.

Decimal to Binary Conversion Using Division-by-2 Method

Explanation

For integers, repeatedly divide the number by 2, noting the remainders. The binary result is the remainders read from bottom to top. For fractions, repeatedly multiply by 2 and note the integer part. The result is the integer parts read from top to bottom.

Solutions

  1. (a) 14
    • Division-by-2:
      14÷2=714 ÷ 2 = 7 remainder 00,
      7÷2=37 ÷ 2 = 3 remainder 11,
      3÷2=13 ÷ 2 = 1 remainder 11,
      1÷2=01 ÷ 2 = 0 remainder 11.
    • Binary: 14=1110214 = 1110_2.
  2. (b) 21
    • Division-by-2:
      21÷2=1021 ÷ 2 = 10 remainder 11,
      10÷2=510 ÷ 2 = 5 remainder 00,
      5÷2=25 ÷ 2 = 2 remainder 11,
      2÷2=12 ÷ 2 = 1 remainder 00,
      1÷2=01 ÷ 2 = 0 remainder 11.
    • Binary: 21=10101221 = 10101_2.
  3. (c) 0.375
    • Multiply-by-2:
      0.375×2=0.750.375 × 2 = 0.75, integer part: 00,
      0.75×2=1.50.75 × 2 = 1.5, integer part: 11,
      0.5×2=1.00.5 × 2 = 1.0, integer part: 11.
    • Binary: 0.375=0.01120.375 = 0.011_2.

Explanation of Methods (300 Words)

The sum-of-weights method is conceptually intuitive because it directly builds the binary representation by identifying which powers of 2 contribute to the number. It’s particularly useful for understanding the breakdown of a decimal into binary and is helpful when manual calculation is required.

The division-by-2 method is more systematic and algorithmic. For integers, repeatedly dividing by 2 and keeping track of the remainders ensures a reliable way to generate the binary representation. Starting from the largest binary place (most significant bit), this method guarantees all bits are calculated sequentially.

For fractional values, multiplying by 2 is equally systematic. Each multiplication identifies the next binary digit by extracting the integer part of the product, building the fractional binary representation from left to right.

Both methods achieve the same result but cater to different scenarios. The sum-of-weights method offers insight into binary decomposition, while the division/multiplication methods are procedural, making them suitable for programming and repetitive calculations.

Scroll to Top