Question 28Asked in DSSSB PGT Computer Science (Technical), 11 Jul 2021

How many rows are there in a truth table having 'n' variables?

  1. A2n
  2. Bn²
  3. Clog₂n
  4. D2ⁿ
Show answerHide answer

Correct answer: (D) 2ⁿ

Explanation

Each of the n variables can be 0 or 1, giving 2ⁿ input combinations, so the truth table has 2ⁿ rows.

From DSSSB PGT Computer Science PYQ (Technical), 11 Jul 2021

This is question 28 of DSSSB PGT Computer Science PYQ (Technical), 11 Jul 2021. 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.