0% found this document useful (0 votes)
16 views20 pages

PWC Kinematics Updated WS

Uploaded by

arishatabba
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views20 pages

PWC Kinematics Updated WS

Uploaded by

arishatabba
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

BOOLEAN LOGIC

Syllabus 2023-2025

44
BOOLEAN LOGIC
STANDARD LOGIC GATE SYMBOLS

LOGIC GATES

There are six different logic circuits:

TRUTH TABLES

Truth tables are used to trace the output from a logic gate or logic circuit. The NOT gate is the
only logic gate with one input; the other five gates have two inputs.

When constructing truth tables all possible combinations of 1s and 0s which can be input are
considered. For the Not Gate (one input) there are only 21 = 2 possible binary combinations.

Although each logic gate can only have one or two inputs, the number of inputs to a logic
circuit can be more than 2; for example, three inputs give a possible 23 = 8 binary
combinations. And for four inputs, the number of possible binary combinations is 24 = 16. It is
clear that the number of possible binary combinations is a multiple of the number 2 in every
case. The possible inputs in a truth table can be summarized as shown:

45
FUNCTIONS OF THE SIX LOGIC GATES

NOT GATE

AND GATE

46
OR GATE

NAND GATE (NOT AND)

NOR GATE (NOT OR)

47
XOR GATE

LOGIC CIRCUITS, LOGIC EXPRESSIONS, TRUTH TABLES & PROBLEM STATEMENTS

When logic gates are combined together to carry out a particular function, such as controlling
a robot, they form a logic circuit. The output from the logic circuit is checked using a truth table.
Following 8 examples show how to carry out the task

 Create a logic circuit from a:


o problem statement (examples 6 and 7)
o logic or Boolean expression (examples 3 and 8)
o truth table (examples 4 and 5)
 Complete a truth table from a:
o problem statement (examples 6 and 7)
o logic or Boolean expression (examples 3 and 8)
o logic circuit (example 1)
 Write a logic or Boolean expression from a:
o problem statement (examples 6 and 7)
o logic circuit (example 2)
o truth table (examples 4 and 5).

48
EXAMPLE 1

