Miscellaneous problems · Exercise 79 of 100
Recognize a power of two
Each position in a binary numeral stands for a different power of two, starting with 1 at the right. A positive whole number is a power of two exactly when its binary form has a single 1, because that one position supplies the entire value.
Try it yourself
One tray holds 48 samples (110000 in binary) and another holds 64 (1000000 in binary). Which tray capacity is a power of two? Give its decimal value.
One-step hint
Inspect the lit bits in each binary capacity. A power of two uses exactly one place value, so look for a single 1.
Worked solution
- The two set bits in 110000 stand for 32 and 16. The capacity 48 uses both positions.
- The single set bit in 1000000 supplies the full capacity of 64, so 64 passes the test.