Download as pdf or txt
Download as pdf or txt
You are on page 1of 62

2.

3 BUILD
SEQUENTIAL
LOGIC CIRCUIT
1

1
Learning Outcome
1. Define sequential logic circuit
2. List the types of flip flop
• SR flip flop
• Clocked SR Flip-Flop,
• JK Flip-Flop.
• T Flip-Flop
• D flip-flop
2
LEARNING OUTCOME
3. Draw the block symbol and logic circuit of SR,
Clocked SR JK, T and D flip flop
4. Develop truth table of SR, Clocked SR JK, T
and D flip flop
5. Draw timing diagram of SR, Clocked SR JK, T
and D flip flop
6. Describe registers
7. Describe memory organisation

3
SEQUENTIAL LOGIC CIRCUIT
• Define Sequential Circuits ?
• Sequential logic circuits is circuits is the type of a
digital system that does not only depend on current
input, but also the previous history of the system.
• For that reason sequential logic circuit require
memory to function.
• Sequential circuits have loops - these enable
circuits to receive feedback.
• The building block used to construct device that
store data is called Flip flop.
2.3 SEQUENTIAL CIRCUITS

A general block diagram of a sequential


circuit
5

5
• The output of circuit depends on
the previous output and the present
inputs.

• The inputs must follow a specific


sequence to produce a required
output.
6
COMBINATION LOGIC CIRCUIT.

7
COMBINATIONAL VS SEQUENTIAL LOGIC
CIRCUIT
Combinational logic circuit Sequential logic circuit
refers to circuits whose output is Circuits whose outputs depends not
strictly depended on the present value only on the present input value but
of the inputs also the past input value are known
as sequential logic circuits.

Example: logic gates Example: flip-flop

Basic building block Basic building block include:


include: Flip flop

8
INTRODUCTION – FLIP FLOP
Figure 4.0.1 : General Flip flop
symbol • They are 1 (HIGH) or 0
(LOW).
Q
Inputs Normal
output
• Whenever we refer to
the state of flip flop, we
Q refer to the state of its
Inverted
normal output (Q).
Output

• More complicated Flip


They have two stable conditions flop use a clock as the
and
control input. These
can be switched from one to the
clocked flip-flops are
other by appropriate inputs.
These used whenever the
stable conditions are usually input and output
called signals must occur 9
the states of the circuit. within a particular 9
TYPES OF FLIP FLOP
1. SR Flip Flop
a. SR Flip Flop Active Low = NAND gates
b. SR Flip Flop Active High = NOR gates
2. Clocked SR Flip Flop
3. JK Flip Flop
4. T Flip Flop
5. D Flip Flop

10
THE USED OF FLIP FLOP
• For Memory circuits
• For Logic Control Devices
• For Counter Devices
• For Register Devices

11
SR FLIP FLOP
• The most basic Flip Flop is called SR Flip Flop.
• The basic SR flip flop is an asynchronous device.
• In asynchronous device, the outputs is immediately
changed anytime one or more of the inputs change
just as in combinational logic circuits.
• It does not operate in step with a clock or timing.
• These basic Flip Flop circuit can be constructed
using two NAND gates latch or two NOR gates
latch.
• SR Flip Flop Active Low = NAND gates 12

• SR Flip Flop Active High = NOR gates 12


SR FLIP FLOP
• Figure 4.1.1: • The SR Flip Flop has two
inputs, SET (S) and RESET
• SR Flip Flop logic (R).
Symbol
• The SR Flip Flop
Q
has two
outputs, Q and ¯
input output
• The Q output is considered
the normal output and is
the one most used.
Q
• The other output ¯is
13

simply the compliment of 13


SR FLIP FLOP - NAND GATE- Active Low
• NAND GATE LATCH • The NAND gate version has
two inputs, SET (S) and
RESET (R).

• Two outputs,
Q Q as normal
11 output and ¯ as inverted
output and feedback
mechanism.

• The feedback mechanism is


required to form a
22
sequential circuit by
connecting the output of
NAND-1 to the input of
• Figure 4.1.2: SR NAND NAND-2 and vice versa.
(Active LOW) Logic circuit.
• The circuit outputs depends
14

