Which of eight switch settings will light the lamp at your school quiz?
At your school quiz, three switches control a lamp. Each switch has two positions, so there are eight possible settings. Can you work out exactly which settings light the lamp without trying them all?
AND gives one when both inputs are one. NOT flips its single input. OR gives one when at least one input is one. XOR gives one when exactly one input is one. In our circuit, the lamp lights when the final output is one.
Trace A and B into AND. Then trace C into NOT. The small circle shows that NOT flips C. Both gate outputs feed into OR to give Q. Write the two intermediate results in brackets, with OR between them.
Set A to zero, B to one and C to zero. Work out what comes out of AND, then what comes out of NOT. Which pair reaches OR? Pick the answer that lists AND first.
To list all eight settings, keep A, B and C in that order. Change A every four rows, B every two rows and C every row. Look what happens if C stops alternating halfway down: two settings repeat and two are missing.
Read row one zero one as A equals one, B equals zero and C equals one. AND gives zero because B is zero. NOT flips C to zero. Now OR receives two zeros, so Q is zero and the lamp stays off.
Now use row one one one, so A, B and C are all one. Calculate the two intermediate results before you decide whether the lamp lights. Pick the answer that gives the AND result, the NOT result and then Q.
Start with the four rows where A is zero. Read each three digit setting in A, B, C order. The AND column stays zero because A is zero. The NOT column flips C on every row, so Q follows that column. The lamp lights for zero zero zero and zero one zero.
Now A is one in the last four rows. AND gives zero while B is zero, then one when B is one. NOT still flips C in every row. Wherever either intermediate column has a one, Q is one. That happens for one zero zero, one one zero and one one one.
Draw a logic circuit for the Boolean expression shown. The brackets tell you to send A and B into AND and C into NOT. Feed those outputs into XOR instead of OR. Draw the extra curve on the input side of the XOR symbol, then label the output Q.