Question 14Asked in DSSSB TGT Computer Science (Technical), 7 Aug 2021, Shift 3

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

  1. An
  2. Bn − 1
  3. C2ⁿ − 1
  4. Dn + 1
Show answerHide answer

Correct answer: (A) n

Explanation

With n bits there are 2ⁿ combinations, which cover 0 to 2ⁿ − 1, so n bits are enough.

From DSSSB TGT Computer Science PYQ (Technical), 7 Aug 2021, Shift 3

This is question 14 of DSSSB TGT Computer Science PYQ (Technical), 7 Aug 2021, Shift 3. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.