Learn AP Comp Sci

Problem of the Day

Wednesday, September 17, 2025


Problem:

The decimal number 237 is equivalent to the boolean number:

  1. 111111
  2. 11101101
  3. 11110101
  4. 11101011

Show solution:

The correct answer is b.

We can identify the boolean equivalent by subtracting out factors of 2, one at a time.

28 is 256, which is greater than 237, so let's start at one less than that:

  1. 27 = 128, which is less than 237, so we have 1 "128" in our binary number. Subtract out the 128 to find that we still have 109 left to account for.
  2. 26 = 64, which is less than 109, so we have 1 "64" in our binary number. Subtract out 64 to find that we still have 45 to count.
  3. 25 = 32, which is less than 45, so we have 1 "32" in our binary number. Subtract out 32 from 45 to get 13.
  4. 24 = 16, which is more than 13, so we have 0 "16"s in our number.
  5. 23 = 8, which is less than 13, so we have 1 "8" in our number. Subtract 8 from 13 to get the remaining 5.
  6. 22 = 4, which is less than 5, so we have 1 "4" in our number. Subtract 4 from 5 to get 1.
  7. 21 = 2, which is more than 1, so we have 0 "2"s.
  8. Finally, 20 = 1, which is what we have left, so we have 1 "1" in our number.

Put it all together and the binary equivalent is 11101101.