Memory
Random-access memory (RAM) stores data but is volatile, while read-only memory (ROM) stores data permanently. Other related components include programmable logic devices (PLDs) that use stored information to define logic circuits. Of these a particularly useful device is the programmable logic array (PLA). We discuss these arrays later.
Memory Hierarchy
Computers utilize both RAM and ROM extensively. Beginning in the CPU we find ROM controlling the execution of machine instructions. ROM is also found in keyboards and monitors in conjunction with their embedded processors. RAM is first used in the cache, then main and video memory. Finally, the lowest level in memory hierarchy is secondary storage, i.e. hard drive, CDROM, and others.
A Static RAM Cell

In addition to select, RAM must also have read/write functionality. These are achieved by use of combinational circuitry.
Notation
We use shorthand notation to indicate reading/writing a word from/to a particular address in memory.
Read: DR Ü M[AR]
Write: M[AR] Ü DR
RAM IC
RAM is typically grouped into integrated circuits. One such small chip is the 128 x 8 RAM IC. Chip-select (CS) is activated to enable this chip. Read/Write' is used in conjunction with the CS to control the status of tri-state buffers which direct the data in and out of the chip. Note that n address line are required to select from the 2n words in this memory chip. So 512 words would require a 9-bit address bus and 4096 words would require a 12-bit address bus.

Array of RAM ICs
Suppose we have a bag of 128 x 8 chips and wish to construct a 512 x 8 memory. Calculate the number of small chips required:
![]()
In order to address 512 words we need 9 address lines. We can use a 2 to 4 Decoder to select the particular 128x8 chip based on the high order address bits.
Suppose one desired to place data FF at memory address 128 (the first address location on the second chip, what binary values would have to be on the data and address busses? The steps necessary to read memory (transfer data out) are:
The steps necessary to write to memory (transfer data in) are:
Tri-State Gate
RAM ICThe tri-state gate, as the name implies, exhibits three states. Two of the states are the standard 0 and 1 as in any gate. The third state is a high-impedance state. In this third state the gate exhibits neither a 1 nor a 0. Instead it exhibits open circuit characteristics, acting like an open switch. Tri-state buffers amplify the input signal reducing the loading effect that many gates can have on a signal source.