A binary number system with 2n bits, all of the which are 1's has

A binary number system with 2n bits, all of the which are 1's has
| A binary number system with 2n bits, all of the which are 1's has the value.

A. 2<sup>2n</sup> - 1

B. 2<sup>2n</sup>

C. 2<sup>2n</sup> + 1

D. 2 &times; 2<sup>n-1</sup>

Please scroll down to see the correct answer and solution guide.

Right Answer is: A

SOLUTION

Concept:

A binary number with n bits has a range from 0 to 2n - 1 in decimal equivalent.

With all the bits = 0, the decimal equivalent is 0.

With all the bits = 1, the decimal equivalent is 2n - 1.

Application:

Given binary number is of 2n bits. The range will be:

When all the bits are 0, the decimal equivalent will be 0.

When all the bits = 1, the decimal equivalent will be 22n - 1.

Example:

Let n = 3 bits. ∴ 2n = 2 × 3 = 6 bits.

With all the bits = 1, we get (111111)2

The decimal equivalent = 63 = 22n - 1.