Sei sulla pagina 1di 15

dce dce

2016 2016
Boolean Constants and Variables
Boolean algebra is an important tool in
describing, analyzing, designing, and
implementing digital circuits.
Boolean algebra allows only two values; 0
Digital Systems and 1.
Logic 0 can be: false, off, low, no, open
Tran Ngoc Thinh switch.
BK
TP.HCM
HCMC University of Technology Logic 1 can be: true, on, high, yes, closed
http://www.cse.hcmut.edu.vn/~tnthinh switch.
Three basic logic operations: OR, AND,
and NOT.
2

dce dce
2016
Truth Tables 2016
Truth Tables
A truth table describes the relationship Examples of truth tables with 2, 3, and 4 inputs.
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 = 4 entries. A 3-input
table would have 23 = 8 entries.

3 4

Digital Systems 1
dce dce
2016
OR Operation With OR Gates 2016
OR Operation With OR Gates
The Boolean expression for the OR operation is The OR operation is similar to addition but
X=A+B
when A = 1 and B = 1, the OR operation
This is read as x equals A or B. produces 1 + 1 = 1.
X = 1 when A = 1 or B = 1. In the Boolean expression
Truth table, circuit symbol and timing diagram for a x=1+1+1+1=1
two input OR gate: We could say that x is true (1) when A is true (1)
OR B is true (1) OR C is true (1) OR D is true (1).
In general, the output of an OR gate is HIGH
whenever one or more inputs are HIGH

A A
B
B
C
x D
x
5 6

dce dce
2016
OR Operation With OR Gates 2016
Review Questions
There are many examples of What is the only set of input conditions that will produce
applications where an output function is
a LOW output for any OR gate?
desired when one of multiple inputs is
all inputs LOW
activated.
Write the Boolean expression for a six-input OR gate
X=A+B+C+D+E+F

If the A input in previous example is permanently kept at


the 1 level, what will the resultant output waveform be?
constant HIGH

7 8

Digital Systems 2
dce dce
2016
AND Operations with AND gates 2016
AND Operation With AND Gates
The Boolean expression for the AND operation is The AND operation is similar to multiplication.
X=AB
In the Boolean expression
This is read as x equals A and B.
X=A BC
x = 1 when A = 1 and B = 1.
X = 1 only when A = 1, B = 1, and C = 1.
Truth table and circuit symbol for a two input AND gate are The output of an AND gate is HIGH only when all inputs
shown. Notice the difference between OR and AND gates. are HIGH.

A B

B C

x x

9 10

dce dce
2016
Review Questions 2016
NOT Operation
The Boolean expression for the NOT operation is
What is the only input combination that will produce a
XA X A'
HIGH at the output of a five-input AND gate? This is read as:
all 5 inputs = 1 x equals NOT A, or
x equals the inverse of A, or
What logic level should be applied to the second input of x equals the complement of A
Truth table, symbol, and sample waveform for the NOT
a two-input AND gate if the logic signal at the first input circuit.
is to be inhibited(prevented) from reaching the output?
A LOW input will keep the output LOW

True or false: An AND gate output will always differ from


an OR gate output for the same input conditions.
False
11 12

Digital Systems 3
dce dce
2016
Describing Logic Circuits Algebraically 2016

Describing Logic Circuits Algebraically

The three basic Boolean operations (OR, The output of an inverter is equivalent to
AND, NOT) can describe any logic circuit. the input with a bar over it. Input A through
an inverter equals A.
Examples of Boolean expressions for logic
Examples using inverters.
circuits:

13 14

dce dce
2016

More Examples
2016
Evaluating Logic Circuit Outputs
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.

15 16

Digital Systems 4
dce dce
2016
Evaluating Logic Circuit Outputs 2016
Evaluating Logic Circuit Outputs

Evaluate Boolean expressions by Output logic levels can be determined


substituting values and performing the directly from a circuit diagram.
indicated operations: Technicians frequently use this method.
A 0, B 1, C 1, and D 1 The output of each gate is noted until a
x ABC (A D) final output is found.
0 1 1 (0 1)
1 1 1 (0 1)
1 1 1 (1)
1 1 1 0
0
17 18

dce dce
2016
Implementing Circuits From Boolean Expressions 2016
Example
It is important to be able to draw Draw the circuit diagram to implement the expression
a logic circuit from a Boolean
expression. x ( A B )( B C )
The expression x A BC
could be drawn as a three input
AND gate.
A more complex example such
as
y AC BC ABC

could be drawn as two 2-input


AND gates and one 3-input AND
gate feeding into a 3-input OR
gate. Two of the AND gates
have inverted inputs. 19 20

Digital Systems 5
dce dce
2016
Review Question 2016
NOR Gates and NAND Gates
Draw the circuit diagram that implements the Combine basic AND, OR, and NOT operations.
expression The NOR gate is an inverted OR gate. An inversion
bubble is placed at the output of the OR gate.
x A BC(A D)
The Boolean expression is
x AB
using gates having no more than three inputs.

21 22

dce dce
2016
NOR Gates and NAND Gates 2016
Laws of Boolean Algebra
The NAND gate is an inverted AND gate. An Commutative Laws
inversion bubble is placed at the output of
the AND gate. Associative Laws
The Boolean expression is x AB Distributive Law

23 24

Digital Systems 6
dce dce
2016
Commutative Laws of Boolean Algebra 2016
Associative Laws of Boolean Algebra
A+B=B+A A + (B + C) = (A + B) + C

AB= BA A (B C) = (A B) C

25 26

