Memory and Registers

Submitted To:
Mahendra Kumar

Submitted by:
Manisha Kaura
M.Tech (ECE-1st sem)
1

Content
• Memory
– ROM
– RAM






Types of ROM
Advantages and disadvantages of ROM
Register- Definition
Shift register characteristics
Data Movement
Applications of Shift register

Memory
• Sequential circuits all depend upon the presence of
memory
– A flip-flop can store one bit of information
– A register can store a single “word”
• typically 32 or 64 bits

– Memory stores a large number of words

• Memory stores this large amounts of data using two
primary device types
– Read Only Memory (ROM, PROM, EPROM, EEPROM)
– Random Access Memory (RAM)
• Static RAM (SRAM)
• Dynamic RAM (DRAM)
3

Memory
• You can think of memory as being
one big array (list) of data
– The address serves as an array
index
– Each address refers to one word
of data (e.g., 8-bits, 16-bits, etc.)

• You can read (or modify) the data
at any given memory address,
just like you can read (or modify)
the contents of an array at any
given index

Address
00000000
00000001
00000002
.
.
.
.
.
.
.
.
.
.
FFFFFFFD
FFFFFFFE
FFFFFFFF

Data
0110101100111101
1011111100100100
1001110011110111

0000101100001111
1100101000110001
0110101111010000

word
4

Memory
• Content loading (programming) done many
ways depending on device type
– ROM: mask programmed, loaded at the factory
• hardwired - can’t be changed
• embedded mass-produced systems

– PROM: OTP (One Time Programmable),
programmed by user, using an external
programming device
– EPROM: reusable, erased by UV light,
programmed by user, using an external
programming device
– EEPROM: electrically erasable, clears entire
blocks with single operation, programmed inplace (no need to remove from circuit board)
5

ROM -Advantages and Disadvantages
• Ease of speed and design
• For moderately complex function a ROM-based circuit is
usually faster than a circuit using multiple SSI/MSI devices and
PLDs
• The program that generates the ROM contents can easily be
structured to handle unusual or undefined cases that would
require additional hardware in any other design. e.g. the adder
program easily handles out-of-range sums.
• A ROM’s function is easily modified just by changing the stored
pattern, usually without changing any external connections
• The prices of ROMs are dropping and densities increasing
making them more economical and expanding the scope with a
single chip
6

ROM -Advantages and Disadvantages
• May consume more power
• For functions with more inputs a ROM based circuit is
impractical because of the limit on ROM sizes that are available

7

Registers

8

Definition
• A register is a digital circuit with two basic functions:
Data Storage and Data Movement
– A shift register provides the data movement function
– A shift register “shifts” its output once every clock cycle

• A shift register is a group of flip-flops set up in a linear
fashion with their inputs and outputs connected
together in such a way that the data is shifted from
one device to another when the circuit is active.

9

Shift Registers
• The simplest shift register is one that uses only Flip-Flops
• The output of a given Flip-Flop is connected to the D input of the
Flip-Flop at its right.
• Each clock pulse shifts the contents of the register one bit
position to the right.
• The Serial input (SI) determines what goes into the leftmost FlipFlop during the shift. The Serial output (SO) is taken from the
output of the rightmost Flip-Flop.

Q

Q

Q

Q

10

Shift Register Characteristics
• Types
– Serial-in, Serial-out
– Serial-in, Parallel-out
– Parallel-in, Serial-out
– Parallel-in, Parallel-out
– Universal

• Direction

n-bit shift
register

– Left shift
– Right shift
– Rotate (right or left)
– Bidirectional

11

Data Movement
• The bits in a shift register can move in any of the
following manners

12

Serial-In Serial-Out
• A simple way of looking at the
serial shifting operation, with
a focus on the data bits, is
illustrated at right
• The 4-bit data word “1011” is
to be shifted into a 4-bit shift
register
• One shift per clock pulse
• Data is shown entering at left
and shifting right

1

2

3

4

5
13

Universal Shift Register
• Universal shift register
• Can do any combination of
parallel and serial
input/output operations
• Requires additional inputs to
specify desired function

14

Shift Register Applications
• converting between
serial data and
parallel data
• temporary storage in
a processor

• some counter
applications
• time delay devices

– scratch-pad memories

• some arithmetic
operations
– multiply, divide

15