on the inputs and also on


14
the outputs.
SR FLIP FLOP - NAND GATE
• This condition tries to set and
• Figure 4.1.4.a reset the NAND gate latch at
the same time.
• It produces Q =Q¯ = 1
• This is unexpected condition,
0 1 0 1 since the two outputs should
be inverses of each other.
• If the inputs are returned to 1
simultaneously, the output
states are unpredictable.
2 1 1 • This input condition should not
0 be used and when circuits are
constructed, the design
should make this condition
S = R = 0 never arises.
15
It is called
INVALID/PROHIBITED 15
SR FLIP FLOP - NAND GATE
• Figure 4.1.4.b • Input, S = 0, R = 1
• This will set Q = 1.
0
• It works in SET mode
1 0 1
operation.

2 1 0
1

16

16
SR FLIP FLOP - NAND GATE

• Figure 4.1.4.c • Input S = 1, R = 0


• This will reset Q = 0.
1 1 1 0 • It works in RESET
mode operation.

2 0 1
0

17

17
SR FLIP FLOP - NAND GATE
• Normal Resting • Input S=1 , R=1 ,
State Figure 4.1.4.d • This is the normal
resting state of the
1
1 0
circuit and it has no
0
0 effect of the output
states.
• Output Q and ¯ will
Q

remain in whatever
1
2 1 1
1 state they were in
prior to the
occurrence of this
input condition.
• It works in HOLD 18

mode of operation. 18
SR FLIP FLOP - NAND GATE
• From the description of the NAND gate
latch operation, it shows that the SET
and RESET inputs are active LOW. • Figure 4.1.5 : SR NAND gate
• The SET input will set Q = 1 when SET latch Truth Table
is 0 (LOW). RESET input will reset Q =
0 when RESET is 0 (LOW)
S R Q Q
¯ STATUS
• In the prohibited/INVALID state both
outputs are 1.
0 0 1 1 INVALID
• This condition is not used on the RS
flip-flop.
0 1 1 0 SET
• The set condition means setting the
output Q to 1. RESET
1 0 0 1
• The reset condition means resetting
(clearing) the output Q to 0. The last 1 1 Q Q
¯ HOLD
row shows the disabled, or hold, (NoChange)
condition of the RS flip-flop. The
outputs remain as they were before the
hold condition existed. There is no
change in the outputs from the 19
previous states.

The flip-flop memorizes the previous 19


SR NAND FLIP FLOP-
WAVEFORMS
Example 4.1.1: Determine the Exercise 4.1.1:
output of NAND gate latch which Q
initialy 0 for the given input waveform. Determine the output of NAND
gate latch which Q initially 1 for
S the given input waveforms.

R S
Q R
Q
¯Q
Q ¯
20

20
SR FLIP FLOP
SR Flip Flop logic Symbol
SR NAND gate latch Truth Table

input output S R Q ¯
Q
STATUS

0 0 1 1 INVALID

0 1 1 0 SET
1

1 0 0 1 RESET

1 1 Q ¯
Q
HOLD
2 (NoChange)

SR NAND (Active LOW)


Logic circuit.
21
SR FLIP FLOP - NOR GATE

• NOR GATE LATCH • The latch circuit can


also be constructed
using two NOR gates
latch.

• The construction is
similar to the NAND
latch except that the
Q
normal output Q and
inverted output ¯
• Figure 4.1.6: SR NOR have reversed
(Active HIGH) Logic circuit positions.
22

22
SR FLIP FLOP - NOR GATE
The analysis of a SR FLIP FLOP
SR FLIP FLOP NOR NOR :
(Active HIGH) Logic circuit
* S = 0, R = 0; This is the normal

resting state of the circuit and it

has no effect of the output states.

Q and ¯ will remain in whatever


Q were in prior to the
state they

occurrence of this input condition.

It works in HOLD (no change)

mode operation.

• S = 0, R = 1; This will reset Q to 0, it


works in RESET mode operation.
23

