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

Lecture: Register

Digital Systems, EE-208

Dr. S.K.Vishvakarma, IIT Indore


What is Register ?
°A register is simply a group of flip-flops that can be used to store a binary
number.
°Register can be used to accept the input data from keyboard and present
this data at the input of microprocessor chip.
°Similarly, registered could be used to accept the output data from
microprocessor chip and then present the data to circuitry to drive the
display on CRT screen.
°So, Registers form a link between the main digital system to input output
channels.
°Universal Asynchronous receiver transmitter (UART) is a chip used to
exchange data in a Microprocessor system.
°UART: Registers + control logic.
°A binary registers performs some asthmatic operations: multiplication,
division etc.
°A shift register can be used counter.
Types of Registers
To store 8 bit, need 8 FF.

Shift Register: A group of FF connected to provide either entering or shifting in/out the data
Moving the data from one place to other:

1: Serial Shifting: Shifting the


1 bit at a time in a serial fashion: either MSB or LSB

2. Parallel Shifting:
Shifting all the data
simultaneously
Serial IN-Serial OUT
°The flip-flops used to construct registers are usually edge-triggered JK, SR or D types.
°Common clock triggers at –ve edge to all FF.
°As output of one FF is connected to input of next FF, at every trigger the data stored in one FF is
transferred to the next FF.
°Transferred takes place like: Q -> R, R-> S, S->T and the
serial data input is transferred to Q.

4-bit serial input shift register.

To shift a 0 into the flip-flop, J=0 and K=1, To shift a 1 into the flip-flop, J=1 and K=0
Serial IN-Serial OUT

At clock edge A, flip-flop Q has input 0 from serial data in D,


flip-flop R has input 0 from output of Q, flip-flop S has input 0
from output of R and flip-flop T has input 0 from output of S.
When clock triggers, these inputs get transferred to
corresponding flip-flop outputs simultaneously so that
QRST=0000. Thus at clock trigger, values at DQRS is
transferred to QRST.

At clock edge B, serial data in=0. i.e. DQRS=0000. So after NT


at B, QRST=0000. Serial data becomes 1 in next clock cycle.

At cock edge C, DQRS=1000 and after NT QRST=1000. Serial


data goes to 0 in next clock cycle such that at clock edge D,
DQRS=0100 and after NT QRST=0100.
Problem:
°Show how a 0100 is entered serially is a shift register shown in fig
below.

Clock Serial Q R S D
input
0 0 0 0 0 0
1 1 0 0 0 0
2 0 1 0 0 0
3 0 0 1 0 0
4 0 0 1 0
Problem
°Draw the waveform to shift the number QRST=1010 into the shift
register shown in fig below.

0
8-bit Serial IN Serial OUT Register: RS FF
°8 RS FF required: 74 LS91
°How to convert D FF from RS FF: Inverter should be connected
between R and S on the first FF.

Data 0/1 1/0 1/0


B S Q
1/0

0/1
R Q bar

Clock

Data will transfer on every + ve clock trigger.


Serial IN-Parallel OUT
°Data is shifted in serially, but shifted out in parallel.

Same as SISO, except:


1. All 8 bits are available in its out simultaneously.
2. Each FF has asynchronous clear input: a low level at
pin no 9, will reset every FF. note that Asy. Signal
can be applied at any time , without regards to clock
waveform and also that this signal is level sensitive.

Data shifting will happen at + ve

B is Control line
1 (high) / 0 (low)
A typical response of a 54/74164
B is held high: NAND gate is enabled and the serial input data is passes through NAND
gate inverted.
B is held low: The NAND gate output is forced high,
Parallel IN-Serial OUT
54/74166, 8FF + Logic Circuits

Parallel Data entry & Operation of Shifting data serially


X2= Input Parallel Data A, B ---H
Control line = Shift /Load
Holding the Shift/Load= Low , enable lower gate
>>>> 8 bit number will be loaded
Holding the Shift/Load= High, enable upper gate
And if the input from upper gate receive the data
from prior FF in the register, each clock
Transition will shift the data from QA to QH
Parallel IN-Parallel OUT
54/74174
8 bit 54/74198 universal shift register

4 bit universal shift register 54/7495A


Applications of shift registers
°Ring Counters
Applications of shift registers
°Switched tail counter, also known as twisted tail counter or Johnson
counter.

Clock Serial in = T Q R S T Y = QT

D Q D R D S D T
0 1 0 0 0 0 1

_ _ _ 1 1 1 0 0 0 0
_
Q R S T
2 1 1 1 0 0 0

3 1 1 1 1 0 0
CLK
Y 4 0 1 1 1 1 0

5 0 0 1 1 1 0

6 0 0 0 1 1 0

7 0 0 0 0 1 0

4-bit switched tail counter and 8 1 0 0 0 0 1

its state table 9 1 1 0 0 0 0


rep
eats
Applications of shift registers
°SEQUENCE GENERATOR AND SEQUENCE DETECTOR

1 0 1 1 -------------- 1011 1011

{
{
1
Serial Data in 0 1 1 1

1 0 1 1

Sequence to be detected
Applications of shift registers
°SERIAL ADDER

S2
Serial Out Full Adder
Serial in S1 S0 A7 A6 A5 A4 A3 A2 A2 S2
Ai Si
B2
Bi

C1 Ci - 1 Ci C2

serial in
Q D
  B7 B6 B5 B4 B3 B2
Serial Out

CLK

Serial addition of two 8-bit numbers (Register values


shown are at 3rd clock cycle)

You might also like