Rajni wants to create a data-type for the number of books in her book case.…

2025

Rajni wants to create a data-type for the number of books in her book case. Her shelf can accommodate a maximum of 75 books. She allocates 7 bits to the data-type. Later another shelf is added to her bookcase. She realizes that she can still use the same data-type for storing the number of books in her bookcase. What is the maximum possible capacity of her new added shelf?

  1. A.

    50

  2. B.

    53

  3. C.

    59

  4. D.

    55

Attempted by 6 students.

Show answer & explanation

Correct answer: B

Concept: A data type built from n bits can represent exactly 2 raised to the power n distinct values — this total value-count is fixed purely by the number of bits, no matter how the values are later distributed across different physical locations.

Application: Applying this to the bookcase:

  1. A 7-bit data type can represent 27, which is 128, distinct values in total.

  2. The first shelf already uses 75 of those 128 values, since it holds 75 books.

  3. The problem states the SAME data type is now used for the whole bookcase, so the books on both shelves together must fit inside that one 128-value capacity — the new shelf does not get a fresh 128 values of its own.

  4. The largest count left for the new shelf is therefore 128 minus 75, which equals 53 books.

Cross-check: 75 plus 53 equals 128, exactly the full 7-bit capacity, so the total never exceeds what 7 bits can represent — confirming 53 is the maximum count the new shelf can hold under the same data type.

Explore the full course: Cdac C Cat Complete Preparation