23
SR FLIP FLOP - NOR GATE
• S = 1, R = 0; This will set Q to 1, it works in SET mode operation.
• S = 1, R = 1; This condition tries to set and reset the NOR gate
latch at the same time, and itQproduces Q = ¯ = 0. This is an
unexpected condition and are not used.

Since the two outputs should be inverse of each other. If the inputs
are returned to 1 simultaneously, the output states are
unpredictable.

This input condition should not be used and when circuits are
constructed, the design should make this condition
SET=RESET = 1 never arises.
24

24
SR FLIP FLOP - NOR GATE
• From the description of • Figure 4.1.7 : SR NOR gate
the NOR gate latch latch Truth Table
operation, it shows that
S R Q ¯ STATUS
the SET and RESET Q
_ HOLD
inputs are Active HIGH. 0 0 Q Q (NoChange)

0 1 0 1 RESET

• The SET input will set Q 1 0 1 0 SET


= 1 when SET is 1 INVALID
1 1 0 0
(HIGH). RESET input
will reset Q when
RESET is 1 (HIGH). 25

25
SR NOR FLIP FLOP -
WAVEFORMS
• Example 4.1.2: Determine the • Exercise 4.1.2 : Determine the
output of NOR gate latch which output of NOR gate latch which
Q initially 0 for the given input Q initially 1 for the given input
waveforms. waveforms.

S S

R R
Q Q
Q
¯ Q
¯
26

26
SR NOR FLIP FLOP

SR NOR gate latch Truth Table

S R Q ¯ STATUS
Q
_ HOLD
0 0 Q Q (NoChange)

0 1 0 1 RESET

1 0 1 0 SET

SR NOR 1 1 0 0 INVALID
(Active HIGH) Logic circuit

27
THE CLOCK
• In synchronous device, the exact
times at which any output can change
states are controlled by a signal
commonly called the clock.
• The clock signal is generally a
rectangular pulse train or a square
wave as shown in figure 4.9.
• The clock is distributed to all parts of
the system, and most of the system
outputs can change state only when
the clock makes a transition.
28

28
THE CLOCK
• When the clock changes from a LOW state to a HIGH
state, this is called the positive-going transition (PGT)
or positive edge triggered.
• When the clock changes from a HIGH state to a LOW
state, it is called negative going transition (NGT) or
negative edge triggered.
Figure 4.2.1: Clock Pulse-Train Enable

Disable
(a) Positive going transition

(b) Negative going transition 29

29
CLOCKED SR FLIP FLOP
• Additional clock input is
added to change the SR
flip-flop from an element • Figure 4.2.2 : PGT Clocked
used in asynchronous SR Flip flop symbol
sequential circuits to one,
which can be used in
synchronous circuits.

• The clocked SR flip flop


logic symbol that is
triggered by the PGT is
shown in Figure 4.2.2

• Its means that the flip flop


can change the output 30
states only when clock
signal makes a transition 30
31
CLOCKED RS FLIP FLOP
Figure 4.2.3: Truth Table
for clocked SR Flip Flop •The Truth Table in figure
clock
4.2.3 shows how the flip
STATUS
S R Q Q
¯ flop output will respond to
_ the PGT at the clocked
0 0 Q Q HOLD
(NoChange)
input for the various
RESET
combinations of SR inputs
0 1 0 1 and output.
1 0 1 0 SET
• The up arrow symbol
INVALID
1 1 0 0 indicates PGT.

32

32
Clocked SR Flip Flop
• Example 4.2.1: Determine the • Exercise 4.2.1: Determine the
output of PGT clocked SR flip flop output of PGT clocked SR flip flop
which Q initially 0 for the given which Q initially 1 for the given
input waveforms input waveforms.

Cp Cp
S
S
R R
Q
Q

¯ ¯
Q
Q
33

33
CLOCKED SR FLIP FLOP

• Figure 4.2.4 : NGT • The clocked SR Flip Flop


Clocked SR Flip flop logic symbol that is
triggered by the NGT is
symbol shown in Figure 4.2.4

• It means that the Flip flop


can change the output
states only when clocked
signal makes a transition
from HIGH to LOW.

34

