Logic Gates

1. Which of the following statements is true about an AND gate?

a)  Outputs 1 only if one of the inputs is 1.

b)  Outputs 1 only if both inputs are 1.

c)  Outputs 1 if at least one input is 0.

d)  Outputs the same value as both its inputs.

Answer:  b) Outputs 1 only if both inputs are 1.

Explanation: An AND gate only outputs a HIGH (1) when both of its inputs are HIGH (1).

2. What is the output of a NOT gate with an input of 0?

a)  0

b)  1

c)  Depends on the specific NOT gate.

d)  Undefined.

Answer:  b) 1

Explanation: A NOT gate inverts the input. So, if the input is 0, the output will be 1 (opposite of the input).

3. The truth table for an OR gate shows:

a)  Output is 1 only when both inputs are 1.

b)  Output is 1 only when one input is 1.

c)  Output is 0 only when both inputs are 0.

d)  Output is always 1.

Answer:  b) Output is 1 only when one input is 1.

Explanation: An OR gate outputs a HIGH (1) if at least one of its inputs is HIGH (1).

4. What is the output of an XOR gate when both inputs are 0?

a)  0

b)  1

c)  Cannot be determined.

d)  Depends on the specific XOR gate.

Answer:  b) 1

Explanation: An XOR gate outputs 1 when the number of 1s in the inputs is odd. Since both inputs are 0 (even), the output is 1.

5. Which gate is represented by the Boolean expression A + ¬A?

a)  AND

b)  OR

c)  XOR

d)  NAND

Answer:  c) XOR

Explanation: A + ¬A translates to A OR NOT(A), which is the expression for an XOR gate.

6. Which of the following statements is NOT true about a NAND gate?

a)  It is a combination of an AND gate and a NOT gate.

b)  Its output is the opposite of an AND operation.

c)  It can be used to implement any other logic gate.

d)  Its output is 1 only when both inputs are 1.

Answer:  d) Its output is 1 only when both inputs are 1.

Explanation: A NAND gate outputs 0 only when both inputs are 1, making it the opposite of an AND operation.

7. What is the output of a NOR gate if one of its inputs is 0?

a)  0

b)  1

c)  Cannot be determined.

d)  Depends on the specific NOR gate.

Answer:  b) 1

Explanation: A NOR gate outputs 1 only when both of its inputs are 0. So, if one input is 0, the output will be 1 regardless of the other input.

8. Which gate's output is always the opposite of the input?

a)  AND

b)  OR

c)  XOR

d)  NOT

Answer:  d) NOT

Explanation: A NOT gate's sole purpose is to invert the input signal.

9. What is the symbol for an AND gate?

a)  ∨

b)  ⊕

c)  ¬

d)  ⋅

Answer:  d) ⋅

Explanation: This symbol, resembling a dot, represents the AND operation.

10. Which Boolean expression represents an OR gate with inputs A and B?

a)  A ⋅ B

b)  A + B

c)  A ⊕ B

d)  ¬A ∧ ¬B

Answer:  b) A + B

Explanation: The "+" symbol in Boolean expressions represents the OR operation.