Documente Academic
Documente Profesional
Documente Cultură
Logic Circuits
(2.2.4)
This handout includes; Truth values. OR, AND (2-input only) and NOT gates and their truth tables Determining the output of a logic circuit containing the three mentioned gates for given inputs.
Ms. P. Sullivan
Page 1 of 7
Step 4: The last step is to combine the inputs of NOT (A OR B) with the input of C through and AND Gate.
A X
That gives us the complete Logic Circuit for the expression X = NOT (A OR B) AND C.
Ms. P. Sullivan
Page 2 of 7
A B
C D F
In this case we have to start from the right hand side; that is X and start factorising X according to its elements. The following is a step-by-step breakdown of X.
Result X NOT G
Description This is the final output we start with. X is made up from NOT G as can be seen from the diagram. Now, well check what G is made of, in this case it is made up of NOT (E OR F) E and F which pass through an OR gate. Therefore we replace G with (E OR F). Since we have more than one letter we close them in brackets. Finally, we can replace both E and F by their predecessors. Both
E and F are made up of two inputs which are passed through an AND gate. Once again notice that since both E and F are made up of more than one input these are enclosed in brackets.
Ms. P. Sullivan
Page 3 of 7
A B
C D
F H
In most cases Boolean expressions are not written down using the NOT, AND and OR notations but a symbol is used to replace them. The following are their symbols: NOT A A AND B A OR B A.B A+B
Ms. P. Sullivan
Page 4 of 7
A car alarm is designed to sound when the engine is on and a seat belt is not in place or a door is open or both. Draw a logic circuit and its truth table to explain this situation.
The first step is to point out the inputs. In this case there are the engine, the seat belt and the door and the output is the alarm. So we can start by drawing the inputs.
Engine
Seat Belt
Door
If we look at the statement again, we can highlight them as follows: Engine is ON AND Seat Belt NOT in place (so engine is always 1 there is no need for a gate- , the seat belt is not in place therefore NOT is required- and finally they are combined with an AND). Engine is ON AND a Door is OPEN (engine and door do not require any gates they are just combined with an AND gate). Finally, the previous two situations are combined with an OR gate.
Ms. P. Sullivan
Page 5 of 7
All these can then be plotted into the logic circuit as shown next. Seat Belt X Y Engine Alarm
Door Z
The next step is to draw the truth table. Seat Belt Engine Door X
Y
X.Engine
Z
Engine.Door
Alarm
Y+Z
0 0 0 0 1 1 1 1
0 0 1 1 0 0 1 1
0 1 0 1 0 1 0 1
1 1 1 1 0 0 0 0
0 0 1 1 0 0 0 0
0 0 0 1 0 0 0 1
0 0 1 1 0 0 0 1
Ms. P. Sullivan
Page 6 of 7
So by looking at this truth table we can see 3 situations when the alarm will ring. So it can be used to check if the circuit has been done correctly.
Seat Belt
Engine
Door
Alarm
X.Engine
0 0 1 1 0 0 0 0
Engine.Door
0 0 0 1 0 0 0 1
Y+Z
0 0 1 1 0 0 0 1
0 0 0 0 1 1 1 1
0 0 1 1 0 0 1 1
0 1 0 1 0 1 0 1
1 1 1 1 0 0 0 0
The alarm will sound when: A: the engine is ON and the seat belt is not in place. B: the engine is ON, the seat belt is not in place and the door is open. C: the engine is ON and the door is opened.
Ms. P. Sullivan
Page 7 of 7