<< Chapter < Page | Chapter >> Page > |
The last gate you need to know is the NOR gate. This is opposite to the OR gate. The output is 1 if both inputs are 0. In other words, the output switches on if neither the first NOR the second input is 1. The symbol for the NOR gate is:
The truth table for the NOR gate is shown below.
Inputs | Output | |
A | B | |
0 | 0 | 1 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 0 |
The examples given were easy. Each job only needed one logic gate. However any `decision making' circuit can be built with logic gates, no matter how complicated the decision. Here is an example.
A sensor in a building detects whether a room is being used. If it is empty, the output is 0, if it is in use, the output is 1. Another sensor measures the temperature of the room. If it is cold, the output is 0. If it is hot, the output is 1. The heating comes on if it receives a 1. Design a control circuit so that the heating only comes on if the room is in use and it is cold.
The first sensor tells us whether the room is occupied. The second sensor tells us whether the room is hot. The heating must come on if the room is occupied AND cold. This means that the heating should come on if the room is occupied AND (NOT hot).
To build the circuit, we first attach a NOT gate to the output of the temperature sensor. This output of the NOT gate will be 1 only if the room is cold. We then attach this output to an AND gate, together with the output from the other sensor. The output of the AND gate will only be 1 if the room is occupied AND the output of the NOT gate is also 1. So the heating will only come on if the room is in use and is cold. The circuit is shown below.
Compile the truth table for the circuit below.
There is a column for each of the inputs, for the intermediate point C and also for the output. The truth table has four rows, since there are four possible inputs — 00, 01, 10 and 11.
A | B | C | Output |
0 | 0 | ||
0 | 1 | ||
1 | 0 | ||
1 | 1 |
Next we fill in the C column given that we know what a NOR gate does.
A | B | C | Output |
0 | 0 | 1 | |
0 | 1 | 0 | |
1 | 0 | 0 | |
1 | 1 | 0 |
Next, we can fill in the output, since it will always be the opposite of C (because of the NOT gate).
A | B | C | Output |
0 | 0 | 1 | 0 |
0 | 1 | 0 | 1 |
1 | 0 | 0 | 1 |
1 | 1 | 0 | 1 |
Finally we see that this combination of gates does the same job as an OR gate.
Each logic gate is manufactured from two or more transistors. Other circuits can be made using logic gates, as we shall see in the next section. We shall show you how to count and store numbers using logic gates. This means that if you have enough transistors, and you connect them correctly to make the right logic gates, you can make circuits which count and store numbers.
In practice, the cheapest gate to manufacture is usually the NAND gate. Additionally, Charles Peirce showed that NAND gates alone (as well as NOR gates alone) can be used to reproduce all the other logic gates.
Notification Switch
Would you like to follow the 'Siyavula textbooks: grade 12 physical science' conversation and receive update notifications?