GoalReview logic circuits and Boolean expressions, then machine learning, automated systems and their effects.
New words
logic circuit · logic gates joined so that the output of one gate can be an input of anotherBoolean expression · a statement with inputs and the operators AND, OR and NOT, which gives one outputmachine learning · a way for a system to adapt its own rules by learning from examplesautomated system · hardware and software that do a task with little human help, using sensors, a controller and an output
Explanation
A logic circuit is drawn from a Boolean expression by drawing the brackets first and then adding the next gate, whose inputs are the earlier output and the next letter. The number of gates equals the number of operators, and a truth table with a column for each middle output checks the design. An automated system has sensors, a controller and an output, and it follows its program the same way every time. Machine learning goes further: it adapts its rules from training data, so it needs good, varied examples to avoid bias. Automation can work all night, repeat a task exactly and do dangerous work, but it costs a lot and is only as good as its program. Jobs change rather than simply disappear, and people need oversight of AI. Never give personal information to an AI chatbot.
Idea
Rule to remember
circuit
brackets first, then the next gate
gates
one gate for each operator
truth table rows
2 for each input, multiplied: 3 inputs make 8 rows
AI
can be wrong or unfair; people must check
Worked examples
A
B
C
P = NOT A
Q = B OR C
X = P AND Q
0
0
0
1
0
0
0
0
1
1
1
1
0
1
0
1
1
1
0
1
1
1
1
1
1
0
0
0
0
0
1
0
1
0
1
0
1
1
0
0
1
0
1
1
1
0
1
0
A three-gate circuit with two brackets: X = (NOT A) AND (B OR C). The NOT gate and the OR gate are drawn first. The AND gate is outside both brackets and takes their outputs P and Q. The table shows all eight rows.
A car waiting
B ticket paid
X barrier lifts
0
0
0
0
1
0
1
0
0
1
1
1
An automated car-park barrier. A sensor in the road shows that a car is waiting (A), and a card reader shows that the ticket is paid (B). The controller uses X = A AND B, and the output device lifts the barrier only when X is 1.
Subject
Questions
Right
Percentage
maths
80
76
95%
history
20
8
40%
all
100
84
84%
Checking a claim. An advert says that a homework helper is right 84 times out of 100. The test below shows that this overall figure hides a weak spot: it is right for 95% of maths questions but for only 40% of history questions. The helper is not careless. It was probably trained on far fewer history examples. People should check its answers, especially in the weak subject.
Class activity
Design and question (no computer). Invent an automated system for a bike shed, such as a light that comes on at the right time. On paper, list its sensors, write the controller’s rule as a Boolean expression with three gates and name the output. Write the wiring list. Swap with a partner, who tests two rows. Then answer together: which part of the system could use machine learning, what would its training data be, and what is one risk if the data is one-sided? Who should check the system?
Practice
1
Complete the wiring list for X = NOT (A AND B) OR C.
Gate
Type
Takes
Gives
Gate 1
?
A and B
P
Gate 2
NOT
?
Q
Gate 3
OR
?
X
Gate 1: AND, takes A and B, gives P. Gate 2: NOT, takes P, gives Q. Gate 3: OR, takes Q and C, gives X.
2
Complete the last column of the truth table for X = NOT (A AND B) OR C. The column Q is NOT (A AND B).
A
B
C
Q
X
0
0
0
1
?
0
0
1
1
?
0
1
0
1
?
0
1
1
1
?
1
0
0
1
?
1
0
1
1
?
1
1
0
0
?
1
1
1
0
?
Q is 1, 1, 1, 1, 1, 1, 0, 0 and X is 1, 1, 1, 1, 1, 1, 0, 1 (the rows in order). X is 0 only when A is 1, B is 1 and C is 0.
3
Predict what this program prints.
Python
1a = True2b = False3c = True4print(not (a and b) or c)
5print(not (a or c) and b)
True, then False. Line 4: a and b is False, not False is True, and True or c is True. Line 5: a or c is True, not True is False, and False and b is False.
4
A robot arm has packed boxes for a year without a problem. Why should a person still check its work?
Its sensors or parts can wear out or fail. It follows a fixed program, so a box of a new size or a mistake it was not programmed for may go wrong without anyone noticing. A person can spot and fix such cases.