How many bits are required to represent any decimal number in the range from 0…

2021

How many bits are required to represent any decimal number in the range from 0 to 2n -1 in base 2?

  1. A.

    n

  2. B.

    n-1

  3. C.

    2n-1

  4. D.

    n+1

Attempted by 264 students.

Show answer & explanation

Correct answer: A

The maximum value that can be represented by n binary bits is calculated using the formula:

Max Value = 2n-1

Example: If n = 3 bits, the range is 0 to 23 - 1, which is 0 to 7.

Binary range for 3 bits: 000 to 111

Explore the full course: Up Lt Grade Assistant Teacher 2025