Memory basics

memory hierarchy

In a computer, memory is not just one thing, but is a multi-level system. It is the memory hierarchy. From processor to several levels of RAM, to hard driver. The size of each memory increasing, the speed and cost usually decreased. The two pictures below show the memory hierarchy.

computer-memory-pyramidScreen Shot 2016-04-14 at 9.47.11 AM

(source: http://computer.howstuffworks.com/computer-memory1.htm)

 

how is data stored in Memory?

To answer this question, firstly, we need to figure out the physical architecture of a memory media.  There are many types of memory media: semiconductor, magnetic, optical and paper tape. Let me just focus on semiconductor here, which is the media for RAMs,  flashes and SSDs.

A semiconductor memory media (chip) can contain millions of transistors and capacitors. these elements are the places (units) store 1 and 0. Those units are aligned in matrix, and we can address each unit’s location. We can use row selector and column selector to locate a unit, and the address information send between each memory media or processor using address bus (lines), and transfer the address to high or low signal for row and column selectors. Shows in the picture below.

Screen Shot 2016-04-14 at 11.16.13 AM

As we all know, in computer science, any data types (Integers, Strings, images, etc.) are stored in 1 and o. A group of these units can be used as a basic block for representing data. Hence, we have a series of 1 and 0 to represent a data. I think this is why we need to convert any data to a binary code.

Let’s say the minimum the unit of data is stored in a row, for example, each row is a word. Hence, each row stores a data unit. We access the memory row by row.

These basic ideas about memory will help us understand how all kinds of data structures were stored in memory.

 

 

One thought on “Memory basics

  1. Pingback: Array | Pure technical

Leave a comment