You are on page 1of 13

00.02.

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.

Contents of the lesson


1

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.

Process control / 00.02.51 - 070

Lesson
1. Gate circuits
- logic circuit

A diagram in which various elementary gates are interconnected is referred to as


a logic circuit. Previous lessons dealt with the logical expression and the truth
table. We will now explain the relation between the logic circuit and the truth
table with the aid of figure 1.

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.

Process control / 00.02.51 - 070

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

A logical expression is sometimes referred to as a Boolean expression. To use


these expressions for calculations circuit algebra or Boolean algebra has been
developed with the object to simplify the expressions. Simplifying here means
that the logical expression is so modified that fewer gates are required to obtain
the same effect.
In fact, we got to know the first fundamental rules for Boolean algebra when we
discussed the elementary gates.
In normal mathematics a variable is a quantity that can have a number of values.
In Boolean algebra a variable can have only two values: 0 or 1. Starting from a
variable A, we can observe the following basic rules:
Table 2
Basic rules in Boolean algebra
AND gate
OR gate

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)

Process control / 00.02.51 - 070

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

Invert all the above values:

The logical expression for this table is:

? = ?+ ?
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.

Process control / 00.02.51 - 070

4. Circuit diagram
- quantities

Using the above-mentioned information, we draw up a circuit diagram using an


example from actual practice. In a process three quantities are variable:
temperature, level and pressure.
In this process a valve may only open under the following conditions:
1
temperature, high, level high, pressure low;
2
temperature high, level low, pressure high;
3
temperature high, level low, pressure low;
4
temperature low, level low, pressure high.
In addition:
too high a temperature results in a 1;
too high a level results in a 1;
too high a pressure results in a 1;
opening of the valve gives a 1.
We will draw up a circuit diagram for this process. This circuit diagram ensures
that the valve is only opened if all the conditions are satisfied. To do this we first
write a truth table for this circuit. As we want to control three quantities, the
truth table has 23 = 8 input combinations. The output of the circuit controls the
valve. In the truth table the outputs are only 1 if the inputs satisfy the combined
conditions. The truth table for this process looks as follows:
Table 4
Truth table

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.

Process control / 00.02.51 - 070

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:

) (

) (

) (

V = ?*L* P + ?* L*P + ?* L* P + ?* L*P

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

Process control / 00.02.51 - 070

De Morgan found that:

? + ? = ?* ?
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?

Process control / 00.02.51 - 070

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

?= ?

De Morgan proved that an OR gate with inverted inputs and outputs is


equivalent to an AND gate. He further proved that an AND gate with inverted
inputs and outputs is equivalent to an OR gate.
The first law of De Morgan is:

? + ? = ? *?
The second law of De Morgan is:

?* ? = ? + ?

Process control / 00.02.51 - 070

Test
Exercises
Do not send in your answers for correction
1.

The following logical expression is given:

? = ( ? + ? )*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

Logic circuit of problem 1

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

Process control / 00.02.51 - 070

2.

Given the following logic circuit.

5815-070-005-P

Logic circuit of problem 2

Find the logical expression.


3.

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.

Derive the second law of De Morgan.

5.

Simplify the following logical expression.

((

Y = ( A*B ) + A*C

? = ? *? )+ ? *?
6.

Write for the following logic circuit a logical expression, and simplify it.

5815-070-006-P

Logic circuit for problem 6

10

Process control / 00.02.51 - 070

Answers to the questions in the lesson


1

?*? = 0
A+ A= 1

2.

The first law of De Morgan is:

? + ? = ? *?
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.

To draw up a logical expression from a truth table we apply the following


rules:
Connect any combination whose output has a value that results in an
action being implemented to a separate AND gate;
Connect all outputs of these various AND gates as input signal to one
OR gate.

4.

In the original example seven gates were required. After simplification


there remains a circuit with only one gate.

Answers to the exercises


1.

See the following table.


Truth table for problem 1

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

Process control / 00.02.51 - 070

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.

See the following table.


Truth table for problem 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

Derivation of the second law of De Morgan.


We start from an OR gate
A
0
0
1
1

B
0
1
0
1

Y
0
1
1
1

Invert all the above values:

1
1
0
0

1
0
1
0

1
0
0
0

The logical expression for this table is ? = ? * ?


For the top part of the truth table: ? = ? + ?
Inversion of the terms on either side of the = symbol gives ? = ? + ?
It follows that ? = ? + ? = ?* ?
The second law of De Morgan is ? + ? = ?* ?

12

Process control / 00.02.51 - 070

5.

((

1st law of De Morgan

?+ ?= ?

? = ? *? )+ ? *?
? = ? + ? + ? *?

? = ? + ? *?

1st law of De Morgan

? = ? *?* ?

?= ?

? = ? *? * ?

? *? = 0

? = ?* 0
? =0
6.

The logical expression is:


? = ? + ?*A * B

Simplify
? = ?* ?*A * ?

2nd law of De Morgan

Or
? = ?*? * ?*?
? = 0*0
? = 0+ 0
? =1

?*? = 0
1st law of De Morgan
0=1

13

You might also like