Microsoft PowerPoint – Week 5 2020
Week 5
Outline
• Finish up Week 4 (Combinational Digital logic):
• Boolean Algebra vs Truth Tables
• Expressions
• Simplification
• Logic Gates
• Evaluating a combinational logic circuit
• Designing a combinational logic circuit
Quick reminder
• Combinational logic can be made up of 3 Boolean operations:
• Conjunction/disjunction/negation
• AND/OR/NOT
• SOP/POS are standard ways to represent circuits
• Easily map to truth tables
SOP/POS example
• abc+b’c+a’c’
Activity 2
Simplifying Boolean Expressions
• Is there any other way to write x+x’y?
• How do we show they are equivalent?
Boolean algebra rules
Law Name Expression
Identity 1*x = x, 0 + x = x
Null 0*x = 0, 1 + x = 1
Idempotent x*x = x, x + x = x
Inverse x*x’ = 0, x + x’ = 1
Commutative x*y = y*x, x + y = y + x
Redundancy x + x’y = x + y, x(x’+y) = xy
Associative (xy)z = x(yz), (x+y) + z = x + (y+z)
Distributive x + yz = (x+y)(x+z), x(y+z) = xy + xz
Absorption x(x+y) = x, x + xy = x
De Morgan (xy)’ = x’ + y’, (x+y)’ = x’y’
Double Complement (x’)’ = x
Why Boolean Algebra if truth tables work?
Why Boolean Algebra if truth tables work?
• Can take a long time to write truth tables…
Simplifying Compound expressions
• (a+b’)(c+d)’
• x+y’z+x’z+xy’ = x+z (from worksheet)
Boolean algebra to silicon
• Logic gates key to any digital circuit
• Need to be able to implement all Boolean functions to manipulate 1’s
and 0’s
• Chip designers implement these logic circuits in silicon
Boolean algebra to silicon
Other common gates
Other common gates
Other common gates
• Do we need an xor gate?
• Is there any other way of
implementing it?
Other common gates
Other common gates
• Why? Easy in CMOS
Other common gates
How do gates work?
• Consider an AND gate
How do gates work?
• Consider an AND gate
• How fast does it change?
How do gates work?
• Consider an AND gate
• How fast does it change?
• Which gates change fastest?
How do gates work?
• Consider an AND gate
• How fast does it change?
• Nanoseconds
• You can assume it is near instant
• Which gates change fastest?
How do we evaluate a circuit?
• Suppose we are given a random circuit:
• How do we study its input and output behaviour
Activity 3
Reverse question
• Suppose we want to implement a (Boolean) function
• How do we turn this into a circuit
Activity 4
Can you use basic gates
Sequential logic
What is sequential logic?
What is sequential logic?
• Memory/timing
• Allows sequence of operations
Why sequential logic?
Why sequential logic?
• Hard to implement any digital circuit (or computer program) without
memory
Why sequential logic?
• Hard to implement any digital circuit (or computer program) without
memory
• Example: Design a digital circuit to control a pedestrian crossing with
a traffic light
Why sequential logic?
• Hard to implement any digital circuit (or computer program) without
memory
• Example code:
While x<10
Do something
Sequential Circuit vs Combinational Circuits
1. No memory elements.
2. No feedback from the outputs
to the inputs.
3. Outputs depend only on the
inputs.
Combinational logic
How do I modify this diagram to represent Sequential logic?
Logic
network OutputsInputs
1. Contains memory that can
remember a present state.
2. Outputs feed back to the inputs.
3. Outputs depend on both inputs and
the present state.
The clock
• All sequential circuits rely on a clock
• Common quote of performance for CPUs/GPUs
The clock
• All sequential circuits rely on a clock
• Common quote of performance for CPUs/GPUs
• What is a clock?
The clock
• All sequential circuits rely on a clock
• Common quote of performance for CPUs/GPUs
• What is a clock?
The clock
• All sequential circuits rely on a clock
• Common quote of performance for CPUs/GPUs
• What is a clock?
Quartz crystal
(vibrates at
consistent
frequency, turn
into signal)
The clock
• All sequential circuits rely on a clock
• Common quote of performance for CPUs/GPUs
• What is a clock?
• More generally a signal that goes up and down
The clock
• Events within the computer are synchronized to occur on the rising or
falling edges, or high or low levels of an electrical signal
• In other words:
• Copy input when clock says so
• Otherwise don’t change value
The clock
• Events within the computer are synchronized to occur on the rising or
falling edges, or high or low levels of an electrical signal
• In other words:
• Copy input when clock says so
• Otherwise don’t change value
• Common properties of clocks:
More detail
Vo
lt
ag
e
(v
ol
ts
)
Time (nsec)
Pulse Width
0
3
Logic 0
Logic 1
90% of pulse height
10% of pulse height
Rise time
More detail
What is clock frequency?
Why is a fast clock good?
Latches vs Flip‐flops
Latches vs Flip‐flops
Latches vs Flip‐flops
• Level vs Edge triggering
Timing Diagrams
Timing Diagrams
What are different types of latches/FFs?
Activity 1/2
Registers
• What are registers?
Activity 3
Analysing sequential circuits
• Assume combinational circuit with latch/FF
• How do we determine outputs?
Analysing sequential circuits
• Assume combinational circuit with latch/FF
• How do we determine outputs?
• Example:
• D‐latch with NAND x input and itself
Activity 4
FSMs
• Tool to capture sequence of states
• Enables immediate translation to hardware
• Easiest to understand by example
• Consider a door.
• Three sensors: Person detected, door fully open/shut
• Combine fully open/fully shut signals into single sensor.
Activity 5
Tutorial question