Professional Documents
Culture Documents
Cap3. Digital Systems - Logic Gates and Boolean Algebra
Cap3. Digital Systems - Logic Gates and Boolean Algebra
Introduction
How systems using binary logic levels make
decisions?
Chapter 3 Boolean algebra: important to describe,
analyze, design, and to implement digital
Logic Gates and Boolean circuits.
Algebra
1
20-10-2009
2
20-10-2009
3-6 Describing Logic Circuits Algebraically 3-6 Describing Logic Circuits Algebraically
The three basic Boolean operations: OR, AND, NOT; Examples of Boolean expressions for logic
can describe any logic circuit. circuits:
Operators’ precedence:
NOT +
AND
OR -
If an expression contains both AND and OR operations,
the AND operations must be performed first
If we want to change the operation precedence we can use a
parenthesis in the expression. Ronald Tocci/Neal Widmer/Gregory
Moss
Digital Systems: Principles and
Applications, 9e
3
20-10-2009
3-7 Evaluating Logic Circuit Outputs 3-7 Evaluating Logic Circuit Outputs
Rules for evaluating a Boolean expression: Evaluate Boolean expressions by substituting
1. Perform all inversions of single terms: 0→1; 1→0 values and performing the indicated operations:
2. Perform all operations within parenthesis. A = 0, B = 1, C = 1, and D = 1
3. Perform AND operation before an OR operation x = A BC (A + D)
unless parenthesis indicate otherwise. = 0 ⋅ 1 ⋅ 1 ⋅ (0 + 1)
4. If an expression has a bar over it (operation NOT), = 1 ⋅ 1 ⋅ 1 ⋅ (0 + 1)
perform the operations inside the expression and
= 1 ⋅ 1 ⋅ 1 ⋅ (1)
then invert the result.
= 1 ⋅1 ⋅1 ⋅ 0
Ronald Tocci/Neal Widmer/Gregory Moss
Digital Systems: Principles and Applications,
Ronald Tocci/Neal Widmer/Gregory Moss
Digital Systems: Principles and Applications,
=0
10e 10e
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.
Ronald Tocci/Neal Widmer/Gregory Moss Ronald Tocci/Neal Widmer/Gregory Moss
Digital Systems: Principles and Applications, 9e Digital Systems: Principles and Applications, 10e
4
20-10-2009
3-9 NOR Gates and NAND Gates 3-9 NOR Gates and NAND Gates
The NAND gate is an The output of NAND and NOR gates may be
inverted AND gate. found by simply determining the output of an
An inversion “bubble” AND or OR gate and inverting it.
i placed
is l d at the
h output The truth tables for NOR and NAND gates
of the AND gate.
show the complement of truth tables for OR
The Boolean
and AND gates.
expression is
x = AB
Ronald Tocci/Neal Widmer/Gregory Moss Ronald Tocci/Neal Widmer/Gregory Moss
Digital Systems: Principles and Applications, Digital Systems: Principles and Applications,
10e 10e
5
20-10-2009
x + y = x⋅ y
When the AND product of two variables is inverted, it is
equivalent to inverting each variable individually and ORing
them: Alternative symbol for a NOR gate:
x⋅ y = x + y
Ronald Tocci/Neal Widmer/Gregory Moss
Digital Systems: Principles and Applications,
10e
This characteristic provides flexibility and is very useful in logic circuit design. Ronald Tocci/Neal Widmer/Gregory Moss
Digital Systems: Principles and Applications,
10e
6
20-10-2009
3-14 Which Gate Representation to Use 3-15 IEEE/ANSI Standard Logic Symbols
When a logic signal is in the active state (high Rectangular symbols represent logic gates and
or low) it is said to be asserted. circuits.
When a logic signal is in the inactive state Dependency notation inside symbols show
(hi h or llow)) it iis said
(high id tto bbe unasserted.
t d how output depends on inputs.
A bar over a signal means asserted (active)
low. A small triangle replaces the inversion
bubble.
The absence of a bar over a signal means
asserted (active) high.
Ronald Tocci/Neal Widmer/Gregory Ronald Tocci/Neal Widmer/Gregory
Moss Moss
Digital Systems: Principles and Digital Systems: Principles and
Applications, 10e Applications, 10e
7
20-10-2009
3-15 IEEE/ANSI Standard Logic Symbols 3-16 Summary of Methods to Describe Logic Circuits
Compare the The three basic logic functions are AND, OR,
IEEE/ANSI symbols and NOT.
to traditional Logic functions allow us to represent a
symbols.
b l decision process.
These symbols are
If it is raining OR it looks like rain I will take an
not widely accepted
umbrella.
but may appear in
some schematics. If I get paid AND I go to the bank I will have
money to spend.
Ronald Tocci/Neal Widmer/Gregory Ronald Tocci/Neal Widmer/Gregory
Moss Moss
Digital Systems: Principles and Digital Systems: Principles and
Applications, 10e Applications, 10e
3-17 Hardware Description Languages vs. 3-17 Description Languages vs. Programming
Programming Languages Languages
HDL – Hardware Description Languages VHDL
allow rigidly defined language to represent Developed by DoD (Department of Defense USA)
logic circuits. Standardized by IEEE (Institute of Electrical and
Electronic Engineers)
AHDL – Altera Hardware Description Language. Widely used to translate designs into bit patterns that
VHDL – Very High Speed Integrated circuit program actual devices.
Hardware Description Language. AHDL
Developed by Altera
Used to configure Altera Programmable Logic Devices
(PLDs)
Ronald Tocci/Neal Widmer/Gregory Ronald Tocci/Neal Widmer/Gregory
Moss Moss
Digital Systems: Principles and Digital Systems: Principles and
Applications, 10e Applications, 10e
3-18 Implementing Logic Circuits With PLDs 3-19 HDL Format and Syntax
Programmable Logic Devices (PLDs) are devices Syntax refers to the order of elements. Languages
that can be configured in many ways to perform that are interpreted by computers must follows strict
logic functions. rules of syntax.
Internal connections are made electronically to Format refers to a definition of inputs,
p , outputs,
p , and
how the output responds to the input (operation).
program devices. Inputs and outputs may be called ports.
The hardware description language defines the The mode of a port indicates if it is input or output.
connections to be made and is loaded into the device The type of a port indicates the number of bits and how
after translation by a compiler. they are grouped.
8
20-10-2009
3-19 HDL Format and Syntax 3-19 HDL Format and Syntax
Boolean description using AHDL Boolean Description Using VHDL
Defines of an AND gate: Definition of an AND gate:
The keyword SUBDESIGN names the circuit block, in this case: The keyword ENTITY names the circuit block, in this case:
and_gate
and_gate
The input and output definitions are enclosed in parenthesis.
parenthesis
The keyword PORT defines the inputs and outputs.
Variables are separated by commas and are followed by :INPUT;
The keyword ARCHITECTURE
The logic section is between the BEGIN and END keywords.
Operators are: describes the operation inside the block.
& = AND # = OR The BEGIN and END contain a
! = NOT $ = XOR description of the operation