34
CLOCKED SR FLIP FLOP
• Example 4.2.2: Determine the • Exercise 4.2.2: Determine the
output of NGT clocked SR flip flop output of NGT clocked SR flip flop
which Q initially 0 for the given which Q initially 1 for the given
input waveforms input waveforms.
Cp Cp

S S

R R

Q Q

¯
Q
¯
Q

35

35
JK FLIP FLOP - SYMBOL

• Another types of Flip flop is JK flip • Figure 4.3.1 : PGT JK Flip


flop. flop symbol
• It differs from the SR flip flops
when J=K=1 condition is not
indeterminate but it is defined to
give a very useful changeover
(toggle) action.
Q
• Toggle means that Q and ¯ will
switch to their opposite states.
• The JK Flip flop has clock input
Cp and two control inputs J and • Figure 4.3.2 : NGT JK Flip
K. flop symbol
• Operation of Jk Flip Flop is
completely described by truth
table in Figure 4.3.3.
36

36
JK FLIP FLOP – TRUTH TABLE AND
LOGIC CIRCUIT
Figure 4.3.3: Truth Table • Figure 4.3.4: JK FLIP FLOP
for JK Flip Flop LOGIC CIRCUIT
clock
J K Q Q
¯ STATUS
_
0 0 Q Q HOLD
(No Change)

0 1 0 1 RESET

1 0 1 0 SET
_ Toggle
1 1 Q Q

37

37
JK FLIP FLOP - WAVEFORMS
Example 4.3.1 : Determine the output of PGT clocked JK flip flop for
the given input waveforms which the Q initially 0.

Clk

38

38
JK FLIP FLOP - WAVEFORMS
Exercise 4.3.1:Determine the Exercise 4.3.2:Determine the
output output
of NGT clocked JK flip flop for the of PGT clocked JK flip flop for the
given input waveforms which the given input waveforms which the
Q initially 0. Q initially 0.
Cp Cp

J J

K K

Q Q

Q̄ ¯Q

39

39
T FLIP FLOP - SYMBOL
• The T flip flop has only • Figure 4.5.1: Symbol for T
Flip Flop
the Toggle and Hold T
Operation. CP

Figure 4.5.2 :Truth Table for T Flip Flop


• If Toggle mode operation.
clock status
The output will toggle T Q Q
from 1 to 0 or vice versa.
0 Q Q HOLD
TOGOL
1 Q Q
40

40
T FLIP FLOP – LOGIC CIRCUIT

Logic circuit T Flip flop Logic circuit T Flip flop


using NOR gate using NAND gate

T
T

Cp
Figure 4.5.3: Logic circuit for T Flip Flop
41

41
T FLIP FLOP – WAVEFORMS
Example 4.5.1 : Determine the output of PGT T flip flop for
the given input waveforms which the Q initially 0.

Clk

42

42
T FLIP FLOP – WAVE FORMS
Exercise 4.5.1 : Determine the Exercise 4.5.2 : Determine the
output of output of
PGT T flip flop for the given NGT T flip flop for the given
input input
waveforms which the Q initially waveforms which the Q initially
0. 0.
Cp Cp

T T

Q Q

Q Q

43

43
D FLIP FLOP
• Also Known as Data Flip flop • Figure 4.6.1 :
• Can be constructed from RS • D Flip flop symbol
Flip Flop or JK Flip flop by
addition of an inverter.
• Inverter is connected so that
the R input is always the
inverse of S (or J input is
always complementary of K).
• The D flip flop will act as a
storage element for a single
binary digit (Bit).
44

44
D FLIP FLOP - SYMBOL

• PGT • NGT
Positive Edge Negative Edge
Q Q
D D

D D
Flip Flop Flip Flop

Clk Clk Q
Q

Figure 4.6.2 : D Flip flop symbol using JK Flip Flop / SR Flip Flop
45

45
D FLIP FLOP- LOGIC CIRCUIT-TRUTH
TABLE
• Figure 4.6.3: Logic • Figure 4.6.4: Truth
circuit for D Flip Flop Table for D Flip Flop
clock status
D Q Q
¯
RESET
0 0 1
1 1 0 SET

