Professional Documents
Culture Documents
He-Thong-So - Tran-Ngoc-Thinh - Lec02 - ds1 - 2016 - Boolean-Constants-And-Variables - (Cuuduongthancong - Com)
He-Thong-So - Tran-Ngoc-Thinh - Lec02 - ds1 - 2016 - Boolean-Constants-And-Variables - (Cuuduongthancong - Com)
He-Thong-So - Tran-Ngoc-Thinh - Lec02 - ds1 - 2016 - Boolean-Constants-And-Variables - (Cuuduongthancong - Com)
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
CuuDuongThanCong.com https://fb.com/tailieudientucntt
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
7 8
Digital Systems 2
CuuDuongThanCong.com https://fb.com/tailieudientucntt
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=A•B
• In the Boolean expression
– This is read as “x equals A and B.”
X=A• B•C
– 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
Digital Systems 3
CuuDuongThanCong.com https://fb.com/tailieudientucntt
dce dce
2016
Describing Logic Circuits Algebraically 2016
• 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
CuuDuongThanCong.com https://fb.com/tailieudientucntt
dce dce
2016
Evaluating Logic Circuit Outputs 2016
Evaluating Logic Circuit Outputs
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
Digital Systems 5
CuuDuongThanCong.com https://fb.com/tailieudientucntt
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
CuuDuongThanCong.com https://fb.com/tailieudientucntt
dce dce
2016
Commutative Laws of Boolean Algebra 2016
Associative Laws of Boolean Algebra
A+B=B+A A + (B + C) = (A + B) + C
A•B= B•A 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
CuuDuongThanCong.com https://fb.com/tailieudientucntt
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 + A’B = A +B
• Rule 10: A + AB = A
• Rule 12: (A + B)(A + C) = A + BC
31 32
Digital Systems 8
CuuDuongThanCong.com https://fb.com/tailieudientucntt
dce dce
2016
Examples 2016
DeMorgan’s 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
DeMorgan’s Theorems 2016
Implications of DeMorgan’s Theorems
and
35 36
Digital Systems 9
CuuDuongThanCong.com https://fb.com/tailieudientucntt
dce dce
2016
Implications of DeMorgan’s Theorems 2016
Example of DeMorgan’s Theorems
• Determine the output expression for the below
circuit and simplify it using DeMorgan’s Theorem F XY P.Q
F X Y P Q
dce dce
2016
Examples 2016
Examples
• Simplify the expressions • Simplify the expressions
– z = (A’ + B)(A+B)
– z = (A’ + B)(A+B)
• De Morgan’s = A’A + A’B + AB + BB = 0 + (A’+A)B + B = B
– z = ((a’+c) . (b+d’))’
• De Morgan’s
– z = ((a’+c) . (b+d’))’
= (a’+c)’ + (b+d’)’ = ac’ + b’d
39 40
Digital Systems 10
CuuDuongThanCong.com https://fb.com/tailieudientucntt
dce dce
2016
Exercises 2016
Universality of NAND and NOR Gates
• De Morgan’s
41 42
dce dce
2016
Universality of NAND and NOR Gates 2016
Alternate Logic-Gate Representations
43 44
Digital Systems 11
CuuDuongThanCong.com https://fb.com/tailieudientucntt
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
CuuDuongThanCong.com https://fb.com/tailieudientucntt
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
51 52
Digital Systems 13
CuuDuongThanCong.com https://fb.com/tailieudientucntt
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
CuuDuongThanCong.com https://fb.com/tailieudientucntt
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
CuuDuongThanCong.com https://fb.com/tailieudientucntt