Propositional Logic – WFF, truth tables, logic gates, adder circuits Quiz - ICSE Class 11 Computer Science
Free practice quiz: Propositional Logic – WFF, truth tables, logic gates, adder circuits (ICSE Class 11 Computer Science). 62 multiple-choice questions with answers and explanations. Play online, no sign-up needed.
Play all 62 questions freeSample questions
Which of the following is NOT a well-formed formula (WFF) in propositional logic?
- (P ∧ Q)
- ¬(P ∨ ¬Q)
- P → Q ↔ R
- P ∧ ¬ ∨ Q
Show answer
Answer: D. P ∧ ¬ ∨ Q
A WFF must have balanced parentheses and operators applied to propositional variables or other WFFs. 'P ∧ ¬ ∨ Q' has an operator '¬' applied to nothing, and an operator '∨' with missing operands, making it ill-formed.
Consider the propositional formula (P ∨ ¬Q) ∧ R. If P is True, Q is True, and R is False, what is the truth value of the formula?
- True
- False
- Neither True nor False
- Depends on operator precedence
Show answer
Answer: B. False
First, evaluate ¬Q. Since Q is True, ¬Q is False. Then, evaluate (P ∨ ¬Q): True ∨ False is True. Finally, evaluate True ∧ R. Since R is False, True ∧ False is False.
What is the result of XORing two identical bits (e.g., 0 XOR 0 or 1 XOR 1)?
- 0
- 1
- Undefined
- Depends on the system
Show answer
Answer: A. 0
The XOR (exclusive OR) operation outputs 1 only when the inputs are different. When the inputs are the same (0 XOR 0 or 1 XOR 1), the output is 0.
Consider a 2-bit adder circuit. What are the maximum number of bits required to represent the sum of two 2-bit numbers?
- 2 bits
- 3 bits
- 4 bits
- 5 bits
Show answer
Answer: B. 3 bits
The largest 2-bit number is 3 (binary 11). The sum of two such numbers is 3 + 3 = 6. In binary, 6 is represented as 110, which requires 3 bits. The maximum sum of two n-bit numbers is 2 * (2^n - 1). For n=2, this is 2 * (2^2 - 1) = 2 * 3 = 6. 6 in binary is 110, requiring 3 bits. The carry-out from the most significant bit might need an extra bit.
What is the primary purpose of using truth tables in propositional logic?
- To define new logical connectives.
- To determine the validity of logical arguments and the truth value of complex formulas.
- To simplify complex boolean expressions.
- To represent the physical layout of logic gates.
Show answer
Answer: B. To determine the validity of logical arguments and the truth value of complex formulas.
Truth tables systematically list all possible truth value combinations for the variables in a formula and show the resulting truth value of the formula, thus helping to analyze its properties.