Sei sulla pagina 1di 72

Lecture 02

Combinational Gates
afandia@uthm.edu.my

Outlines
2

Logic Gates and Truth Table


Inverter, AND, OR, NAND, NOR, XOR and XNOR gates.
Boolean operation and expression.
Algebra Boolean Laws.
DeMorgans Theorem.
Circuit analysis and design using Boolean algebra.
Karnaugh Map.
SOP Karnaugh map minimization.
Karnaugh POS Karnaugh map minimization.
Combination Logic Circuits.
Combination logic implementation.
Universality of NAND and NOR gates.
Combinational of NAND and NOR gates.
Timing diagram implementation.
afandia@uthm.edu.my

Logic Gates &


Truth Table

Boolean Constants & Variables


4

afandia@uthm.edu.my

Boolean algebra allows only two values; 0 and 1.


Logic 0 can be: false, off, low, no, open switch.
Logic 1 can be: true, on, high, yes, closed switch.
Three basic logic operations: OR, AND, and NOT.

Truth Tables
5

A truth table describes the relationship between the input


and output of a logic circuit.
The number of entries corresponds to the number of inputs.
For example a 2 input table would have 22 or 4 entries. A
3 input table would have 23 or 8 entries.

afandia@uthm.edu.my

Truth Tables
6

Examples of truth tables with 2, 3, and 4 inputs.

afandia@uthm.edu.my

OR Operation with OR Gates


7

The Boolean expression for the OR operation is


X=A+B
This is read as x equals A or B.
X will equal 1 when A or B equals 1.

Truth table and circuit symbol for a two input OR gate.

afandia@uthm.edu.my

Cont
8

The OR operation is similar to addition but where A


and B are 1, the OR operation produces 1+1=1.
In the Boolean expression
x=1+1+1=1
x is true (1) when A is true (1) OR B is true (1) OR C is true (1).

afandia@uthm.edu.my

Example

Example
10

Determine the OR gate output for the following figure.

afandia@uthm.edu.my

Solution
11

afandia@uthm.edu.my

Example
12

Determine the OR gate output for the following figure.

afandia@uthm.edu.my

Solution
13

afandia@uthm.edu.my

AND Operations with AND Gates


14

The Boolean expression for the AND operation is

x=AB
This is read as x equals A and B.
x will equal 1 when A and B equal 1.
Truth table and circuit symbol for a two input AND gate. Notice the difference
between OR and AND gates.

afandia@uthm.edu.my

AND Operation with AND Gates


15

The AND operation is similar to multiplication.


In the Boolean expression
x=ABC
x will equal 1 only when A, B, and C are all 1.

afandia@uthm.edu.my

Truth Table and Symbol for a Three-input AND Gate


16

afandia@uthm.edu.my

Example
17

Determine the AND gate output for the following figure.

afandia@uthm.edu.my

Solution
18

afandia@uthm.edu.my

NOT Operation
19

The Boolean expression for the NOT operation is

xA
This is read as:
x equals NOT A, or
x equals the inverse of A, or
x equals the complement of A
afandia@uthm.edu.my

Cont
20

Truth table, symbol, and sample waveform for the NOT


circuit.

afandia@uthm.edu.my

Describing Logic Circuits


Algebraically

Describing Logic Circuits Algebraically


22

The three basic Boolean operations (OR, AND, NOT) can describe
any logic circuit.
If an expression contains both AND and OR gates the AND
operation will be performed first, unless there is a parenthesis in the
expression.

afandia@uthm.edu.my

Cont
23

Examples of Boolean expressions for logic circuits:

afandia@uthm.edu.my

Cont
24

The output of an inverter is equivalent to the input


with a bar over it. Input A through an inverter is
Examples using inverters.

afandia@uthm.edu.my

Evaluating Logic Circuit Outputs


25

Rules for evaluating a Boolean expression:


Perform all inversions of single terms.
Perform all operations within parenthesis.
Perform AND operation before an OR operation unless parenthesis
indicate otherwise.
If an expression has a bar over it, perform the operations inside the
expression and then invert the result.

afandia@uthm.edu.my

Other Options
26

Evaluate Boolean expressions by substituting values and


performing the indicated operations

A 0,B 1,C 1, and D 1


x ABC(A D)
x 011 (0 1)
x 111 (0 1)
x 111 (1)
x 111 0
x 0

afandia@uthm.edu.my

Implementing Circuits
from Boolean
Expressions

Implementing Circuits from Boolean Expressions


28

It is important to be able to draw a logic circuit


from a Boolean expression.
But, how?

afandia@uthm.edu.my

Example

Example
30

?
afandia@uthm.edu.my

Solution
31

afandia@uthm.edu.my

Example
32

?
afandia@uthm.edu.my

Solution
33

afandia@uthm.edu.my

NOR Gates and NAND Gates


34

Combine basic AND, OR, and NOT operations.


The NOR gate is an inverted OR gate. An inversion
bubble is placed at the output of the OR gate.
The Boolean expression is, x A B

afandia@uthm.edu.my

NOR Gates and NAND Gates


35

The NAND gate is an inverted AND gate. An inversion


