Vous êtes sur la page 1sur 32

Computer memory

by Pradyumna S A

By Trupti V.G, Asst Prof, PESIT

Memory
Memory: required to store the programs and process the data. Made up of cells Each cell can store one bit Cells are organized as sets of addressable words. Different ways of organizing memory The time to store and retrieve a word does not depend on the address of the word, such an organization is called Random Access Memory RAM.

Another way of organizing memory cells is serially. In linear sequential form as in Serial Access Memory. Random Access Memory:
memory cell is made up of semiconductor flip flops or capacitors.

Serial Access Memory:


memory cell is made up of magnetic dipoles on movable magnetic surface.

Magnetic surface recording is organized in Hard disks, floppy disks. Optical recording techniques are used in CDROM(compact disk), DVDROM(Digital Versatile Disk) serial access memory Memory organizations are classified based on their storage capacity, method of storing and retrieving data and time needed.

Memory
Memory cell
an individual storage location

Address
relative position in memory

Contents
the data stored in a memory cell

Stored program concept


an ability to store program instructions in main memory for execution
1-4

Memory cell
Memory cell:
A device which can store a symbol selected from a set of symbols.

Categorized by the following properties


No of stable states in which it can be placed. Whether a cell can store a symbol indefinitely even when the power is turned off. Cells are volatile or non volatile. Time taken to read/ write a symbol. read time and write time Whether it is read only. non destructive cell.

Memory cell used by a computer


One switch can be in one of 2 states A row of n switches:

can be in one of 2n states !

Memory cell used by a computer (cont.)


Example: row of 3 switches

A row of 3 switches can be in one of 23 = 8 states. The 8 possible states are given in the figure above.

Representing numbers using a row of switches (cont.) We can represent each number using a different state of the switches.
Example:

Computer RAM Memory


The Computer RAM memory:
The RAM consists of multiple memory cells:

Each memory cell stores a number

Computer RAM Memory:


The computer system uses the binary number encoding to store the number Example:

The location stores the data in the form of bits. Each location can keep or store 8 bits (i.e. a byte). The memory location addresses starts from 0. Thus 0th location is actually the first location of a memory . A group of 8 bits is called a byte . The total capacity of memory is expressed in terms of bytes. For example a 256 byte memory would means a memory with 256 locations numbered from 0 to 255, and each location capable of storing a byte (8 bits). The memory inside a computer is normally very big , 655360 bytes or even more . To express such big numbers ,we use terms like Kilobytes, Megabytes, Gigabytes etc. 4GB= 32 bits

Memory Hierarchy
CPU
Main Memory I/O Processor

Cache

Magnetic Disks

Magnetic Tapes
12 / 19

keywords
Data is transferred to and from memory in groups of bits called words. A word can be a group of 8 bits, 16 bits, 32 bits or 64 bits (and growing).

Memory Organization
Since a memory cell has 2 stable states they are called as binary cells. Diagram Input data line: the symbol to be written is sent Write line: write control signal is sent to this line. Read line: to read a line read control signals are sent Output data line: contents of cell are sent on this line.

Registers are small storage locations that hold data temporarily (buffers). Multiple registers are needed to facilitate the operation of the CPU. Used to increase CPU performance.

Few information about registers


Uses:
Stores information about status of CPU and currently executing program Address of next program instruction Signals from external devices

General Purpose Registers


User-visible registers

Hold intermediate results or data values

Special-Purpose Registers
Program Count Register (PC) Also called instruction pointer Instruction Register (IR): Stores instruction fetched from memory Memory Address Register (MAR) Memory Data Register (MDR)

Memory hierarchy

Cache- slower than CPU and its registers.

3 bit register: Diagram Register: interconnection of cells Group of registers interconnected to form a memory Ex: 3 bit per word 4-word memory Each register identified by binary code(address). 4 word memory --- no of bits 2 8 word memory --- no of bits 3 to identify registers.000--- 111 For n bits 2n words of memory can be addressed..

