Chapter 9-Logic Gates
Chapter 9-Logic Gates
- A logic gate is a device that produce signals of 1 or 0 when the input logic
requirements are met and are used in manipulating binary information.
- A logic gate is a device (or electrical circuit) that performs one or more logical
operations on one or more input signals.
- Its output represent Boolean (T or F) or binary values (1 or 0) as voltages.
- Logic gates are the building blocks of digital technology.
- They can be used in applications like:
Building computer chips
Programming traffic signals
Chips for automatic alarm systems
Chips for automated control systems
The number of rows in a truth table shows the number of combinations of the
inputs of a particular circuit. The number of rows for each gate is found using the
following formulae: rows = 2n , n being the number of inputs in the gate or
circuit. For example, a gate or circuit has the following rows corresponding to
the number of input (excluding column headings):
- 1 input = 21 = 2 rows
- 2 inputs = 22 = 4 rows
- 3 inputs = 23 = 8 rows
Page 1 of 9
Graphical Representation of Gates and their Truth Tables
Each logic gate has its own unique graphical representation, which can be in general
form or in standard form.
(1) General form
Each logic gate has a circle and the name of the gate to differentiate it from
the rest as given below:
The name inside the gate gives us the type of the gate
(a) OR gate
This represents two inputs entering the gate and one output from the gate.
The inputs can be represented by any alphabetic characters, e.g. A and B,
while the output can be X, given as follows:
- X= A OR B
- The output (X) is true if the INPUT A OR INPUT B are true.
- Thus if any one of the inputs is 1, the output is automatically 1
- Output only becomes 0 if all inputs are 0
Page 2 of 9
(b) AND gate
This is represented as follows:
Logic Gate Diagram Truth table
Standard Form General Form
The output (X) is only true if the INPUT A AND INPUT B are both true. If any one of
the inputs is 0, then the output becomes 0 also.
Thus X = A AND B.
The NOT gate has only one input and one output. The input is negated. Thus if input
is 1, output is 0, and vice versa.
The output (X) is true when the INPUT A is NOT TRUE.
The output (X) is False when the INPUT A is TRUE.
Page 3 of 9
- The output (X) is true if NOT (INPUT A OR INPUT B) are true.
- Thus X = NOT (A or B)
(e) NAND gate
Logic Gate Diagram Truth table
Standard Form General Form
Page 4 of 9
Combinational logic gates
A combination of logic gates, which may be different, gives a logic circuit as given
below:
BOOLEAN EXPRESSIONS
Boolean Expressions are equivalent expressions of the logic state of gates. For
example, the Boolean
expression for:
a NOT gate with input A and output C: C = NOT A
NAND and NOR gates are known as universal gates because they are inexpensive to
manufacture and any Boolean function (AND, OR, NOT) can be constructed using
only NAND or only NOR gates. Even NAND and NOR gates can be used as each
other’s alternatives in a circuit.
Page 5 of 9
- This is an OR gate, which means C = A OR B.
2. Multiplication Sign
- This represents an AND gate
- E.g C = AB,
- C = AxB,
- C = A.B
- C= (AB)(AC)
- C = (A.B).(A.C)
- All these are various versions of the AND gate.
Draw a logic network and truth table to show all the possible situations when the
stop signal could be received.
Answer
Step 1: Deduce and Write the logic statement
- The first statement can be re-written as: (L = 1 AND V = NOT 1) since Length >
100 metres corresponds to a binary value of 1 and Velocity <=10 m/s
corresponds to a binary value of 0 (i.e. NOT 1).
- The second statement can be written as (T = NOT 1 AND V = 1)
- Both these statements are joined together by OR which gives us the logic
statement: if (L = 1 AND V = NOT 1) OR (T = NOT 1 AND V = 1) then S = 1
Page 6 of 9
- The above statement can be written as: S = 1 if (L = 1 AND V = NOT 1) OR (T =
NOT 1 AND V = 1)
NB: the Student should first of all write the following logic statement before
coming up with a truth table or logic circuit as this has some marks awarded
to it., i.e.
S = 1 if (L = 1 AND V = NOT 1) OR (T = NOT 1 AND V = 1)
Questions
1. A computer will only operate if three switches P, S and T are correctly set. An
output signal (X = 1) will occur if R and S are both ON or if R is OFF and S and T are
ON. Design a logic network and draw the truth table for this network.
2. A traffic signal system will only operate if it receives an output signal (D = 1).
This can only occur if:
Either (a) signal A is red (i.e. A = 0)
Or (b) signal A is green (i.e. A = 1) and signals B and C are both red (i.e. B
and C are both 0)
Design a logic network and draw a truth table for the above system.
Page 7 of 9
3. A chemical plant gives out a warning signal (W = 1) when the process goes
wrong. A logic network is used to provide input and to decide whether or not
W=1
Draw a logic network and truth table to show all the possible situations when
the warning signal could be received
4. A power station has a safety system based on three inputs to a logic network.
A warning signal (S = 1) is produced when certain conditions occur based on
these 3 inputs:
Page 8 of 9
Draw a logic network and truth table to show all the possible situations when
the warning signal could be received.
6. Device a suitable Boolean expression and truth table for the circuit below:
8. a. Simplify the following logic equations by using the rules of Boolean algebra.
a. A • C + A • B • C
b. (A + B) • (B + Ā)
c. A • (Ā + C) + C
b. For each of the previous questions, create a circuit for the Boolean expression
before simplification.
Page 9 of 9