Produce a truth table for the following logic circuit [note the use of black circles at the junctions
between wires.

There are three inputs to this logic circuit, therefore, there will be eight possible binary values
that can be input. To show stepwise how the truth table is produced, the logic circuit has been
split up into three parts, as shown by the dotted lines, and intermediate values are shown as
P. Q and R.

PART 1

This is the first part of the logic circuit; the first task is to find the intermediate values P and Q.

The value of P is found from the AND gate where the inputs are A and B. The value of Q is
found from the NOR gate where the inputs are B and C. An intermediate truth table is produced
using the logic function descriptions.

49
PART 2

The second part of the logic circuit has P and Q as inputs and the intermediate output. R:

This produces the following intermediate truth table. (Note: even though there are only two
inputs to the logic gate, we have generated eight binary values in part 1 and these must all be
used in this second truth table.

PART 3

The final part of the logic circuit has R and C as inputs and the final output. X:

This gives the third intermediate truth table:

50
Putting all three intermediate truth tables together produces the final truth table, which
represents the original logic circuit:

The intermediate values can be left out of the final truth table, but it is good practice to leave
them in until you become confident about producing the truth tables. The final truth table would
then look like this:

51
EXAMPLE 2:

Write a logic expression from the following logic circuits:

The first action is to look at the gates connected to the inputs A. B and C:

logic gate 1: (A AND B)

logic gate 2: (B OR C)

We then join these together using logic gate 3:

[(A AND B)] XOR [(B OR C)] which gives us the required logic expression.

(Note: the square brackets 11" in the expression are not necessary and are used here just
for clarity.)

This would be written as: (A AND B) XOR (B OR C)

Again, we will do this in the order of logic gates 1 and 2 first (connected to the three inputs):

logic gate 1: [A NAND C]

52
logic gate 2: [B AND C]

However, logic gate 3 is also connected to one of the inputs so that should be done next:

logic gate 3: (logic gate 1) NOR A

if we replace (logic gate 11 by the logic expression above, we get:

[(A NAND C) NOR A]

Finally, we can join all these together using:

logic gate 4: ((A NAND C) NOR A) OR (B AND C)

EXAMPLE 3:

A logic circuit can be represented by the following logic expression: [A XOR C] OR [NOT C
NANO B]

Produce a logic circuit and a truth table from the above statement.

In this example we have a connecting logic gate which is OR.

So, if we produce one half of the circuit from [A XOR C] we get:

The other half of the circuit is found from [NOT C NAND B]

If we now combine these together to form the final logic circuit:

53
The Truth Table is shown:

EXAMPLE 4:

Look at the two truth tables below; in each case produce a logic expression and the
corresponding logic circuit:

So we have the logic expression: A AND NOT B

̅ in Boolean] It is now possible to draw the corresponding


[Note that this could be written as A . B
logic circuit:

54
So we have the logic expression: [NOT A AND B] OR [A AND B]

̅ . B + A . B]
[This could be written as: A

It is now possible to draw the corresponding logic circuit:

EXAMPLE 5:

a Which Boolean Expression is represented by the following truth table?

55
We only need to consider those rows where the output is a 1. This gives us following three
logic expressions:

(NOT A AND NOT B AND NOT C)

(A AND NOT B AND NOT C)

(A AND B AND NOT C)

If we now join the three expressions with an OR Gate, we end up with the final logic
expressions

(NOT A AND NOT B AND NOT C) OR (A AND NOT B AND NOT C) OR (A AND B AND NOT
C)

b I Which Logic Expressions is represented by the following truth table


II Show that your logic expression in part I is the same as: (B AND C) OR (A AND C) OR
(A AND B)

I. We only need to consider those rows where the output is a 1. This gives us the
following four Boolean Expressions:

NOT A AND B AND C


A AND NOT B AND C
A AND B AND NOT C
A AND B AND C

If we now join the four expressions with an OR gate we end up with the following logic
expression:

(NOT A AND B AND C) OR (A AND NOT B AND C) OR (A AND B AND NOT C) OR


(A AND B AND C)

II. To show that [B AND C] OR [A AND C] OR [A AND B] produces the same output as
shown in part I we need to produce a new truth table and show that the output is the
same as the one in the given truth table:

56
As the second truth table shows, the outputs from logic expressions are both the same;
thus the logic expression [B AND C] OR [A AND C] OR [A AND B] gives the same
output as the logic expression in part I.

EXAMPLE 6

A safety system uses three inputs to a logic circuit. An alarm, X, sounds if input A represents
ON and input B represents OFF; or if input B represents ON and input C represents OFF.

Produce a logic circuit and truth table to show the conditions that cause the output X to be 1.

The first thing to do is to write down the logic statement representing the scenario in this
example. To do this, it is necessary to recall that ON a 1 and OFF a 0 and also that 0 is usually
considered to be NOT 1.

So we get the following logic expression:

Note: This expression can also be written as follows (Boolean expressions)

̅) + (B . C̅)
(A . B

The logic circuit is made up of two parts as shown in the logic expression. We will produce the
logic gate for the first second part. Then join both parts together with the OR gate.

57
Now combining both parts with the OR gate gives us:

In order to produce the truth table, there are two ways to do this:

 Trace through the logic circuit using the method described in example 1
 Produce the truth table using the original logic expression; this second method has the
advantage that it allows you to check that your logic circuit is correct.

We will use the second method in this example:

[Note: it is optional whether to leave in the intermediate values or simply remove them giving
a four column truth table with headings: A, B, C, X]

EXAMPLE 7

58
A wind turbine has a safety system which uses three inputs to a logic circuit. A certain
combination of conditions results in an output, X, from the logic circuit being equal to 1. When
the value of X = 1 then the wind turbine is shut down.

The following table shows which parameters are being monitored and form the three inputs to
the logic circuit.

The output. X, will have a value of 1 if any of the following combination of conditions occur:

Either turbine speed <=1000 rpm and bearing temperature > 80°C

Or turbine speed > 1000 rpm and wind velocity > 120 kph

Or bearing temperature <= 80°C and wind velocity > 120 kph

Design the logic circuit and complete the truth table to produce a value of X = 1 when either
of the three conditions above occur.

In this example, a real situation is given and it is necessary to convert the information into a
logic expression and then produce the logic circuit and truth table. It is advisable in problems
as complex as this to produce the logic circuit and truth table separately [based on the
conditions given] and then check them against each other to see if there are any errors.

STAGE 1

The first thing to do is to convert each of the three statements into logic expressions. Use the
information given in the table and the three condition statements to find how the three
parameters S, T and W are linked. We usually look for the key words AND. OR and NOT when
converting actual statements into logic.

We end up with the following three logic expressions:

I. Turbine speed <a 1000 rpm and bearing temperature > 80°C
logic expression: (NOT S AND TI
II. Turbine speed > 1000 rpm and wind velocity > 120 kph
logic expression: IS AND WI
III. Bearing temperature <= 80°C and wind velocity > 120 kph
logic expression: (NOT T AND WI

STAGE 2

59
This now produces three intermediate logic circuits:

Each of the three original statements were joined together by the word "OR'. Thus, we need
to join all of the three intermediate logic circuits by two OR gates to get the final logic circuit.

We will start by joining i and ii together using an OR gate:

The final part is to produce the truth table. We will do this using the original logic statement.
This method has the bonus of allowing an extra check to be made on the logic circuit in Figure
to see whether or not it is correct. It is possible, however, to produce the truth table straight
from the logic circuit in Figure.

There were three parts to the problem, so the truth table will first evaluate each part. Then, by
applying OR gates. as shown below, the final value, X, is obtained:

i. [NOT S AND T]
ii. [S AND W]
iii. [NOT T AND W]

We find the outputs from parts and lid and then OR these two outputs together to obtain a new
intermediate, which we will now label part (iv).

60
We then OR parts bid and (iv) together to get the value of X.

EXAMPLE 8:

Consider the logic statement:

((A NOR B) AND C) NAND (A OR NOT B)

a Draw a logic circuit to represent the given logic statement


b Complete the truth table for the given logic statement

First, we need to break down the logic statement. Assign:

i. P = [A NOR B]

61
ii. Q = [A OR NOT B]
iii. R = [P AND C]

And then note that X = R NAND Q

Now draw the logic gates for statements i to iii and connect them together:

We can then fill out the truth table in stages, starting with P, Q and then R, followed finally by
X:

62

You might also like