bubble is placed at the output of the AND gate.
The Boolean expression is, x AB

afandia@uthm.edu.my

NOR Gates and NAND Gates


36

The output of NAND and NOR gates may be found by


simply determining the output of an AND or OR gate
and inverting it.
The truth tables for NOR and NAND gates show the
complement of truth tables for OR and AND gates.

afandia@uthm.edu.my

(a) NOR symbol; (b) equivalent circuit; (c) truth table


37

afandia@uthm.edu.my

(a) NAND symbol; (b) equivalent circuit; (c) truth table.


38

afandia@uthm.edu.my

Example

Example
40

?
afandia@uthm.edu.my

Solution
41

afandia@uthm.edu.my

Example
42

?
afandia@uthm.edu.my

Solution
43

afandia@uthm.edu.my

Boolean Theorems

Boolean Theorems
45

x0 0
x 1 1
The theorems or laws at right may
represent an expression containing
more than one variable.

xx x
xx 0
x 1 x
xx x
x x 1

afandia@uthm.edu.my

Single-variable Theorems
46

afandia@uthm.edu.my

Boolean Theorems
47

Multivariable theorems:
Understanding all of the
Boolean theorems will be useful
in reducing expressions to their
simplest form.

x y yx
x y yx
x ( y z) ( x y) z x y z
x( yz ) ( xy ) z xyz
x( y z ) xy xz
( w x)( y z ) wy xy wz xz
x xy x
x xy x y
x xy x y

afandia@uthm.edu.my

Example

Example
49

Simplify the expression

y ABD AB D

afandia@uthm.edu.my

Solution
50

Given y ABD AB D
y AB ( D D ); ( D D ) 1
y AB (1)
y AB

afandia@uthm.edu.my

Example
51

Simplify the expression

z ( A B )( A B )

afandia@uthm.edu.my

Solution
52

Given z ( A B)( A B)
z A A A B B A B B
Notice that,
A A 0 and B B B
z AB AB B
z B( A A 1); A A 1
z B(1 1)
z B(1)
zB
afandia@uthm.edu.my

DeMorgans Theorems

DeMorgans Theorems
54

When the OR sum of


equivalent to inverting
ANDing them.
When the AND product
equivalent to inverting
ORing them.

afandia@uthm.edu.my

two variables is inverted, it is


each variable individually and
of two variables is inverted, it is
each variable individually and

DeMorgans Theorems
55

A NOR gate is equivalent to an AND gate with inverted inputs.


A NAND gate is equivalent to an OR gate with inverted inputs.

( x y) x y
( x y) x y
afandia@uthm.edu.my

Example

Example
57

Simplify the expression

z ( A C ) ( B D)

afandia@uthm.edu.my

Solution
58

Given z = (A + C) (B + D)
Let' s put,
x = (A + C) and y = (B + D)
We have,
z= x y= x+y
z = A+C+B+D
z = ( A C) + B D
z = AC + BD
afandia@uthm.edu.my

Example
59

Determine the output expression for the following circuit


and simplify it using DeMorgans theorems

?
afandia@uthm.edu.my

Solution
60

afandia@uthm.edu.my

Universality of NAND
and NOR Gates

Universality of NAND and NOR Gates


62

NAND or NOR gates can be used to create the three basic logic
expressions (OR, AND, and INVERT)
Following slides illustrate how combinations of NANDs or NORs are
used to create the three logic functions.
This characteristic provides flexibility and is very useful in logic
circuit design.

afandia@uthm.edu.my

Universality of NAND and NOR Gates


63

afandia@uthm.edu.my

Universality of NOR Gates


64

afandia@uthm.edu.my

Alternate Logic-Gate
Representations

Alternate Logic-Gate Representations


66

To convert a standard symbol to an alternate:


Invert each input and output (add an inversion bubble where
there are none on the standard symbol, and remove bubbles
where they exist on the standard symbol.
Change a standard OR gate to and AND gate, or an AND gate
to an OR gate.

afandia@uthm.edu.my

Cont
67

The equivalence can be applied to gates with any number of


inputs.
No standard symbols have bubbles on their inputs. All of the
alternate symbols do.
The standard and alternate symbols represent the same
physical circuitry.
Next slides compares the standard and alternate symbols.

afandia@uthm.edu.my

Alternate Logic-Gate Representations


68

afandia@uthm.edu.my

Alternate Logic-Gate Representations


69

Active high an input or output has no inversion bubble.


Active low an input or output has an inversion bubble.
An AND gate will produce an active output when all
inputs are in their active states.
An OR gate will produce an active output when any input
is in an active state.

69
afandia@uthm.edu.my

IEEE/ANSI standard Logic Symbols


70

Rectangular symbols represent logic gates and circuits.


Dependency notation inside symbols show how output depends on inputs.
A small triangle replaces the inversion bubble.

70
afandia@uthm.edu.my

IEEE/ANSI standard Logic Symbols


71

Compare the IEEE/ANSI symbols to


traditional symbols.
These symbols are not widely
accepted but may appear in some
schematics.

afandia@uthm.edu.my

The End

Potrebbero piacerti anche