0% found this document useful (0 votes)
542 views9 pages

Chapter 9-Logic Gates

Logic gates are electronic circuits that process binary inputs and produce binary outputs. The main logic gates are OR, AND, NOT, NOR, NAND, XOR, and XNOR. Logic gates are represented graphically and their behavior is described by truth tables. Combinations of logic gates can be used to build more complex logic circuits and solve problems by modeling relationships between multiple binary inputs and outputs.
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)
542 views9 pages

Chapter 9-Logic Gates

Logic gates are electronic circuits that process binary inputs and produce binary outputs. The main logic gates are OR, AND, NOT, NOR, NAND, XOR, and XNOR. Logic gates are represented graphically and their behavior is described by truth tables. Combinations of logic gates can be used to build more complex logic circuits and solve problems by modeling relationships between multiple binary inputs and outputs.
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/ 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

- Electronic circuits operate using binary logic gates.


- Logic gates process signals which represent TRUE or FALSE, ON or OFF , 1 or 0

Main Logic Gates


The main logic gates are:
(a) OR gate
(b) AND gate
(c) NOT gate
(d) NOR gate
(e) NAND gate
(f) Exclusive OR gate (XOR)
(g) Exclusive NOR gate (XNOR)
Logic gates are used with truth tables.
 A truth table is a table which shows how a logic circuit's output responds to
various combinations of the inputs, using logic 1 for true and logic 0 for
false.
 A truth table is a table that describes the behaviour of a logic gate.
 It lists the value of the output for every possible combination of the inputs
 Truth tables contains 1s and 0s and are an integral part of logic gates
functionality.
 Truth table and logic gates use the following:
- 1 (True, ON, Not False)
- 0 (False, OFF, Not True)

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

(2) Standard Representation


In standard form, each logic gate has its own unique diagram. Even if the
name of the gate is not written, one knows what it stands for because of the
shape. The following are the logic gates and their shapes in standard form.

(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:

Logic Gate Diagram Truth table


Standard Form General Form

- 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.

(c) NOT gate


Logic Gate Diagram Truth table
Standard Form General Form

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.

(d) NOR gate


Logic Gate Diagram Truth table
Standard Form General Form

- This is an OR gate with the output X inverted.

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

This is an AND gate with the output X inverted.


The output is true if INPUT A AND INPUT B are NOT both True.
It translates to NOT (A and B)

(f) Exclusive OR gate (XOR)


In this gate, the output is 1 (T) if either, but not both, of the inputs are 1 (T). The
output is 0 (False) if both inputs are 0(False) or if both inputs are 1(True). In other
words, the output is 1 if the inputs are different, but 0 if the inputs are the same.
Logic Gate Diagram Truth table
Standard Form General Form

(g) Exclusive NOR Gate (XNOR)


The XNOR (exclusive-NOR) gate is a combination XOR gate followed by an
inverter. Its output is 1 if the inputs are the same, and 0 if the inputs are
different.

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.

NOR gate constructed using only NAND gates

NAND gate constructed using only NOR gates

Expressions and logic gates


Expressions using mathematical symbols can be used to represent logic gates.
One may be required to draw logic gates using such mathematical expressions
Such symbols and their meaning are as given below:
1. Plus sign (+)
- This means OR, e.g.
- C= A + B

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.

3. Complement sign (‘ or – above an input)


- This represents a NOT gate
- For example: NOT A can be given as any one of the following:
 A’

Logic gate Problems:


Question: Worked Example
A steel rolling mill is to be controlled by a logic network made up of AND, OR and
NOT gates only. The mill receives a stop signal (i.e. S = 1) depending on the following
input bits:

A stop signal (S = 1) occurs when:


either: Length, L > 100 metres and Velocity, V < =10 m/s
Or Temperature, T <=1000 C and Velocity, V >10 m/s

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)

Step 2: Logic Circuit


- Using the logic statement above, one can now draw the logic circuit as given
below:

Step 3: Truth Table


- One can now draw the truth table, basing from the logic statement in Step 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

A warning signal (W = 1) will be generated if


either (a) Chemical Rate < 10 m /s
or (b) Temperature > 87 C and Concentration > 2 moles
or (c) Chemical rate = 10 m /s and Temperature > 87 C

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:

A warning signal (S = 1) will be generated if:


Either : (a) Temperature > 120C and Cooling Water <= 100 l/hr
Or (b) Temperature <= 120C and (Pressure > 10 bar or Cooling Water < 100
l/hr)

Page 8 of 9
Draw a logic network and truth table to show all the possible situations when
the warning signal could be received.

5. Draw a circuit diagram for δ = (xy' + x'y)z

6. Device a suitable Boolean expression and truth table for the circuit below:

7. Draw circuits for following Boolean statements.


a. If A AND B are on AND C AND D are on then output is on.
b. If A OR B are on AND C OR D are on then output is on.
c. If A OR B is on then output is off.
d. If B AND C is off OR A is on then output is on.
e. If A is off AND B OR C is on AND D is off then output is on.
f. If A is on AND B AND C are off AND D is on then output is on.
g. If smoke detector (S) is on OR fire alarm (F) is on then sprinkler (W) is on.

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

You might also like