Engineering, Management, Agriculture and Veterinary MCQs are now live. FPSC, PPSC, EPE, IELTS & GRE coming soon.

Digital Electronics & Microprocessors: Logic Gates and Boolean Algebra

Electrical Engineering · Digital Electronics & Microprocessors

31 questions, each with the answer and a worked solution.

Practice interactively and track your score →
Question 1

What is the output of an AND gate?

  1. High only when all inputs are high
  2. Always low
  3. High when inputs are different
  4. High when any input is high
Show answer & solution

Answer: (A) High only when all inputs are high

AND implements logical multiplication.

Question 2

What is the output of an OR gate?

  1. High only when all inputs are high
  2. High when at least one input is high
  3. Always high
  4. High when inputs are equal
Show answer & solution

Answer: (B) High when at least one input is high

OR implements logical addition.

Question 3

Which gates are called universal gates?

  1. AND and OR
  2. NOT and buffer
  3. XOR and XNOR
  4. NAND and NOR
Show answer & solution

Answer: (D) NAND and NOR

Any logic function can be built using only NAND or only NOR gates.

Question 4

What is the output of an XOR gate?

  1. High when the inputs are different
  2. Always low
  3. High when the inputs are the same
  4. High only when both inputs are high
Show answer & solution

Answer: (A) High when the inputs are different

XOR is used in adders and parity circuits.

Question 5

What is the output of an XNOR gate?

  1. Always high
  2. High when the inputs are equal
  3. High when inputs differ
  4. Always low
Show answer & solution

Answer: (B) High when the inputs are equal

XNOR is an equality detector.

Question 6

When is the output of a two-input NOR gate high?

  1. When inputs are different
  2. When both inputs are high
  3. When any input is high
  4. Only when both inputs are low
Show answer & solution

Answer: (D) Only when both inputs are low

NOR is OR followed by NOT.

Question 7

When is the output of a two-input NAND gate low?

  1. When any input is low
  2. Only when both inputs are high
  3. When inputs are different
  4. When both inputs are low
Show answer & solution

Answer: (B) Only when both inputs are high

NAND is AND followed by NOT.

Question 8

What does De Morgan's first theorem state?

  1. (A + B)′ = A′ + B′
  2. A + A = 0
  3. (A · B)′ = A · B
  4. (A + B)′ = A′ · B′
Show answer & solution

Answer: (D) (A + B)′ = A′ · B′

The complement of a sum is the product of complements.

Question 9

What does De Morgan's second theorem state?

  1. (A · B)′ = A′ + B′
  2. (A · B)′ = A′ · B′
  3. A · A′ = 1
  4. A + B = A · B
Show answer & solution

Answer: (A) (A · B)′ = A′ + B′

The complement of a product is the sum of complements.

Question 10

What is the result of A + A′ in Boolean algebra?

  1. 0
  2. A
  3. A′
  4. 1
Show answer & solution

Answer: (D) 1

A variable ORed with its complement is always 1.

Question 11

What is the result of A · A′ in Boolean algebra?

  1. A
  2. 0
  3. 1
  4. A′
Show answer & solution

Answer: (B) 0

A variable ANDed with its complement is always 0.

Question 12

What does the absorption law A + AB simplify to?

  1. A
  2. B
  3. AB
  4. A + B
Show answer & solution

Answer: (A) A

A covers all cases where AB is true.

Question 13

What does A + A′B simplify to?

  1. A′ + B
  2. A
  3. AB
  4. A + B
Show answer & solution

Answer: (D) A + B

This is a common Boolean identity.

Question 14

How many rows are there in the truth table of a three-input logic function?

  1. 3
  2. 6
  3. 8
  4. 9
Show answer & solution

Answer: (C) 8

A truth table with n inputs has 2ⁿ rows.

Question 15

What is a Karnaugh map used for?

  1. Measuring logic voltages
  2. Simplifying Boolean expressions graphically
  3. Converting numbers
  4. Designing analogue filters
Show answer & solution

Answer: (B) Simplifying Boolean expressions graphically

Adjacent cells differ in only one variable.

Question 16

What is a minterm?

  1. A product term containing every variable once, in true or complemented form
  2. A single variable
  3. A constant
  4. A sum term of all variables
