The number of binary digits in the binary representation of 257 are:
- A.8
- B.9
- C.7
- D.10
Show answer
Correct answer: B. 9
Explanation
The correct answer is B, 9. In the binary system every place stands for a power of two, and 257 is 256 plus 1, that is two raised to the eighth plus two raised to the zero. It is therefore written as 100000001, a one followed by seven zeros and another one, which is nine digits in all. A quicker way is to look for the largest power of two that fits inside the number: for 257 that is 256, so the highest place used is the ninth from the right, and every number from 256 up to 511 needs exactly nine binary digits. A is wrong because eight digits reach only up to 255, one short of 257. C is wrong because seven digits stop at 127. D is wrong because ten digits become necessary only from 512 onward. Exam tip: n binary digits count from 0 to two raised to n minus one, so 8 bits end at 255.