dce dce
2016
Distributive Laws of Boolean Algebra 2016
Rules of Boolean Algebra
A (B + C) = A B + A C A (B + C) = A B + A C
A (B + C) = A B + A C A (B + C) = A B + A C

A (B C) = (A B) C

27 28

Digital Systems 7
dce dce
2016
Rules of Boolean Algebra 2016
Rules of Boolean Algebra
A (B + C) = A B + A C A (B + C) = A B + A C
A (B + C) = A B + A C A (B + C) = A B + A C

29 30

dce dce
2016
Rules of Boolean Algebra 2016
Rules of Boolean Algebra
Rule 11: A + AB = A +B

Rule 10: A + AB = A
Rule 12: (A + B)(A + C) = A + BC

31 32

Digital Systems 8
dce dce
2016
Examples 2016
DeMorgans Theorems
Simplify the expression Theorem 1: When the OR sum of two
y ABD AB D variables is inverted, it is equivalent to
inverting each variable individually and
y AB
ANDing them.
z (A B)( A B ) A B A. B
zB Theorem 2: When the AND product of two
x ACD A BCD variables is inverted, it is equivalent to
x ACD BCD
inverting each variable individually and
ORing them.
y AC ABC A.B A B
y AC 33 34

dce dce
2016
DeMorgans Theorems 2016
Implications of DeMorgans Theorems

A NOR gate is equivalent to an AND gate


with inverted inputs.
A NAND gate is equivalent to an OR gate
with inverted inputs.
For N variables, DeMorgans theorem is expressed as:

and

35 36

Digital Systems 9
dce dce
2016
Implications of DeMorgans Theorems 2016
Example of DeMorgans Theorems
Determine the output expression for the below
circuit and simplify it using DeMorgans Theorem F XY P.Q
F X Y P Q

Simplify the expression


Use DeMorgans theorems to convert below expression z ( A C )( B D )
to an expression containing only single-variable
inversions to one having only single variables
y A B CD inverted.
z AC B D
y A B (C D )
37 38

dce dce
2016
Examples 2016
Examples
Simplify the expressions Simplify the expressions
z = (A + B)(A+B)
z = (A + B)(A+B)
De Morgans = AA + AB + AB + BB = 0 + (A+A)B + B = B

z = ((a+c) . (b+d))
De Morgans
z = ((a+c) . (b+d))
= (a+c) + (b+d) = ac + bd

39 40

Digital Systems 10
dce dce
2016
Exercises 2016
Universality of NAND and NOR Gates

Simplify the expressions NAND or NOR gates can be used to


create the three basic logic expressions
a) (OR, AND, and INVERT)
b)

De Morgans

41 42

dce dce
2016
Universality of NAND and NOR Gates 2016
Alternate Logic-Gate Representations

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.

43 44

Digital Systems 11
dce dce
2016
Alternate Logic-Gate Representations 2016
Alternate Logic-Gate Representations
Standard and alternate symbols for various logic
gates and inverter
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.

45 46

dce dce
2016
Alternate Logic-Gate Representations 2016
Alternate Logic-Gate Representations
Interpretation of the two NAND gate
Active high an input or output has no
symbols.
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.

47 48

Digital Systems 12
dce dce
2016
Alternate Logic-Gate Representations 2016
Which Gate Representation to Use
Interpretation of the two OR gate symbols.
Using alternate and standard logic gate
symbols together can make circuit
operation clearer.
When possible choose gate symbols so
that bubble outputs are connected to
bubble input and nonbubble outputs are
connected to nonbubble inputs.

49 50

dce dce
2016
Which Gate Representation to Use 2016

When a logic signal is in the active state


(a) Original circuit
(high or low) it is said to be asserted. using standard NAND
When a logic signal is in the inactive state symbols; (b)
(high or low) it is said to be unasserted. equivalent
representation where
A bar over a signal means asserted (active) output Z is active-
low. HIGH; (c) equivalent
The absence of a bar over a signal means representation where
output Z is active-
asserted (active) high. LOW; (d) truth table.

51 52

Digital Systems 13
dce dce
2016
Example 2016
Example
Z activates another circuit when it goes low. Convert Z to Active-Low

Alarm is activated when Z goes high. Modify the circuit so that it represents
the circuit operation more effectively.

53 54

dce dce
2016
Methods of describing logic circuits 2016
IEEE/ANSI Standard Logic Symbols
Rectangular symbols
represent logic gates
(a) Boolean
and circuits.
expression;
(b) schematic Dependency notation
diagram; inside symbols show
(c) truth table; how output depends
(d) timing on inputs.
diagram. A small triangle
replaces the inversion
bubble.

55 56

Digital Systems 14
dce dce
2016
Summary of Methods to Describe Logic Circuits 2016
Summary
Boolean Algebra: a mathematical tool used in the analysis
The three basic logic functions are AND, and design of digital circuits
OR, and NOT. OR, AND, NOT: basic Boolean operations
Logic functions allow us to represent a OR: HIGH output when any input is HIGH
decision process. AND: HIGH output only when all inputs are HIGH
NOT: output is the opposite logic level as the input
If it is raining OR it looks like rain I will take an
umbrella. NOR: OR with its output connected to an INVERTER
NAND: AND with its output connected to an INVERTER
If I get paid AND I go to the bank I will have
Boolean theorems and rules: to simplify the expression of
money to spend. a logic circuit and can lead to a simpler way of
implementing the circuit
NAND, NOR: can be used to implement any of the basic
Boolean operations
57 58

Digital Systems 15

Potrebbero piacerti anche