Cp

46

46
D FLIP FLOP – WAVEFORMS
Example 4.6.1 : Determine the output • Exercise 4.6.1 Determine the
of output of NGT D flip flop for the
PGT D flip flop for the given input given input waveforms, which
waveforms which the Q initially 0. output Q initially 0.

Cp Cp
D D
Q Q

Q Q

47

47
T FLIP FLOPS AND D FLIP FLOPS CAN BE
BUILT USING JK FLIP FLOP
• The JK flip flop is • Figure 4.7.1 : D Flip flop
considered as a universal symbol using JK Flip Flop /
flip flop. SR Flip Flop

• A combination of Jk flip
flop and an inverter can
construct a D Flip Flop as
shown in Figure 4.18 • Figure 4.7.2 : T Flip flop
symbol using JK Flip Flop /
• It also can construct T T
SR Flip Flop
Flip Flop by combine
both J and K inputs with
HIGH level input as 48

shown in Figure 4.19 48


REGISTER
• Is a digital circuit used within the CPU to
store one or more bit of data.
• Parallel Register – a set of 1 bit memories
that can be read or written simultaneously
• Shift Register – Accept and/or transfer
information serially. Can be used to
interface to serial I/O devices. Need to be
equipped with parallel read/write circuitry as
well as serial.
WHAT IS REGISTER?

• a register is a digital circuit used within


the CPU to store one or more bits of
data.
• Two basic types: parallel registers and
shift registers.
PARALLEL REGISTERS

• consists of a set of 1-bit memories that can


be read or written simultaneously.

• It is used to store data.


• The 8-bit register of figure below illustrates the operation of a parallel
register using D flip-flops.

• control signal, labelled load, controls writing into the register from signal
lines, D11 through D18.
• These lines might be the output of multiplexers.
• so that data from a variety of sources can be loaded into
the register.
SHIFT REGISTER
• A shift register accepts and/or transfers
information serially.
• Figure below shows a 5-bit shift register
constructed from clocked D flip-flops.
• Data are input only to the leftmost flip-flop.
SHIFT REGISTER
With each clock pulse, data are shifted to the right
one position, and the rightmost bit is transferred
out.
CONT…

• Shift registers can be used to interface


to serial I/O devices.
• It can be used within the ALU to
perform logical shift and rotate
functions.
MEMORY ORGANISATION

57
PRIMARY STORAGE
• is the top level and is made up of CPU registers, CPU cache
and memory which are the only components that are directly
accessible to the systems CPU.

• The CPU can continuously read data stored in these areas


and execute all instructions as required quickly in a uniform
manner.

• Secondary Storage differs from primary storage in that it is not


directly accessible by the CPU.

• A system uses input/output (I/O) channels to connect to the


58
secondary storage which control the data flow through a
system when required and on request
SECONDARY STORAGE

• is non-volatile so does not lose data when it is powered


down so consequently modern computer systems tend
to have a more secondary storage than primary storage.

• All secondary storage today consist of hard disk drives


(HDD), usually set up in a RAID configuration, however
older installations also included removable media such
us magneto optical or MO

59
TERTIARY STORAGE
• is mainly used as backup and archival of data and
although based on the slowest devices can be
classed as the most important in terms of data
protection against a variety of disasters that can
affect an IT infrastructure.

• Most devices in this segment are automated via


robotics and software to reduce management costs
and risk of human error and consist primarily of disk
& tape based back up devices
60
OFFLINE STORAGE
• is the final category and is where removable
types of storage media sit such as tape
cartridges and optical disc such as CD and
DVD.

• iscan be used to transfer data between


systems but also allow for data to be
secured offsite to ensure companies always
61
have a copy of valuable data in the event of
a disaster.
REGISTER VS MEMORY
REGISTER MEMORY
Located internal of the Located external to the CPU
processor
Hold data, the processor is Hold program instruction
currently working on and the data, the program
requires
Faster Slower (RAM)
Small capacity Bigger capacity
Specialized register – base
register, stack register, flags
register, program counter
and addressing register

You might also like