0% found this document useful (0 votes)
122 views17 pages

Sequential and Programmable Logic Latches, Flip Flops, Memory Registers, Ram, Rom

The document discusses sequential logic components like latches and flip-flops, their operation and types. It describes clock signals and how flip-flops use clock pulses. Different flip-flop types are explained along with their truth tables and representations - SR, JK, D and T flip-flops. Registers made of flip-flops are covered. Counters as sequential circuits are introduced and a 2-bit up/down counter diagram is shown. The differences between RAM and ROM are summarized.

Uploaded by

ShujaAmjad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
122 views17 pages

Sequential and Programmable Logic Latches, Flip Flops, Memory Registers, Ram, Rom

The document discusses sequential logic components like latches and flip-flops, their operation and types. It describes clock signals and how flip-flops use clock pulses. Different flip-flop types are explained along with their truth tables and representations - SR, JK, D and T flip-flops. Registers made of flip-flops are covered. Counters as sequential circuits are introduced and a 2-bit up/down counter diagram is shown. The differences between RAM and ROM are summarized.

Uploaded by

ShujaAmjad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Lecture 10

Sequential and programmable Logic

Latches, Flip Flops, Memory Registers,


RAM, ROM

1
Flip Flops
• Continuously check its inputs and changes its output accordingly
only at times determined by clocking signal
• It works on bases of clock pulses
• Flip flops are slower than latches due to clock signal
• Power requirement of flip flops is more
• Different flip flops are
- SR flip flop
- JK flip flop
- D flip flop
- T flip flop

2
Clock
• It is usually derived from an oscillator or other circuitry that
alternates its output between 1 and 0
• It is used to synchronize the flow of data in a digital system

1
0
Rising (positive)
Edge
Falling (negative)
Edge
Positive Level

3
Negative Level
In flip flops ususally whatever is input is usually stored as output

SR Flip Flop S'

• Gate level representation

R'

• Truth table S R CLK Output

0 0 1 No change
1 0 1 Q=1
0 1 1 Q=0
1 1 1 Invalid
• Waveform

4
SR Flip Flop
• Question: For a given S and R inputs to SR flip-flop, sketch the output
signal Q.

• Solution:
S R CLK Output
- Truth table
0 0 1 No change
1 0 1 Q=1
0 1 1 Q=0
1 1 1 Invalid

- Output signal
5
JK Flip Flop
Q'

• Gate level representation

• Truth table J K CLK Output

0 0 1 No change
1 0 1 1
0 1 1 0
1 1 1 Toggle
• Waveform

6
D
Data
Flip Flop
• Gate level representation

• Truth table
D CLK Output
0 1 0
1 1 1

• Waveform

7
T Flip
Toggle
Flop
• Gate level representation

• Truth table
CLK T Output
1 0 Q
1 1 Qˊ

• Waveform

8
Registers
• Group of binary storage cells suitable for holding binary
information
• It consists of a group of flip flops and gates that effect their
transmission
• Simplest possible register
- consists of only flip flops
- no external gates
• Example: 4 bit register

9
Registers
• A sequential circuit may consist of a register (memory) and a
combinational circuit.
• The external inputs and present states of the register determine
the next states of the register and the external outputs, through
the combinational circuit.

10
Using Registers to implement Sequential Circuits

• Example 1: Design a Sequential Circuit whose state table is given


below using two flip-flops.

• Solution
A = ∑ m(4,6) = A . xˊ
A = ∑ m(1,2,5,6) = A .xˊ + Aˊ .x
= A ⊕x
y = ∑ m(3,7) = A .x

11
Counters

• Counters are specific type of sequential circuit


• The state serves as the “output”
• Counter that follows binary number sequence is called binary counter
• Synchronous binary counter
- The output value increases by one on each clock cycle
- After the largest value, the output “wraps around” back to 0

Present State Next State 00 01


A B A B
0 0 0 1
0 1 1 0
1 0 1 1
1 1 0 0 11 10
12
Synchronous Binary Up/Down Counter

• 2-bit Up/Down counter


- Counter outputs will be 00, 01, 10 and 11
- There is a single input, X.
> X= 0, the counter counts up
> X= 1, the counter counts down

00 01

11 10
13
The complete state diagram and table

• 2-bit Up/Down counter


- Counter outputs will be 00, 01, 10 and 11
- There is a single input, X.
> X= 0, the counter counts up
> X= 1, the counter counts down
Present State Inputs Next State
0 A B X A B
00 01 0 0 0 0 1
1
0 0 1 1 1
0 1 1 0 0 1 0 1 0
0 1 1 0 0
1 1 0 0 1 1
11 10
1 0 1 0 1
0 14
1 1 0 0 0
1 1 1 1 0
Unused States

• A stable table and diagram for a counter that repeatedly counts


- 0 (000) to 5 (101)
• What shall be the values in the table for two unused states ?

Present State Next State


A B C A B C
0 0 0 0 0 1
0 0 1 0 1 0
0 1 0 0 1 1
0 1 1 1 0 0
1 0 0 1 0 1
1 0 1 0 0 0
1 1 0 ? ? ?
1 1 1 ? ? ? 15
Unused States: Don’t Care

• To make the circuit simplest, we can fill in the next states


- 6 (110) with don’t care
- 7 (111) with don’t care

Present State Next State


A B C A B C
0 0 0 0 0 1
0 0 1 0 1 0
0 1 0 0 1 1
0 1 1 1 0 0
1 0 0 1 0 1
1 0 1 0 0 0
1 1 0 X X X
1 1 1 X X X 16
RAM vs ROM
Features RAM (Random access Memory) ROM (Read Only Memory)

Volatility It is volatile in nature as it is automatically It is non-volatile and is never erased when computer
erased when computer shuts down shutdowns or restarts

Accessability It can directly be accessed by processor It cannot directly be accessed by processor, since it
is transferred into RAM where it is executed by
processor

Hardware It is in form of chip Optical drives made of magnetic tape


Structure

Cost Expensive than ROM Cheaper than RAM

Size Larger than ROM Smaller than RAM

Writing speed Faster than ROM Slower than RAM

Storage Stores upto 16 GB or more per chip Stores upto 4 MB or more per chip

17
How it looks like

You might also like