Cont..
Block diagram of 4 word 3 bit per word memory. The address is placed in the memory address register. MAR Selector circuit is connected to MAR Its selects the appropriate read/write control line based on the address and the r/w specified. The data to be read/ written is placed in a register called MDR MDR receives the data during read operation During write, data to be stored is placed in this register.

Block diagram of 64KB memory


64 KB= 216, each word stores 8 bits
1 6
64KB memory
Read/write signals

selector

MAR

b i t s

MDR
8 bits

Example: Number 173 to binary form 100101101(AD)


During WRITE: If the address is 1111110101011010(FD5A) The number is stored in MDR, and address in MAR. Write signal initiated. The number in MDR is written in location FD5A and replacing the data previously present in it. During READ: Address(AB34) is in MAR Read signal initiated Copy of data stored in the location is retrieved and placed in MDR. If its a destructive readout---- then the data after reading from the location is stored in MDR and the contents in the location is cleared to 0

Calculation
A computer has 32 MB (megabyte) of memory. How many bits are needed to address any single byte in memory? Solution The memory address space is 32 MB, or 225 so 25 bits, to address each byte.

A computer has 512 MB of memory. How many bits are needed to address any single byte in memory. 29 * 220

During read/write
Access time Write time READ:
At time t0 address is placed in MAR Read signal is applied If at t1 the data is available in MDR then Elapsed time (t1-t0) is known as ACCESS TIME of memory. Data placed in MDR, address in MAR at time t2 write signal applied, At t3 the write operation is completed then Elapsed time(t3-t2) is the WRITE TIME The time interval between t0 (read/write command given) and t4(Next read/write issued) is known as CYCLE TIME of memory

WRITE:

Read only memory


ROM: Random access memory in which the data words are permanently written during fabrication, contents cannot be altered. Reading from ROM must be non destructive, non volatile. Applications: Store tables which do not change(Ex: value of sin ) Storing short programs for small applications Magnetic core memory

Types
PROM: Programmable Read Only Memory: special functions or programs is fabricated on ROM. Programming is done using special writing circuits. Time taken to write is long and time taken to read is relatively small. Contents cannot be altered. EPROM: Erasable Programmable ROM: contents could be altered. Data is erased by exposing it to strong UV light through the window. All the bits are erased to 0. EEPROM: Electrically Erasable Programmable ROM: electrical pulses are used instead of UV light to erase PROM. Convenient than using UV light.

Flash memory
Definition: It is an electronic non-volatile computer storage device that can be electrically erased and reprogrammed. Variety of EEPROM It uses semiconductors, non volatile. Fast read, slow write Two types: NOR Flash: its a random access memory similar to EEPROM. Can address individual word. A set of bytes called block has to be erased, cannot erase a single byte. Can be erased 100,000 times without affecting the performance. Provides a bad block management system, keeps track of those blocks, prevents data written into this.

NAND Flash

Non volatile, fast read, slow write NAND allows page access. Organized as set of pages Each page is 512 to 2048 data bytes Few extra bytes to detect and correct errors. set of around 32 pages is called a block. Minimum unit of data that could be accessed by NAND is a page. At a time 512 bytes are read. Error correction: single bit error correction is done Several bad blocks during manufacturing, extra blocks are provided. Data in NAND flash can be retained for long period. Capacity: 32MB to 128GB(2008) current? Speed: 2MB/sec to 20MB/sec Applications: memory cards, USB drives

Manufacturers of Flash

Serial Access Memory


Output of a cell is input to next cell. Read signal places the contents of each cell in the resp output lines. Write signal stores the bits in resp next cells. One read write pair of signals would shift the content of the cells, rightmost cell will appear on the output line. The bits stored in the cells appear serially at the output its called serial Access Memory Shift register If output is connected to input circular shifting of cells

Model of memory cell: Read head reads the cell below it and places the contents in the output line. Cells are physically moved from left to right. Writing a cell using write head. Set of bits in the memory cannot be selectively retrieved by specifying the address non addressable memory.

Physical devices used to construct memories


Semiconductor flip-flop: device used for making semiconductor memory cells Diagram Semiconductor device is modeled as a controlled switch.

Vous aimerez peut-être aussi