Or search by topic
In this article you will find explanations of circuits and how they correspond to the logical language we use to discuss mathematics. You will be challenged to summarise the workings of the circuits by filling in blanks in the corresponding truth tables.
This diagram gives a summary of the information you will need to build your own circuits.
There is another version of the article here with the answers to the challenges. |
![]() |
This is the first of a series of articles on mathematical logic which will show that truth tables, set theory, Boolean algebra and electronic circuits are essentially equivalent; that is, theorems that can be proved in one system have their counterparts in the other systems. In subsequent articles we shall see how Boolean algebra is used in designing electronic circuits. In this article we
begin to explore the links between electronic circuits and mathematical logic.
Although logic does not model language perfectly it does form a useful system that, in practice, is the basis of most of the communication of mathematical ideas between working mathematicians. Logical conventions are used to overcome the ambiguities and inadequacies of language. The philosophical aspects of the subject are rather more subtle and complicated and we shall not dwell on them.
A proposition is a statement that has exactly one of the truth values 'true' or 'false'. A {\it propositional} {\it function} is a sentence involving variables, for example "She is the Queen of England" and "x is greater than 7". These functions become propositions when meanings are substituted for the variables ('she' and 'x' in the above
examples).
Before we go on to experiment with circuits we need a notation to record and summarize the combinations of propositions used in logical arguments and also the combinations of switches used in circuits.
We use small letters p, q, r... to represent propositions. If the proposition p is true it is said to have the truth value 1 (or sometimes T) and if false the truth value 0 (or F). Propositional logic is concerned with compound propositions formed from given propositions by means of the {\it connectives} 'not', 'and', 'or', 'if ... then' and combinations of these connectives, for example
'if and only if'.
In circuit diagrams each switch is either 'on' (representing the number 1) or 'off' (representing the number 0). Combinations of switches called {\it logical} {\it gates} represent the logical {\it connectives}.
Logical arguments are a combination of propositions, and circuits are a combination of switches that control the flow of current. Modern computers not only store data in the form of '0's and '1's, on which they perform arithmetic, but perform many highly complex tasks that we have come to take for granted. Studying the relation between truth tables and circuits will help us to understand a little
of the underlying principles behind the design and programming of computers.
{\bf Negation}
Now it is time to use Circuit Maker to make some of your own circuits and find out how the logic gates work.
First, connect a switch to a lamp as in Fig. 1 and click on the switch several times to change it from 1 to 0 and back to 1. Observe that the light goes on when the switch registers 1 and the light goes off when the switch registers 0. |
![]() Fig. 1
|
![]() Fig. 2
|
Now put a NOT gate into the circuit between the switch and the lamp, as shown in Fig. 2, and observe what happens when you change the switch from 1 to 0. |
Make and test the circuit shown in Fig 3. and fill in the truth table replacing the question marks with 1's to record when the lamp lights up and 0's to record when the lamp goes off. | ![]() |
\begin{array}{ccc}p &q & p\wedge q \\ 1 &1 &?\\ 1 &0 &?\\ 0 &1 &?\\ 0 &0 &? \\ \end{array} |
{\bf Disjunction}
In everyday language we often use 'or' inclusively as in "If you want to buy cereals or soft drinks go to aisle 7 in the supermarket" when we expect people who want to buy both cereals and soft drinks to go to that aisle as well as people wanting to buy just one of them. On other occasions we use 'or' exclusively to offer two alternatives expecting the listener to choose just one of them as in
"Do you want steak for dinner or chicken?". The meaning is usually clear from the context but to avoid any ambiguity in mathematics the logical connective 'or' is always used inclusively and never exclusively.
Given any two propositions p and q the {\it disjunction} p or q, (written p \vee q) is given in the following truth table.
![]() Fig.4
|
Make the circuit shown in Fig 4. and fill in the blanks in the truth table replacing the question marks with 1's and 0's.. | \begin{array}{ccc}p &q & p\vee q \\ 1 &1 &?\\ 1 &0 &?\\ 0 &1 &?\\ 0 &0 &? \\ \end{array} |
![]() Fig. 5
|
\begin{array}{ccc} p &q & p\vee q & \neg (p\vee q) & \neg p & \neg q & \neg p \wedge \neg q \\ 1 &1 &1 &? &0 &0 &? \\ 1 &0 &1 &? &0 &1 &? \\ 0 &1 &1 &? &1 &0 &? \\ 0 &0 &0 &? &1 &1 &? \\ \end{array} |
{\bf Implication}
Thinking about what we mean by 'if p then q' we see that this rules out the possibility that p is true and q is false. If I make the promise " if I go to the shops then I'll buy you some ice-cream" but I go to the shop and do not buy the ice-cream then I have broken my promise. So, denoting 'if p then q' by p \Rightarrow q, the truth table for 'if p then q' must include the line:
\begin{array}{ccc} p &q & p \Rightarrow q \\ 1 &0 &0 \\ \end{array}
![]() Fig. 7
|
\begin{array}{ccc} p & \neg p & p \vee \neg p \\ 1 &0 &1 \\ 0 &1 &1 \\ \end{array} |
What does logic mean to us and is that different to mathematical logic? We will explore these questions in this article.
Investigate circuits and record your findings in this simple introduction to truth tables and logic.