You are on page 1of 16

“Basic Digital Storage Devices

and Arithmetic Logic Unit”


in
[ Microprocessor Systems and
Interfacing ]

Lecture-05

M. M. Yasin
myasin@cuisahiwal.edu.pk
[ Topics Covered ]
• Basic Digital Storage Devices
– D Latch

– D Flip-Flop

– Register

– ROM

– RAM

• Arithmetic Logic Unit

Fall 2018 - M. M. Yasin 1.2


Basic Digital Storage Devices
1. D Latch
A latch is a digital device to stores a 1 or 0 on its output. If the Clk
(Enable) input is high, the D input will be passed to the Q output.
If the Clk input is low, then no change on the Q output.

Fall 2018 - M. M. Yasin 1.3


Basic Digital Storage Devices

Timing Diagram
D Latch

Fall 2018 - M. M. Yasin 1.4


D Latch
(a) Schematic-Symbol, (b) Truth-Table, (c) Timing-Diagram

Fall 2018 - M. M. Yasin 1.5


Basic Digital Storage Devices
2. D Flip-Flop
When a rising edge signal applied to the Clk input, Q output is
updated according to D input. In other words, D flip-flop takes a
snapshot of whatever state is on the D input when the Clock goes
high. Q output won't change when the Clk input stays high or goes
low. i.e., it only updates its output when going from low to high.

Fall 2018 - M. M. Yasin 1.6


Basic Digital Storage Devices

Timing Diagram
D Flip-Flop

Fall 2018 - M. M. Yasin 1.7


Basic Digital Storage Devices
3. Registers
• A register is a group of D flip-flops connected in parallel (to
store binary data).
• A binary word is applied at the D input. When the Clk is
made from low to high, D input is transferred to Q output
and remain stored on Q outputs.
• Other circuitry can read the stored binary word from the Q
outputs at any time without changing its value.

What would happen if flip-flops are connected in series. i.e.,


the output of first is applied at the input of second…???

Fall 2018 - M. M. Yasin 1.8


Basic Digital Storage Devices
4. ROM (Read-only-Memory)
• Data can be written to, read and erased.
• Non-Volatile.

• Any particular location is accessed by address lines(A0 to


A14) and data is read on data lines(D0 to D7).

• Data outputs are three state outputs. i.e., logic low state,
logic high or high impedance state. In high impedance state,
an output is disconnected from anything connected to it.
• CE (Chip Enable) is used to enable the device for any operation.
If CE input is not active, then all outputs will be in the high
impedance state.
Fall 2018 - M. M. Yasin 1.9
Basic Digital Storage Devices
4. ROM (Read-only-Memory)
• Why need three state outputs??
Hint: Think of more than one ROMs connected in parallel and all of
them have two-state outputs.

Fall 2018 - M. M. Yasin 1.10


Basic Digital Storage Devices
5. RAM (Random Access Memory)
• Data can be written to, read and erased.

• Any particular location is accessed by address lines(A0 to


A11) and data is read on data lines(D0 to D7).

• CE (Chip Enable) is used to enable the device for any operation.


• R/W is used to specify Read or Write operation.
• It’s volatile.

Fall 2018 - M. M. Yasin 1.11


Basic Digital Storage Devices
4. & 5. Catalog Listings (ROM & RAM)

Catalog listings of memory devices often refer to


memory locations times bits per location. For example, a
memory device with 1K memory locations and 8-bits in each
location is often listed as a 1K x 8 by the manufacturer.

Sometimes memory devices are often classified


according to total bit capacity. For example, a 1K x 8-bit
memory device is sometimes listed as an 8K memory device.

Fall 2018 - M. M. Yasin 1.12


Basic Digital Storage Devices
4. & 5. ROM vs RAM

Basic difference between a ROM and a RAM is that a


RAM is written under normal operation whereas a ROM is
programmed outside the computer and normally is only
read.

Fall 2018 - M. M. Yasin 1.13


Basic Digital Storage Devices
6. Arithmetic Logic Unit
• ALU is a device that can perform logic (AND, OR,…) and
arithmetic (add, multiply,…) operations on binary words.
• 74LS181 is 4-bit ALU. Therefore, it can perform anyone of
the 16 logic functions or anyone of the 16 arithmetic
functions on two 4-bit binary words.

If we have an 8-bit input data or 16-bit input data, how can


we make use of 74LS181 device…???

Fall 2018 - M. M. Yasin 1.14


Basic Digital Storage Devices
6. Arithmetic Logic Unit
• The function performed on the two words is determined
by the logic level applied to the mode input M and by the
4-bit binary code applied to the select input S0-S3.
• With mode input (M), logic or arithmetic function is
selected, while with 4-bit select (S0-S3) code, one of the 16
functions (arithmetic/logic) is selected.

Schematic Symbol
74LS181 4-bit ALU

Fall 2018 - M. M. Yasin 1.15


Basic Digital Storage Devices

Truth-Table
74LS181 4-bit ALU
Fall 2018 - M. M. Yasin 1.16

You might also like