How many bits are required to represent any decimal number in the range from 0 to 2ⁿ − 1 in base 2?
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.
Correct answer: (A) n
Explanation
With n bits there are 2ⁿ combinations, which cover 0 to 2ⁿ − 1, so n bits are enough.
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.