Digital logic: gates, K-maps & flip-flops worksheet with answers

Free printable Digital logic: gates, K-maps & flip-flops worksheet: 6 problems from easy to exam level, with an answer key. Print it or save it as a PDF.

For teachers: free to print, copy and use in class. Every new worksheet has new values and its own answer key. A link to ExamProblems on your course page is appreciated.

Name: ____________________   Date: ____________

1.Easy
A = 1B = 1C = 0N1G1G2G3F

The inputs of the logic circuit are A = 1, B = 1 and C = 0. Exactly one of its gates has the output 0. Click that gate.

A = 1B = 1C = 0
  1. 1N1
  2. 2G1
  3. 3G2
  4. 4G3
2.Easy
BAF

NAND and NOR are universal gates: any logic function can be built from one of them alone. What is the minimum number N of 2-input NAND gates needed to build the XOR function shown?

F = A ⊕ B
N =
3.Medium
ABC00011110011001131204151716

Use the Karnaugh map to find the minimal sum-of-products (SOP) form of F(A, B, C) = Σm(0, 2, 3, 5, 6, 7). How many literals L does it contain in total (a primed variable counts as one literal)?

F(A, B, C) = Σm(0, 2, 3, 5, 6, 7)
L =
4.Medium
MUXC′I0​1I1​0I2​CI3​ABS1​S0​F

A 4-to-1 multiplexer has its select inputs S₁ = A and S₀ = B, and its data inputs tied to I₀ = C′, I₁ = 1, I₂ = 0, I₃ = C. For how many of the 8 combinations of A, B and C is the output F = 1? Find N.

I₀ = C′I₁ = 1I₂ = 0I₃ = C
N =
5.Hard
CLKD1234567

A positive-edge-triggered D flip-flop starts with Q = 0 and receives the inputs shown. Click the first clock edge at which Q goes from 1 back to 0.

Q₀ = 0D
  1. 1clock edge 1
  2. 2clock edge 2
  3. 3clock edge 3
  4. 4clock edge 4
  5. 5clock edge 5
  6. 6clock edge 6
  7. 7clock edge 7
6.Hard
DQ3​Q3​DQ2​Q2​DQ1​Q1​DQ0​Q0​CLKRING

A 4-bit ring counter Q₃Q₂Q₁Q₀ starts at 1000. At every clock edge the bits shift one place to the right (Q₃ → Q₂ → Q₁ → Q₀) and Q₃ receives Q₀. Give the state Q = Q₃Q₂Q₁Q₀ as a decimal number after 9 clock edges.

Q₃Q₂Q₁Q₀ = 10009
Q =

Answer key

  1. 1. N1
  2. 2. N = 4
  3. 3. L = 5
  4. 4. N = 4
  5. 5. clock edge 3
  6. 6. Q = 4

Full step-by-step solutions: practise this topic on examproblems.com.