EDPT Boolean Logic and Binary Operations 4 — Questions and Answers
Question 1: What is the result of the Boolean expression: NOT (A AND B) when A=1 and B=0?
- 0
- 1 (Correct answer)
- A
- B
Correct answer: 1
A AND B = 1 AND 0 = 0, and NOT 0 = 1.
Question 2: Which binary number equals decimal 13?
- 1011
- 1101 (Correct answer)
- 1110
- 1001
Correct answer: 1101
1101 in binary = 8+4+0+1 = 13 in decimal.
Question 3: In a truth table for a 3-input AND gate, how many rows have an output of 1?
- 1 (Correct answer)
- 2
- 3
- 4
Correct answer: 1
An AND gate outputs 1 only when ALL inputs are 1, which occurs in exactly 1 of 8 possible input combinations.
Question 4: What is 1010 XOR 1100 in binary?
- 0110 (Correct answer)
- 0111
- 1110
- 0010
Correct answer: 0110
XOR compares bit-by-bit: 1^1=0, 0^1=1, 1^0=1, 0^0=0, giving 0110.
Question 5: Which logic gate produces an output of 0 only when ALL inputs are 1?
- OR
- AND
- NAND (Correct answer)
- NOR
Correct answer: NAND
A NAND gate is the inverse of AND, so it outputs 0 only when all inputs are 1.
Question 6: What is the two's complement representation of -6 in an 8-bit system?
- 11111001
- 11111010 (Correct answer)
- 10000110
- 01111010
Correct answer: 11111010
+6 is 00000110; inverting gives 11111001, and adding 1 gives 11111010.
Question 7: Simplify using Boolean algebra: A OR (A AND B)
- A AND B
- A OR B
- A (Correct answer)
- B
Correct answer: A
By the absorption law, A OR (A AND B) simplifies to A.
What is the result of the Boolean expression: NOT (A AND B) when A=1 and B=0?