Lecture 1
Lecture 1
Lecture 1
2
3
4
THEIMPORTANCEOFDIGITALLOGIC
Most of electronic devices consist of two integrated systems
Hardware Software
5
THEIMPORTANCEOFDIGITALLOGIC
6
COURSEOBJECTIVES
🢝Understand the theory of operation for most of digital electronic
devices
🢝Analyze how a digital computer performs complex operations,
based on simply manipulating bits (0s and 1s)
🢝Design digital logic systems
7
TEXTANDREFERENCEBOOKS
Textbook:
🢝M. Morris Mano, “Digital Design”, 3rd Edition, Prentice-Hall, 2002, ISBN 0-13-
062121-8.
References:
🢝S.Brown , Z. Vranesic, “Fundamentals Of Digital LogicWith VHDLDesign”,
ISBN 0-07-012591-0.
🢝G. Langholz, A. Kandel, & J.LMott, “Foundations of digital logic design”, ISBN
981-02-3110-5.
🢝D. J. Comer, “Digital Logic and State Machine Design”, ISBN 978-0195107234.
🢝Thomas L. Floyd, “Digital Fundamentals”, ISBN 978-0131946095
8
COURSEOUTLINE
1. Introduction
2. Gate-Level Minimization
3. Combinational Logic
4. Synchronous Sequential Logic
5. Registers and Counters
6. Memories and Programmable Logic
9
FLASHBACKONDIGITALLOGIC
DESIGN HISTORY
10
HOWDIDITALLSTART?
11
HOWDIDITALLSTART?
14
Dr. Haitham Omran, Dr. Wassim Alexan 15
ANDITWENTON…
1947: Shockley, Brattain, and Bardeen invent the transistor
🢝Replaces vacuum tubes
🢝Enables integration of multiple devices into one package
14
ANDITWENTON…
1955: AT&T Bell Labs announced the
first fully transistorized computer,
TRADIC
1958: The first 2D Integrated Circuit
(Kilby received the Nobel prize in
2000)
•Transistors, resistors and capacitors
on the same piece of semiconductor
•Interconnects between components is
not integrated
•Low connectivity between components
15
ANDITWENTON…
1971: Intel’s 4004 first microprocessor
• Maximum clock rate is 740 kHz
• Less than 100k instructions
per second
16
APPLICATIONSOFDIGITALLOGICDESIGN
Conventional computer design
🢝CPUs, busses, peripherals
Embedded products
🢝Cars
🢝Toys
🢝Appliances
🢝Entertainment devices: MP3 players, gaming consoles (PlayStation,
Xbox, etc…)
17
BUT WHAT ISTHEMEANING OF
DIGITAL LOGIC DESIGN?
18
WHATISDIGITAL?
• Digital describes any system based on discontinuous data or events
•Computers are digital machines because at their most basic level they can
distinguish between just two values, 0s and 1s, or off and on
• There is no simple way to represent all the values in between, such as 0.25
19
ANALOGVS.DIGITAL
• An analog signal is any variable signal continuous in both time and amplitude
(e.g. sound)
Example:
A typical analog device is a clock in which the hands move continuously around
the face. Sucha clock iscapable of indicating every possible time of day. In
contrast, a digital watch is capable of representing only a finite number of
times (e.g. every tenth of a second)
20
WHYDIGITAL?
Digital systems are easier to design and implement than
analog systems.
21
WHATISLOGICDESIGN?
22
WHATARE THEBASIC UNITS USED
TO BUILDTHESEDIGITALCIRCUITS?
Digital Logic Gates!
These are the basic units used to build any
digital circuit
23
A
24
DIGITALLOGICLEVELS
• What is the physical meaning of logic 0 and logic 1?
• How can we recognize them?
25
DIGITALLOGICLEVELS
•Electrical signals (voltages or currents) that exist in a digital system
are in either of two recognizable values (logic 1 or logic 0)
Voltage
5
Logic – 1 range
Intermediate
region, 2
crossed only Transition (occurs
during state 0.8 between the two limits)
transition Logic – 0 range
0
Time
26
BOOLEAN ALGEBRA
27
BINARYLOGIC
• You should distinguish between binary logic and binary arithmetic
• Arithmetic variables are numbers that consist of many digits
Carry
Two digits
Arithmetic 1 + 1 = 10
28
DIGITALLOGICGATES
There are three fundamental logical operations, from
which all other functions, no matter how complex, can be
derived. These Basic functions are named:
🢝AND
🢝 OR
🢝 NOT (INVERTER)
Each of these has a specific
symbol and a clearly-defined
behavior
29
BASICDIGITALLOGICGATES(CONT.)
30
BASICDIGITALLOGICGATES(CONT.)
X
AND Gate AND Z
Y
🢝Represented by any of the following
notations: Symbol diagram
🢝 X AND Y
🢝X . Y
🢝X Y
🢝Function definition:
Z=1 only if X=Y=1 X Y
AND
0 otherwise
Switch representation
31
BASICDIGITALLOGICGATES(CONT.)
X
OR Z
OR Gate Y
🢝Represented by any of the following notations:
Symbol diagram
🢝X OR Y
🢝X + Y
🢝X v Y
X
🢝Function definition:
OR
32
LOGICGATESTIMINGDIAGRAM
• Timing diagrams illustrate the response of any gate to all possible input
signal combinations
•The horizontal axis of the timing diagram represents time and the vertical
axis represents the signal asit changes between the two possible voltage
levels 1 or 0
33
DIGITALLOGICGATES
Gates can have more than 2 inputs
34
HOWTODESCRIBEALOGICSYSTEM?
35
TRUTHTABLES
A Truth Table is a table of combinations of the binary variables showing
the relationship between the different values that the input variables take
and the result of the operation (output).
The number of rows in the Truth Table is 2n, where n = number of input
variables in the function.
The binary combinations are obtained from the binary number by counting
from 0 to 2n 1
X
Example: AND gate with 2 inputs Z
Y X Y Z
n=2 0 0 0
All input 0 1 0 output
The truth table has 22 rows = 4 combinations 1 0 0
The binary combinations are from 1 1 1
0 to (22-1=(3)) {00,01,10,11}
Truth table of an AND gate
36
BOOLEANEXPRESSIONS
We can use these basic operations to form more complex
expressions:
f(x,y,z) = (x + y’)z + x’
Some terminology and notation:
🢝 f is the name of the function
🢝 (x,y,z) are the input variables, each representing 1 or 0. Listing
the inputs is optional, but sometimes helpful
🢝 A literal is any occurrence of an input variable or its complement.
The function above has four literals: x, y’, z, and x’
Precedencies are important, but not too difficult
🢝 NOT has the highest precedence, followed by AND, and then OR
🢝 Fully parenthesized, the function above would be kind of messy:
38
BOOLEANEXPRESSIONSFROMTRUTHTABLES
Each 1 in the output of a truth table specifies one term
in the corresponding Boolean expression
39
ANOTHEREXAMPLE
A B C F
F=?
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
F= A’B’C +
1 0 0 1 A’BC’ +
1 0 1 0 AB’C’ +
1 1 0 0
1 1 1 1 ABC
40
BASICLOGICGATES
• We have defined three basic logic gates and operators
42
COMMUTATIVELAW
The commutative law of addition for two variables is
A+B = B+A
A
B
A+B B
A
B+A
A
B
AB B
A
BA
43
ASSOCIATIVELAW
The associative law of addition for 3 variables is
A+(B+C) = (A+B)+C
A+B
A A+(B+C) A
B B
(A+B)+C
C B+C C
A A AB
A(BC)
B B
(AB)C
C BC C
44
DISTRIBUTIVELAW
The distributive law for multiplication is
A(B+C) = AB + AC
B B+C A AB
C B
X A
A
C AC
X=A(B+C) X=AB+AC
Thedistributive law for addition is
A+(B.C) = (A+B)(A+C)
A A+B
B BC
B
C X
X A
A
C A+C
X=A+(B.C) X=(A+B)(A+C)47
BASICTHEOREMSOFBOOLEANALGEBRA
1.A 0 A 7.A A A
2.A 1 1 8.A A 0
3.A 0 0 9.A A
4.A1 A 10.A AB A
5.A A A 11.A AB A B
6.A A 1 12.( A B)( A C) A BC
A, B, and C can represent a single variable or a combination of variables.
46
DUALITY PRINCIPLE
A Boolean equation remains valid if we take the dual of the
expressions on both sides of the equals sign
The dual of an expression is reached as follows:
🢝Interchange any 1 with a 0 (and vice-versa)
🢝Interchange any AND () with an OR (+) (and vice-versa)
47
DEMORGAN’S LAW
AB A B
A B AB
48
EXAMPLE
Get the logic function from the following truth table and implement
it using basic logic gates (AND, OR, NOT)
A B P P = A’ B’ + A’B + A B’
0 0 1
0 1 1
• It needs two inverters +
1 0 1 three AND + two OR gates
= 7 gates to implement the
1 1 0 function
Can we make this circuit better?
• Cheaper: fewer gates The answer is in the simplification
•Faster: fewer delays from inputs to of the logic function
outputs
49
SIMPLIFICATIONOFTHELOGICFUNCTION
P=A’B’ + A’B + AB’
= A’ * (B’ + B) + A * B’ (Distributivity)
= A’ * (B + B’) + A * B’ (Commutativity)
= A’ * 1 + A * B’ (x + x’ = 1)
= A’ + (A * B’) (x +x’y)=(x+x’)(x+y)(Distributivity)
Simplification rules allow us here to optimize the design and use a single gate!
50
DERIVEDGATES
NAND NOR XOR XNOR
AND-Invert OR-Invert Odd Even
X Y Z X Y Z X Y Z X Y Z
0 0 1 0 0 1 0 0 0 0 0 1
0 1 1 0 1 0 0 1 1 0 1 0
1 0 1 1 0 0 1 0 1 1 0 0
1 1 0 1 1 0 1 1 0 1 1 1
51