EDPT Boolean Logic and Binary Operations 2 — Questions and Answers
Question 1: What does the Boolean expression A OR B evaluate to when A=0 and B=1?
- 0
- 1 (Correct answer)
- Undefined
- Depends on context
Correct answer: 1
OR returns 1 if at least one input is 1, so 0 OR 1 = 1.
Question 2: What is the result of NOT(1) in Boolean logic?
- 0 (Correct answer)
- 1
- 2
- -1
Correct answer: 0
The NOT operation inverts the bit, so NOT(1) = 0.
Question 3: Evaluate A AND (B OR C) when A=1, B=0, C=1.
- 0
- 1 (Correct answer)
- 2
- 3
Correct answer: 1
B OR C = 1, then 1 AND 1 = 1, so the expression evaluates to 1.
Question 4: Which logic gate outputs 1 only when both inputs are 1?
- OR
- XOR
- AND (Correct answer)
- NAND
Correct answer: AND
The AND gate outputs 1 only when all inputs are 1.
Question 5: What is 1 XOR 1?
- 0 (Correct answer)
- 1
- 2
- -1
Correct answer: 0
XOR (exclusive OR) outputs 0 when both inputs are the same.
Question 6: What is the bitwise complement of binary 1011?
- 0101
- 0100 (Correct answer)
- 1010
- 1100
Correct answer: 0100
Flipping every bit of 1011 gives 0100.
What does the Boolean expression A OR B evaluate to when A=0 and B=1?