Professional Documents
Culture Documents
Sequential logic
Author: David Martínez Antón
Contact
Email: david.martinez@uneatlantico.es
Sequential logic: introduction
Sequential logic can be described as a type of logic circuits whose outputs depends not only on the
present values of its inputs signals but also on the sequence of past outputs. This is in contrast to
combinational logic, whose outputs depends only on the present inputs. This means that sequential
logic has state (memory) while combinational does not:
Basic sequential
Basic combinational logic scheme
logic scheme
S-R and R-S Latches:
Latches are a temporal storage device of two states that can remain in any of their two states thanks
to their “feedback”, due to the fact that each of their outputs are connected to their inputs. Flip-
flops and latches can be considered as the building blocks of computer memory.
SR and RS latches, can be thought of a “1 bit memory”. The circuits remember the state until it is
triggered by another input pulse or until the power is removed, this is why this type of circuits are
known as a bistable latch. In order to understand this type of devices we must first remember the
behavior of an or gate and an and gate and their truth tables:
7 8
6
R-S latch: how it works (V)
Now the “Reset” pulse is removed, the latch is currently storing a “0” for “Q”, both “R” and “S” are
“0” again, and output “Q” remains in “0” and its inverse “” is “1”. A set pulse is applied, “S” is “1”
and “R” is “0”, the output “Q” becomes “1” and “” becomes “0”.
10
9 11
R-S latch: how it works (VI), forbidden state
The set pulse is removed, “Q” is “1” and “” is “0”. The only circumstance that have not been
considered is when both inputs “R” and “S” are set to “1” at the same time. If this will to occur, we
will be telling the latch to set the value “1” and “0” simultaneously, but in reality “Q” will become
“0” and “” will also become “0”. This will sort itself out if one of the inputs fell to “0” before the
other, for example, if “R” fell to “0” first with “S” still “1” then “Q” will become “1”again. If however,
both inputs are at “1” and both fell to “0” at the same time, we have what it is known as a race
condition between the two gates, since they will be racing each other to feed back their new
output, being impossible to know which one will “win”.
Remember:
S=1 and R=1 To consider:
is the invalid state • Normal condition
for an R-S latch • Forbidden state
S-R latch: how it works
The wiring of an S-R latch is the same as the R-S latch, but now it is build out of “NAND” gates and
the “S” input is located at the top while the “R” is at the bottom. Notice that the output truth table
now is different from the one in the “R-S latch”. In this type (“S-R latch”), “S” and “R” are kept high
most of the time.
NAND gate
“Active-low” SR latch truth table
A B Output S R Q
0 0 1 0 0 1 1
0 1 1 0 1 1 0
1 0 1 1 0 0 1
1 1 0 0 1
1 1
1 0
3
1 2
S-R latch: how it works (III) resetting the
latch
When “R” is set low momentarily, the output “” is forcibly going to be a “1”, this is feed back into
the inputs of the top “NAND” gate, being the output “Q” “0”. “R” can then return to its normal high
value and the latch is now storing a “0” again
2
1 To consider: then the S-R
latch will ignore any
further set signals after it
has already been set
To consider: when the switch connects
input “S” to earth, it will make it low
3
thereby changing the output “Q” of the
S-R latch from low to high
S-R latch: chronogram exercise
Provided the following “time-chart” (chronogram), find the corresponding square wave of the
output “Q”. Consider the starting state of “Q” as “0”:
Q
S-R latch: chronogram exercise solution
S-R latch circuit scheme
Q
Gated R-S latch: introduction and application
A gated set-reset latch is an SR latch that can only change state while it is enabled. Application: an
application of the “gated SR latch” could be for example used in an air conditioning system in a
building, each room could have its own cooling unit controlled independently by its own SR latch,
coming from a temperature sensor the “Set” and “Reset” signals, or a humidity sensor in the room.
Since these are gated SR latches, a control panel could be used to enable or disable the switching
“on” and “off” of these units on a room-by-room basis:
To consider: the input
Abstraction symbol Gated R-S latch “E” can be used to enable
of a “gated S-R latch” or disable the latching
effect.
NAND gate
truth table
A B Output
0 0 1
0 1 1
1 0 1
1 1 0
Gated S-R latch: chronogram example 2
Now let’s examine an example where input “E” varies. The starting state here is “0” for “Q”, and
because “E” is low, the latch is disabled, so as we can check, if “S” goes “high”, it has no effect on
the output “Q” since input “E” is disabled. Remember that input “S” and “R” are only going to
affect the latch if “E” is enabled, but being “E” enabled does not imply that “S” and “R” change the
output “Q”:
NAND gate
truth table
A B Output
0 0 1
0 1 1
1 0 1
1 1 0
Gated S-R and gated R-S latches: summary
An R-S latch (the one built from “NOR” gates), can be turned into a “gated R-S latch” by adding a par
of “AND” gates to it. An S-R latch (the one built from “NAND” gates) can be turned into a “gated S-R
latch” by adding a pair of “NAND” gates to it. This changes the “S-R latch” from an “active-low S-R
latch” to an “active-high S-R latch”
Gated S-R latch
Gated R-S latch Logic symbol
1 2
3 4
Gated D latch: how it works (II) and rewiring
the circuit
As you can see, the latch now will not respond to changes in input “D”, since input “E” is not
enabled, so it is locked in its current state.
5 6
D latch rewired
Newer one 1
Old version 2
Gated D latch rewired: how it works (I)
Let’s continue checking how the states evolves depending on the changes that we apply. Now “E”
goes low and the output “Q” remains with the same value, “0”. “E” is still low, “D” becomes high,
but there is no change in the output “Q” since the latch is still disabled. Now “E” becomes high
again, being “D” already high, so output “Q” goes high
4
3
Remember: since it is
a “gated” latch, input “E”
must be enabled so as to 5
the input “D” can affect
the circuit
Gated D latch: chronogram example
Let’s try to analyze the following example of a chronogram for a gated D latch. Remember that since
“” is the opposite of the output “Q”, is not going to be consider in the chronogram:
NAND gate
truth table
A B Output
Remember: the D latch can be implemented either 0 0 1
with the “NOT gate” circuit or with the “rewired one” 0 1 0
1 0 0
1 1 0
Gated D latch: summary and applications
“Gated D latches” or just “D latches” can be built from a “gated S-R latch”, either including a NOT
gate or by rewiring the existing NAND gates. Its behavior can be described as that the output “Q”
follows the input “D” while the latch is enabled, that is, while input “E” is high. If the latch is
disabled, it retains its current state. It can be used to store 1 bit of data, so it is a 1 bit memory
device:
D latch “abstraction
D latch using a “NOT” gate D latch rewired symbol”
1 2
3
To consider: as we can see
this effect of the NOT
gate “lagging” can be used
to implement the
raising edge
Flip-flops: implementation of the raising edge (IV),
adding it to the circuit and chronogram example
We can finally add our “raise detector device” to our circuit . Let’s check an example to see how
it works:
D Flip flop
“abstraction
symbol”
triggered by
Final implementation raising edge
in a “D latch”
Flip-flops: raising edge problematic and
falling edge detector implementation
One of the problem with using this particular “raising edge detector device” is that the pulse that it
produces may not be wide enough to open the latch an let data in. This actually depends on
several factors including the operating characteristics of the electronic components and the specific
voltage levels being applied. However, we can increase the delay of our edge detector and
therefore the pulse by adding several NOT gates.
D Flip flop
“abstraction NOR gate truth
To consider:
symbol” table
we need an odd
triggered by
number of not gate A B Output
falling edge
to invert the signal
0 0 1
0 1 0
Falling edge implementation
1 0 0
To consider: we can build a “falling edge
detector” using a NOR gate instead. 1 1 0
When both are momentarily low at the
negative edge of the clock cycle, we will
get a high output
S-R flip flops: how it works
Now that we have learned how to implement the raising edge detector and the falling edge
detector, let’s see how it works in a S-R flip-flop. Remember than in flip-flops the input data “S” and
“R” are only transferred to the output only with the clock pulse. Let’s summarize the behavior of a
“triggered raising edge flip-flop” with the following table:
INPUT OUTPUT NOR gate truth
COMMENTS table
S R CLK Q
Remember: 0 0 X No change A B Output
“clk” stands 0 0 1
0 1 0 1 RESET
for “clock pulse”
1 0 1 0 SET 0 1 1
1 1 ? ? Invalid condition 1 0 1
1 1 0
To consider:
we can see flip flops also build De Morgan’s Laws
with “negative-OR” gates instead of with
NAND gates, since their = *
behavior and therefore truth table is the NAND Negative - OR
same since we can apply the DeMorgan’s = +
theorems
S-R flip flops: how it works (II)
So the electronic scheme for an S-R flip flop could be the following one. Remember that the
“negative-OR” gates are equivalent to the NAND ones:
To consider: “R-E-D”
S stands for “Raising Edge
Q Device” and “F-E-D” stands
for “Falling Edge Device”
CLK R-E-D/
F-E-D
Remember: a flip-flop cannot
𝑄 change state except during
R the raising edge or the falling
edge. This implies also that inputs
“S” and “R” can change while the
Steering gates Latch
clock input is high and there will
be no change in the output “Q”,
except during a small period of time
S-R Flip-Flop during the clock transitions from
low to high or high to low
S-R flip flops: chronogram example
Provided the following “time-chart” (chronogram), find the corresponding square wave of the
output “Q”. Consider the starting state of “Q” as “0”:
INPUT OUTPUT
COMMENTS
S R CLK Q
0 0 X No change
0 1 0 1 RESET
1 0 1 0 SET
Invalid
1 1 ? ?
condition
S-R flip flops: chronogram example 2
Provided the following “time-chart” (chronogram), find the corresponding square wave of the output “Q”.
Consider the starting state of “Q” as “0”:
INPUT OUTPUT
COMMENTS
S R CLK Q
0 0 X No change
0 1 0 1 RESET
1 0 1 0 SET
Invalid
1 1 ? ?
condition
D flip flops: how it works
D flip flops are useful when we need to store only a 1 bit memory (1 or 0). The implementation of
this flip flop is done by adding a NOT gate to a S-R flip flop. The behavior of this flip flop can be
summarized with the following table:
Implementing a D flip flop
To consider: we can add our “raising edge” using an S-R flip flop
detector or our “falling edge” detector
to each of the 3 flip flops that
we are going to learn: S-R flip flop, D flip flop
and J-K flip flop
INPUT OUTPUT
COMMENTS
D CLK Q
1 1 0 SET (stores a “1”)
0 0 1 RESET (stores a “0”)
D flip flops: chronogram example
Provided the following “time-chart” (chronogram), find the corresponding square wave of the
output “Q”. Consider the starting state of “Q” as “0”:
INPUT OUTPUT
COMMENTS
D CLK Q
1 1 0 SET (stores a “1”)
0 0 1 RESET (stores a “0”)
J-K flip flops: how it works
It is one of the more used flip flops. Its behavior is really similar to the S-R flip flop for the SET and
RESET operation as well as for the “no change” case. The main difference between this type of flip
flop and S-R ones is that the J-K flip flop does not have “invalid conditions”. As we can see, its
circuit implementation is exactly the same as the S-R ff but now the outputs are feed back to the
inputs, so we are going to use two “3 inputs” NAND gates: NAND gate
truth table
Remember: “Negative-OR” gates behaves
exactly in the same way as “NAND” ones A B C Output
0 0 0 1
R-E-D/ 0 0 1 1
F-E-D 0 1 0 1
NAND Negative - OR
0 1 1 1
1 0 0 1
Remember: “R-E-D”
Steering gates Latch 1 0 1 1
stands for “Raising Edge
Device” and “F-E-D” stands 1 1 0 1
for “Falling Edge Device” J-K Flip-Flop 1 1 1 0
J-K flip flops: how it works (II)
Let’s check the following table that summarizes the behavior of the J-K flip flop. Now, the non-valid
condition of a S-R ff just changes to the opposite state of the ff for the outputs. This is known as
“toggle state”. Let’s check the following truth table that summarizes the behavior of this ff:
Remember:
the main difference INPUT OUTPUT
between the S-R ff COMMENTS
J S CLK Q
and the J-K is that
in the J-K there a 0 0 No change
are no invalid states 0 1 0 1 RESET
1 0 1 0 SET
To consider: this type of 1 1 Toggle
flip-flop is widely used in
shift registers, ripple
counters, event detectors,
frequency dividers etc.
J-K flip flops: chronogram example
Provided the following “time-chart” (chronogram), find the corresponding square wave of the
output “Q”. Consider the starting state of “Q” as “0”. Also indicate all of the states in the changes:
INPUT OUTPUT
COMMENTS
S R CLK Q
0 0 No change
0 1 0 1 RESET
1 0 1 0 SET
1 1 Toggle No
Toggle change Reset Set Set
Summary: synchronous vs asynchronous
sequential logic
Asynchronous Synchronous
Asynchronous sequential circuits Synchronous sequential circuits are
are digital sequential circuits in digital sequential circuits in which
Definition which the feedback to the input for the feedback to the input for next
next output generation is not output generation is governed by
governed by clock signals. clock signals.
The memory unit which is being get Unclocked flip flop or time delay is
Memory unit used for governance is clocked flip used as memory element in case of
flop. Asynchronous sequential circuits.
The states of Synchronous there are chances for the
sequential circuits are always Asynchronous circuits to enter into
predictable and thus reliable. a wrong state because of the time
State
difference between the arrivals of
inputs. This is called as race
condition.
S-R and R-S latches, Gated S-R S-R flip flops, D flipflops, J-K flip
Examples
latches, D latches flops
Asynchronous counter: introduction
In digital logic and computing, a counter is a device which stores (and sometimes displays) the
number of times a particular event or process has occurred, often in relationship to a clock. A basic
asynchronous counter can be built using two flip flops which are going to be connected in the way
shown below. Let’s describe the behavior of a basic 2 bit asynchronous counter:
The first flip flop “FF0” (which is always the “LSB”) changes state at (in this case according to the
logical symbol) each of the raising edge of the clock pulse, whereas the second flip flop “FF1”
(which in this case is the MSB) is triggered by the output “” of the first flip-flop.
To consider: the 2 bit counter is connected basic 2 bit asynchronous counter logic
in an “asynchronous way”. This means that, symbol/circuit implementation with flip-flops
as we can see, the clock pulse is only HIGH
connected to the clock input of the first
flip-flop. Due to the inherent propagation
delay time through a flip-flop, a transition
of the input clock pulse “CLK” and of the
output “”, never occur exactly at the same
time, thus, the flip-flops are never triggered
at the same time, that’s why the counter
operation mode is “asynchronous”
Asynchronous counter: introduction (II)
Let’s analyze the behavior of this 2-bit asynchronous counter by applying 4 clock pulses. The raising edge
of the first clock pulse “CLK1” triggers the first flip-flop “FF0”, making its output “” to go from low to high.
At the exact same time, the “negated output” “” goes from high to low. The raising edge of the second
clock pulse “CLK2” makes “” go from low to high, thus triggering the second flip-flop “FF1” and
consequently, making “” high since this flip-flop starts also in a “reset” state. For the third clock pulse
“CLK3”, “” goes high again, which implies that “” so it does not trigger the second flip flop “FF1”. The
raising edge of the last clock pulse “CLK4” makes “” to go low so “” goes high so it triggers the second
flip-flop “FF1”. After this last clock pulse, the counter is back in its original state:
To consider: the flip-flops
chronogram of a 2 bit asynchronous counter
are connected in a toggle Binary state sequence for a 2
state and are initially in a bit asynchronous counter
“reset” state. Check here Clock pulse
their truth table
Initially 0 0
Remember: is the 1 0 1
opposite signal of
2 1 0
Remember: here is the 3 1 1
explanation to distinguish
4 (new
“raising” vs “falling” edge 0 0
starting state (cyclical behavior) cycle)
Asynchronous counter: 3 bit counter
The state sequence for a 3-bit asynchronous counter is shown in the next table. This type of counter is
going to work in the same way as the 2-bit counter does, except for its chronogram, which is going to has
as many as the double of clock pulses as the 2-bit counter has, hence the 3-bit asynchronous counter is
going to have 8 states. Let’s analyze the chronogram of the 3 bit counter and its circuit implementation:
To consider:
To consider:
the delays in
The pulses
other clock
delays are not
pulses don’t
drawn for
affect the
simplicity
delay in the
other clock
pulses
Asynchronous decade counters:
The modulus of a counter is the number of unique states the counter will pass through. The maximum
possible numbers of state of a counter is , where “n” is the number of flip-flops of the counter. It is possible
to design also a counter that have a number of states in their sequence which is less than the maximum “”,
this is called “truncated sequence”. One common modulus for counters with truncated sequences is ten
(called “MOD10”), this type of counters are called “decade counters”. For example, there are BCD decade
counters whose sequence goes from “0000” to “1001” (0 and 9 respectively in decimal). In order to obtain a
truncated sequence it is necessary to force the counter to restart a new cycle before going trough all of its
possible states. Let’s see how to implement a truncated decade synchronous counter that has an
asynchronous recycling: 10 decoder
To consider:
To consider: BCD the BCD
decade counters HIGH decade
are really useful counter has
in display to restart the
applications cycle in
where BCD codes “0000” after
are needed to reaching
convert to “1001”
decimal
To consider: there is
no glitch in “”
Chronogram of a 10
because it is already
module asynchronous
HIGH when the
counter with active-LOW
decoding occurs
clear input
implementation
Asynchronous decade counters exercise:
Implement the circuit and chronogram for an asynchronous counter with MOD12:
HIGH 0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
… … … … …
11 1 0 1 1
12 1 1 0 0
Decoder not required for and due to the “matching digits” 13 1 1 0 1
14 1 1 1 0
Asynchronous decade counters exercise:
solution (II)
As in previous counters, there is going to be a glitch, in this case it is going to take place in output “”
and obviously in the clear input “”. We are going to have the following chronogram for a 12 module
asynchronous counter:
To consider: it is
Remember:
also possible to
the duration
implement the
of the glitch is
partial decoding
going to be a
with AND gates
few
but in this case
nanoseconds
the active-HIGH
(ns)
logic is going to be
used instead
Asynchronous counter: reducing the
frequency and exercise
Something important to notice is that the output of our decoding gate, the NAND gate, is going to
have a frequency that is going to be:
decoding frequency =
In this example, supposing that the clock has a frequency of 1KH:
decoding frequency = = = 100 hertz
Provided that, it is possible to reduce the frequency of each of the elements of an electronic
device to the one desired.
Finally we have
implemented a
counter that
counts from ) to
()
Getting the MOD from a counter exercise:
Provided the following asynchronous counter get their corresponding modules (MOD) and their
decoding frequency: Asynchronous counter 2
Clk frequency: 81 KH
Asynchronous counter 1
Clk frequency: 42 KH
It is going to be a “MOD 8” at the most, It is going to be a “MOD 16” at the most, Asynchronous
being truncated at “” (MOD 7) therefore being truncated at “” (MOD 9) therefore counter 3
counting from counting from
FF output This asynchronous
FF output
counter can be
4 2 1 8 4 2 1
implemented with
Binary 1 1 1 Binary 1 0 0 1 only 3 flip-flops
instead of 4 since the
Decoding frequency: 81KH/MOD 9 = 9 KH truncated sequence
Decoding frequency: 42KH/MOD 7 = 6 KH
occurs at being this
number smaller that
the maximum mod of
a 3 asynchronous flip-
flop () (MOD 8)
Synchronous counter: introduction
The term synchronous means that the events have an established direct relationship between
them, in other words, this implies for example that, in synchronous counters all of theirs flip flops
receive at the exact same moment the clock signal. Let’s compare then a 2 bit synchronous
counter with a 2 bits asynchronous counter:
2 bit synchronous counter
2 bit asynchronous counter
HIGH
HIGH
To consider: as we can see, the main difference between an asynchronous and a synchronous
counter is that for the second one the clock pulse is the same for all of the flip flops whereas in
the asynchronous one the output “ works as the clock for the second flip flop
2 bit synchronous counter:
Let’s see how this basic counter works. We first assume that the counter is in the “0 binary state”,
which implies that both of the flip-flops are in the reset state. When the first positive edge of the first
clock pulse is applied, “FF0” will toggle and therefore “” will go HIGH. Since there is a propagation
delay, when the first clock pulse occurs, the output of the first flip-flop, that is “” is still low so it does
not trigger the second flip-flop “FF1” (1) (it is the output of the first one and the input of the second).
When the second clock pulse (CLK2) is applied, “” is still high so now it triggers the second flip-flop
“FF1” (2). This works in a very similar way for the clock pulse “CLK3” and “CLK4” (3), (4):
(1) (2)
(4)
(3)
2 bit synchronous counter:
We finally get the following chronogram for a simple 2 bit synchronous counter. In this chronogram
the waveform transition appear coincident, which means that the propagation delays are not
indicated for simplicity.
Data output
Data output
Data output
Registers: series input and output
This type of registers accept “series data”, which means that they are going to process one bit each
time by a single line. The way they are “outputting” the data is also in a “series way”. Let’s see an
example with explanation of how a data input works with a register of 4 bits. In the example we are
going to store “”. Since it is a series input/output with right shifting, we will start storing the LSB
(“0” in this case). First we are going to clear the register, thus deleting any data that the register
might be storing.
Serial in/serial out shift register
Remember: the number of
flip-flops a register has is going
to indicate its “storing capacity”.
For example, a 4 flip-flop
register can store 4 bits of
data at the most
Data
To consider:
input
Initially, the register is Input data
going to be cleared currently is
before starting to “clear” state
store the data
Series input and output register: how it
works(II)
Next, the second input data is applied, which in this case is a “1”, what makes that “D” in the first
flip-flop’s (FF0) output “” is now “1” and the output for the second flip-flop (FF1) “0” since the input
of FF1 is connected to the output “” of the first flip-flop. The same is going to be working for the
rest of the clock-pulses, moving the data (in this case “”) along the (in this case) four “D-type” flip-
flops:
To consider: First bit of data
As we can see, “0”
the numbers are After the first
moving as a block clock pulse
through the flip-flops “CLK1”
After CLK5
After CLK6
After CLK7
Series input and output register: “truth table”
summary
The behavior of a register when it processes some input data (data insert and data “expel”), can be
summarized with a “truth table”. In this initial example, we are processing “”:
Shifting a 4-bit code into a 4-bit serial in/serial out Shifting a 4-bit code out of a 4-bit serial in/serial
shift register out shift register
CLK FF0 () FF1 () FF2 () FF3 () CLK FF0 () FF1 () FF2 () FF3 ()
Initial 0 0 0 0 Initial 1 0 1 0
1 0 0 0 0 5 0 1 0 1
2 1 0 0 0 6 0 0 1 0
3 0 1 0 0 7 0 0 0 1
4 1 0 1 0 8 0 0 0 0
Series input/output register exercise:
Obtain the states of the following 5 bit register. Consider that the register has been cleared (its
starting state is storing all zeros):
Simultaneous outputs
Serial In/Parallel Out Shift Registers
exercise:
a) Show the states of the 4-bit register for the following data inputs and clock waveforms. The
register is initially storing all 1s
b) If the data input remains 0 after the fourth clock pulse, what is the state of the register after
three additional clock pulses?
c) The bit sequence “1101” is inserted in series (first the bit located at the right) in a 4-bit serial
in/parallel out register that has been initially cleared. What are the “Q” output after two clock
pulses?
b) After the fourth clock pulse, if the input is kept in “0”, these “0s” are going to replace the
previous inputs, being the final output “0000”
c) We input the first two bits (the ones in orange) of “1101” in a 4-bit serial in/parallel out which
has been previously cleared. After 2 clock pulses, “01” are the outputs “” and “” being the ones
for the last two flip-flops “0”, provided that these were the bits of the outputs of the first two
flip-flops, and have been “pushed” along the register output
Parallel in/serial out shift registers:
In this type of register, the bits are entered simultaneously into their respective stages on parallel lines rather
than on a bit-by-bit basis on one line as with serial data inputs. In the following logic diagram, we can see the
implementation of a 4-bit register with parallel input and serial output, and its logic symbol as well. There are 4
data-input lines: , , and and a “SHIFT/” input, which allows to load in parallel these four bits of data into the
register. When “SHIFT/” is LOW, gates from “” to “” are enabled, thus allowing each data bit to be applied to
the “D input” of its respective flip-flop. When a clock pulse is applied, the flip-flops with “D = 1” will be set an
those with “D=0” will be reset, thereby storing all four bits simultaneously. When “SHIFT/” is HIGH, gates from
to are disabled and gates from to are enabled, then allowing the data bits to shift right from one stage to
the next one. The OR gates allow either the normal shifting operation or the parallel data entry operation,
depending on which AND gates are enabled by the level on the SHIFT/ input.
Logic symbol
To consider: the serial
outputs is the same as
in serial in/serial out
shift registers, once the
data is completely
stored in the register.
Working state of the register
Logic diagram Input of a “1” Shift state
Input of a “0” Load state
Parallel in/serial out shift registers: how it
works (load state)
As explained on the previous slide, we have a register which is going to load in a parallel way, and
these data will be output in a bit-a-bit basis at a single output
1 1 0 0 To consider: notice
0 1 1 1 that this register is
triggered on the
0 0 0 1 raising edge
Key:
The input data • Combinational circuit
for this example • State of the register
is “” () • Input data
To consider: an application
of this register is to
1 transmit the data through a
1 0 0 serial communication
channel. In every clock
pulse we are transmitting
one bit
Parallel in/serial out shift registers: how it
works (shift state) (first clock pulse)
After the data has been input to the register, we change its state to “shift” by inputting a “1”
before the NOT logic gate. In the shifting state (after the loading state), a 0 is input by default.
1 0 0 0 0
To consider: this is the
1 1 1 first step out of 4 (four
1 1 0
In the shifting state, the bits to transfer since
logic gates “”, “”, “” and we are transmitting “”
“” are “closed” since now ())
we don’t want the data
to be loaded again.
0 1 1
0
Key:
• Input data 0 1 1 0
• Control input
Parallel in/serial out shift registers: how it
works (shift state) (second clock pulse)
For the second clock pulse we are going to have the following state of the register considering that
we are inputting “0s” during the shift state:
1 0 0 0 0
1 1 1
0 1 1
In the shifting state, the
logic gates “”, “”, “” and
“” are “closed” since now
we don’t want the data
to be loaded again.
0 0 1 1
Key:
• Input data 0 0 1 1
• Control input
Parallel in/serial out shift registers: how it
works (shift state) (third clock pulse)
For the third clock pulse we are going to have the following state of the register considering that we
are inputting “0s” during the shift state:
1 0 0 0 0
1 1 1
0 0 1
In the shifting state, the
logic gates “”, “”, “” and
“” are “closed” since now
we don’t want the data
to be loaded again.
0 0 0 1
Key:
• Input data 0 0 0 1
• Control input
Parallel in/serial out shift registers: how it
works (shift state) (fourth clock pulse)
For the third clock pulse we are going to have the following state of the register considering that we
are inputting “0s” during the shift state:
1 0 0 0 0
1 1 1
0 0 0
In the shifting state, the
logic gates “”, “”, “” and
“” are “closed” since now
we don’t want the data
to be loaded again. 0 0 0 0
Key: 0 0 0 0
• Input data
• Control input
Parallel in/serial out shift registers: exercise
Provided the following sets of input data, get the corresponding chronogram for the output of a
parallel in/serial out shift registers:
0 1 0 1
Parallel in/serial out shift registers: exercise
solution
0 1 0 1
Bibliography:
• Floyd, T. L. (2000). Fundamentos de Sistemas Digitales, 9ª. Edición,
Capítulo, 2, 2-10.