Professional Documents
Culture Documents
51 - 070
Process control
Electro/Digital
Logic circuit
In previous lessons we learned about various elementary gates. In the present
lesson we will use these gates to compose a number of circuits.
We will discuss some logic circuits with reference to a number of examples. In
doing so we will refer to some rules from Boolean algebra and to the laws of De
Morgan. The object of this discussion is to simplify the circuit.
Gate circuits
Boolean algebra
De Morgans law
Circuit diagram
The copyright in this material is vested in Shell Global Solutions International B.V., The Hague, The Netherlands and Shell Netherlands Raffinaderij B.V. All rights
reserved. Neither the whole or any part of this document may be reproduced, stored in any retrieval system or transmitted in any form by any means (electronic,
mechanical, reprographic, recording or otherwise) without the prior written consent of the copyright owner.
Lesson
1. Gate circuits
- logic circuit
5875-070-001-P
Figure 1
Example of a logic circuit
- logical expression
The best way of determining the total logical expression is to write after every
gate in the logic circuit the relevant expression for that particular gate. For the
AND gate this expression is A*B and for the OR gate (A*B) + C. Therefore the
output signal for the complete circuit is Y = (A*B) + C. This is shown in figure 2.
5875-070-002-P
Figure 2
Elaborated example of the logic circuit
- truth table
When writing the truth table it is often practical to make a few intermediate
steps. As the total circuit of the example comprises three inputs, the truth table
must 23 = 8 combinations of inputs with the associated output signal. For this
purpose we create a table with nine rows. The number of columns is determined
by the number of ingoing and outgoing signals plus the number of intermediate
steps. In the above-mentioned example there are two gates, so that one
intermediate step (the output of the first gate) is sufficient. The truth table can
now comprise 3 + 1 + 1 = 5 columns.
Table 1
Truth table for the logic circuit of the example
C
B
A
A*B
Y = ( A * B)+ C
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
0
0
0
1
0
0
0
1
0
0
0
1
1
1
1
1
2. Boolean algebra
- Boolean
expression
- circuit algebra
- variable
0*0 = 0
0 *1 = 0
1* 0 = 0
1*1 = 1
0+ 0 = 0
1+ 0 = 1
1+ 1 = 1
AND gate
OR gate
0+ 1= 1
A*0 = 0
A *1 = A
A*A = A
A*A = 0
A+
A+
A+
A+
0= A
1= 1
A= A
A= 1
Complement
0=1
1= 0
Complement
A= A
These rules are easily proved with the aid of the uppermost set of basic rules.
We can only substitute for the variable A the values 0 and 1. When applied to
the rule A*1=A, we get:
for A = 0 :
for A = 1 :
0*1 = 0 (= A)
1*1 = 1 (= A)
Question 1
Complete: A* A =
A+ A =
3. De Morgans laws
Let us again consider the truth table of an AND gate.
Derivation of the first law of De Morgan.
Table 3
We start from an AND gate
A
0
0
1
1
B
0
1
0
1
Y
0
0
0
1
1
1
0
0
1
0
1
0
1
1
1
0
? = ?+ ?
For the top part of the truth table: Y = A*B
Inversion of the two terms on either side of the symbol = gives: ? = ? *?
It follows that: ? = ? * ? = ? + ?
The first law of De Morgan states that: ? *? = ? + ?
We can do the same derivation with the truth table of an OR gate. We get:
? + ? = ?* ?
The result is known as the second law of De Morgan.
Question 2
Explain briefly in words the first and second laws of De Morgan.
4. Circuit diagram
- quantities
Temp.
0
0
0
0
1
1
1
1
Level
0
0
1
1
0
0
1
1
Pressure
0
1
0
1
0
1
0
1
Valve
0
1
0
0
1
1
1
0
We now use this truth table to draw up a logical expression according to the
following rules:
we connect any combination whose output has a value causing the valve to
be open (in this case 1) to an individual AND gate;
all outputs from these various AND gates are connected as an input signal
to one OR gate.
In this way the logic circuit of figure 3 is obtained.
5815-070-003-P
Figure 3
Logic circuit
We compose the relevant logical expression with the aid of the logic circuit. The
logical expression for the circuit presented in figure 3 is:
) (
) (
) (
Simplifying the above expression is done through the use of the basic rules of
Boolean algebra. One of these basic rules is:
?+ ?=1
The above-mentioned expression can also be written as:
) (
V = ?*L* P + ?* L* P + P + ?* L*P
Substitution of P + P = 1 gives:
) ( ) (
V = ?*L* P + ?* L + ?* L*P
The circuit has now been simplified and only uses eight gates, whereas the
original circuit required eleven gates. Simplification can be obtained in various
ways by making use of the basic rules and the laws of De Morgan.
Question 3
What rules are applied to draw up a logical expression on the basis of a truth
table?
An example of a simplification with the aid of the rules of De Morgan is:
given the expression:
? = ( ? + ? )* ?* ?
6
? + ? = ?* ?
Substitution gives:
? = ?* ?* ?* ?
or:
? = ?* ?* ?* ?
Application of the basic rule:
? *? = ? or ?* ? = ?
gives:
? = ?* ?
Applying De Morgan again gives:
? = ?+ ?
The last basic rule is: ? = ?
substitution of which gives:
? = ?+ ?
In this way we have simplified the circuit to only one OR gate. It will be clear
that Boolean algebra and the laws of De Morgan are very important for drawing
up circuit diagrams that are as simple as possible.
Question 4
How many gates did the original example have? How many gates are left after
simplication?
Summary
A logical circuit diagram is a diagram that is composed of elementary gates.
Boolean algebra is calculation with the aid of logical expressions.
The object of simplifying logical expressions is to reduce the number of gates
used.
The basic rules of Boolean algebra are:
0*0 = 0
0+ 0 = 0
0=1
0 *1 = 0
0+ 1= 1
1= 0
1* 0 = 0
1*1 = 1
1+ 0 = 1
? *0 = 0
? *1 = ?
? *? = ?
?+ 0= ?
? + 1= 1
?+ ?= ?
?*? = 0
?+ ?=1
1+ 1 = 1
?= ?
? + ? = ? *?
The second law of De Morgan is:
?* ? = ? + ?
Test
Exercises
Do not send in your answers for correction
1.
? = ( ? + ? )*C
In the brackets there is an OR gate with inputs A and B. This OR gate,
together with C, forms the input to an AND gate. The total output of the
two gates is to be inverted. This gives the following logic circuit.
5815-070-004-P
Write the truth table. In the present example we have again three inputs. In
this case there are three gates, so that in the truth table we can make two
intermediate steps. The table therefore gets 9 rows and 6 columns, as
follows. Complete the table.
Truth table of problem 1
A+ B
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
0
1
1
1
0
1
1
1
( A + B )*C
Y = ( A + B )*C
2.
5815-070-005-P
Write the truth table for the circuit of problem 2. This table has 3
intermediate steps.
Truth table for problem 3
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
A*B
A*C
0
0
0
1
0
0
0
1
4.
5.
((
Y = ( A*B ) + A*C
? = ? *? )+ ? *?
6.
Write for the following logic circuit a logical expression, and simplify it.
5815-070-006-P
10
?*? = 0
A+ A= 1
2.
? + ? = ? *?
Expressed in words we can say that an AND gate of which all the inputs
and output have been inverted is equivalent to an OR gate.
The second law of De Morgan is:
? + ? = ?* ?
We can say of an OR gate in which all the inputs and the output have been
inverted is equivalent to an AND gate.
3.
4.
A+ B
( A + B )*C
Y = ( A + B )*C
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
0
1
1
1
0
1
1
1
0
0
0
0
0
1
1
1
1
1
1
1
1
0
0
0
11
2.
Again we find the logical expression by writing after each gate in the
diagram the expression for that gate. For the top AND gate this is ? *? .
For the inverter ? .
The bottom AND gate gives ?*C . Finally, the OR gate result in
( ? *? ) +
( ?*C )
( )
? = ( ? *? ) + ?*C
3.
4.
A*B
A*C
Y = ( A*B ) + A*C
0
1
0
A
1
0
1
0
0
0
0
0
0
0
0
0
1
0
1
0
1
0
1
0
1
0
1
0
0
0
1
0
1
0
1
0
1
1
0
1
1
0
0
0
0
0
1
0
1
1
1
1
1
0
0
1
1
B
0
1
0
1
Y
0
1
1
1
1
1
0
0
1
0
1
0
1
0
0
0
12
5.
((
?+ ?= ?
? = ? *? )+ ? *?
? = ? + ? + ? *?
? = ? + ? *?
? = ? *?* ?
?= ?
? = ? *? * ?
? *? = 0
? = ?* 0
? =0
6.
Simplify
? = ?* ?*A * ?
Or
? = ?*? * ?*?
? = 0*0
? = 0+ 0
? =1
?*? = 0
1st law of De Morgan
0=1
13