AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Computing

Gates joined together

Week 28 · 4.5 Logic circuits · 3 lessons
1

From gates to circuits

Computing 9: Topic 4.5, pp. 341–347
GoalExplain what a logic circuit is and read a Boolean expression as a list of inputs, gates and one output.
New words
transistor · a tiny electronic switch that can turn a signal on or off; logic gates are built from transistorslogic circuit · logic gates joined so that the output of one gate can be an input of the nextBoolean expression · a statement that uses inputs and the operators AND, OR and NOT to give one output, such as X = A AND Binput · a value, 0 or 1 (False or True), that goes into a gate or into a whole circuit
Explanation

Inside a computer, every logic gate is built from a few transistors. A transistor is a tiny electronic switch, and a modern CPU holds billions of them. One gate can only do a small job, such as AND, OR or NOT. When the output of one gate is joined to the input of another, the gates form a logic circuit, and a circuit can make decisions that no single gate can make. A circuit is described by a Boolean expression such as X = A AND (B OR C). The letters A, B and C are inputs, X is the output, and each operator is one gate. This circuit therefore has three inputs and two gates. The brackets show which gate comes first: B OR C is worked out first, and its result goes into the AND gate together with A.

Part of the expressionWhat it means in the circuit
Xthe one output
A, B, Cthe three inputs
AND, ORtwo gates: one for each operator
( )the part that is drawn and worked out first
Worked examples
ItemHow manyWhich ones
inputs3A, B, C
gates2OR (in the brackets), AND
outputs1X
Count the parts of X = A AND (B OR C). The letters give the inputs and the operators give the gates. The OR gate sits inside the brackets, so it is the first gate.
GateTypeTakesGives
Gate 1ORB and CP
Gate 2ANDA and PX
The same circuit as a wiring list, with one gate on each row. The OR gate has no letter of its own for its output, so we call that middle output P. The AND gate then takes A and P.
ABCP = B OR CX = A AND P
00000
00110
01010
01110
10000
10111
11011
11111
The output for every row of inputs. Three inputs give 2 × 2 × 2 = 8 rows. The column P shows the middle output, so each row can be checked step by step. X is 1 in only three rows, the ones where A is 1 and at least one of B and C is 1.
Class activity

Human circuit (no computer). You need five players, or three players and two cards. Players A, B and C are the inputs: each holds a hand up for 1 or down for 0. Gate player 1 is the OR gate. They watch B and C and show P with a hand up or down. Gate player 2 is the AND gate. They watch A and P and show X. Play all eight combinations of A, B and C in order, and write each row in a table with the columns A, B, C, P and X. Check your table against a partner’s. Then swap the gates so that player 1 is AND (watching B and C) and player 2 is OR (watching A and P). Which rows give a different X?

Practice
1
Count the inputs and the gates in each expression, and write the numbers in the table.
ExpressionInputsGates
X = NOT (A OR B)??
X = A OR (B AND C)??
X = (A AND B) OR (NOT C)??
2
Complete the wiring list for X = B OR (A AND C). Write the brackets gate first.
GateTypeTakesGives
Gate 1?A and CP
Gate 2OR?X
3
Work out P and X for X = B OR (A AND C), where P = A AND C, for these three rows of inputs.
ABCPX
101??
010??
001??
4
A learner writes: “A transistor is a logic gate.” Correct the sentence.