Show answer & solution

Answer: (A) A product term containing every variable once, in true or complemented form

SOP expressions are sums of minterms.

Question 17

What are don't-care conditions in K-map simplification?

  1. Input combinations that never occur or whose output does not matter, used to simplify further
  2. Errors in the map
  3. Inputs that must always be 1
  4. Invalid gates
Show answer & solution

Answer: (A) Input combinations that never occur or whose output does not matter, used to simplify further

They may be treated as 0 or 1.

Question 18

What is a sum-of-products (SOP) expression?

  1. A NOT expression only
  2. An OR of AND terms
  3. An AND of OR terms
  4. A single gate
Show answer & solution

Answer: (B) An OR of AND terms

SOP forms map directly to AND–OR or NAND–NAND circuits.

Question 19

What is the standard supply voltage of classic TTL logic?

  1. 1.5 V
  2. 5 V
  3. 12 V
  4. 24 V
Show answer & solution

Answer: (B) 5 V

TTL uses bipolar transistors.

Question 20

What is the main advantage of CMOS logic over TTL?

  1. Higher static power
  2. Lower noise immunity
  3. It uses bipolar transistors
  4. Very low static power consumption
Show answer & solution

Answer: (D) Very low static power consumption

CMOS dominates modern ICs.

Question 21

What is fan-out of a logic gate?

  1. The number of gate inputs that its output can drive reliably
  2. The number of its inputs
  3. Its delay
  4. Its power
Show answer & solution

Answer: (A) The number of gate inputs that its output can drive reliably

Exceeding fan-out causes logic level errors.

Question 22

What is propagation delay of a logic gate?

  1. The heat produced
  2. The supply voltage
  3. The number of inputs
  4. The time between an input change and the resulting output change
Show answer & solution

Answer: (D) The time between an input change and the resulting output change

Delays limit the maximum operating speed.

Question 23

What is noise margin in digital logic?

  1. The supply current
  2. The delay
  3. The fan-out
  4. The amount of noise voltage a logic level can tolerate without causing an error
Show answer & solution

Answer: (D) The amount of noise voltage a logic level can tolerate without causing an error

Larger noise margins mean better noise immunity.

Question 24

Why are tri-state buffers connected to a shared microprocessor data bus?

  1. To prevent bus contention by allowing only one device to drive the bus at a time
  2. To increase memory capacity
  3. To generate clock pulses
  4. To decode peripheral addresses
Show answer & solution

Answer: (A) To prevent bus contention by allowing only one device to drive the bus at a time

The third state is high impedance.

Question 25

What are the three states of a tri-state buffer output?

  1. On, off and short circuit
  2. High, low and high impedance
  3. High, low and medium
  4. Zero, one and two
Show answer & solution

Answer: (B) High, low and high impedance

In the high-impedance state the output is effectively disconnected.

Question 26

What is the logic expression of a NAND gate with inputs A and B?

  1. (A + B)′
  2. (AB)′
  3. A + B
  4. AB
Show answer & solution

Answer: (B) (AB)′

Its output is the complement of AND.

Question 27

How many two-input NAND gates are needed to make a NOT gate?

  1. Three
  2. Four
  3. One
  4. Two
Show answer & solution

Answer: (C) One

Tie both inputs together.

Question 28

What is the Boolean expression for an XOR gate with inputs A and B?

  1. AB′ + A′B
  2. A + B
  3. AB
  4. AB + A′B′
Show answer & solution

Answer: (A) AB′ + A′B

XNOR is AB + A′B′.

Question 29

What is the output of a NOT gate when its input is 1?

  1. 1
  2. High impedance
  3. Undefined
  4. 0
Show answer & solution

Answer: (D) 0

A NOT gate inverts its input.

Question 30

What does an open-collector output require to produce a high logic level?

  1. An external pull-up resistor
  2. A diode only
  3. No connection
  4. A capacitor
Show answer & solution

Answer: (A) An external pull-up resistor

Open-collector outputs allow wired-AND connections.

Question 31

What is the result of A ⊕ A?

  1. A′
  2. A
  3. 1
  4. 0
Show answer & solution

Answer: (D) 0

XORing a variable with itself always gives 0.

Practice these 31 questions interactively →