Professional Documents
Culture Documents
Topic 4
Digital Logic (Part 2)
• Combinational circuits
o Implement functions of a computer
o Outputs depend entirely on the present input
o No memory (except for ROM)
• Storage elements
o Devices that are capable of storing binary information
(which defines the state of the sequential circuit)
Sequential Circuit
• 2 inputs
o S (Set) and R (Reset)
• 2 outputs
o Q and Q
• 2 NOR gates connected in a feedback manner
S-R Latch
0
1
0
1
0
0
0
1
0
1
1
0
S-R Latch
1
0
0
1
S-R Latch
• Summary
o S writes a 1 to Q
o R writes a 0 to Q
o S=1 and R=1 at the same time are not allowed
– Inconsistent output
S-R Latch
Clocked S-R Flip-Flop
• S-R latch
o Output changes in response to a change in input
o Brief time delay
o Asynchronous
• Events in digital computer are synchronised
according to clock pulse
o Clocked S-R flip-flop
D Flip-Flop
1 0
0
1
1 1
0
1
S-R vs. J-K vs. D Flip-Flips
Outline
• Sequential Circuits
o Flip-Flops
o Registers
o Counters
• Programmable Logic Devices
o Programmable Logic Array
o Field-Programmable Gate Array
Registers
• Slow
o Output of one flip-flop triggers a change in the next
flip-flop (ripple effect)
• The counter is incremented at each clock pulse
(0000, 0001,0010,0011,…1111, 0000)
• J and K inputs to each flip-flop are held at 1
o When there is clock pulse, output Q is inverted (0 to
1, 1 to 0)
• Q0 is least significant bit
Ripple Counter
Synchronous Counter
• Faster
o All flip-flops change state at the same time
o CPUs use synchronous counters
• E.g. 3-bit counter using J-K flip-flop
o 3 flip-flops (A, B, and C – A is least significant bit)
o Construct truth table
Synchronous Counter
Synchronous Counter
= =
= =
= =
Synchronous Counter
• Ja = 1 • Jb = A • Jc = BA
• Ka = 1 • Kb = A • Kc = BA
Outline
• Sequential Circuits
o Flip-Flops
o Registers
o Counters
• Programmable Logic Devices
o Programmable Logic Array
o Field-Programmable Gate Array
Programmable
Logic Devices
http://en.wikipedia.org/wiki/Field-programmable_gate_array