You are on page 1of 9

How RAM Works

Random access memory (RAM) is the best known form of computer memory. RAM is considered "random access" because you can access any memory cell directly if you know the row and column that intersect at that cell. The opposite of RAM is serial access memory (SAM). SAM stores data as a series of memory cells that can only be accessed sequentially (like a cassette tape). f the data is not in the current location! each memory cell is checked until the needed data is found. SAM works "ery well for memory buffers! where the data is normally stored in the order in which it will be used (a #ood e$ample is the te$ture buffer memory on a "ideo card). RAM data! on the other hand! can be accessed in any order. n this article! you%ll learn all about what RAM is! what kind you should buy and how to install it.

More Memory& 'ow (omputer Memory )orks 'ow * +S )orks 'ow ,lash Memory )orks 'ow Remo"able Stora#e )orks 'ow R+M )orks 'ow -irtual Memory )orks

RAM *asics
Similar to a microprocessor! a memory chip is an integrated circuit ( () made of millions of transistors and capacitors. n the most common form of computer memory! dynamic random access memory (.RAM)! a transistor and a capacitor are paired to create a memory cell! which represents a sin#le bit of data. The capacitor holds the bit of information // a 0 or a 1 (see 'ow *its and *ytes )ork for information on bits). The transistor acts as a switch that lets the control circuitry on the memory chip read the capacitor or chan#e its state. A capacitor is like a small bucket that is able to store electrons. To store a 1 in the memory cell! the bucket is filled with electrons. To store a 0! it is emptied. The problem with the capacitor%s bucket is that it has a leak. n a matter of a few milliseconds a full bucket

becomes empty. Therefore! for dynamic memory to work! either the (23 or the memory controller has to come alon# and rechar#e all of the capacitors holdin# a 1 before they dischar#e. To do this! the memory controller reads the memory and then writes it ri#ht back. This refresh operation happens automatically thousands of times per second.

This refresh operation is where dynamic RAM #ets its name. .ynamic RAM has to be dynamically refreshed all of the time or it for#ets what it is holdin#. The downside of all of this refreshin# is that it takes time and slows down the memory. Memory cells are etched onto a silicon wafer in an array of columns (bitlines) and rows (wordlines). The intersection of a bitline and wordline constitutes the address of the memory cell.

.RAM works by sendin# a char#e throu#h the appropriate column ((AS) to acti"ate the transistor at each bit in the column. )hen writin#! the row lines contain the state the capacitor should take on. )hen readin#! the sense/amplifier determines the le"el of char#e in the capacitor. f it is more than 40 percent! it reads it as a 15 otherwise it reads it as a 0. The counter tracks the refresh sequence based on which rows ha"e been accessed in what order. The len#th of time necessary to do all this is so short that it is e$pressed in nanoseconds (billionths of a second). A memory chip ratin# of 60ns means that it takes 60 nanoseconds to completely read and rechar#e each cell. Memory cells alone would be worthless without some way to #et information in and out of them. So the memory cells ha"e a whole support infrastructure of other speciali7ed circuits. These circuits perform functions such as8

dentifyin# each row and column (row address select and column address select) 9eepin# track of the refresh sequence (counter) Readin# and restorin# the si#nal from a cell (sense amplifier) Tellin# a cell whether it should take a char#e or not (write enable)

+ther functions of the memory controller include a series of tasks that include identifyin# the type! speed and amount of memory and checkin# for errors. Static RAM uses a completely different technolo#y. n static RAM! a form of flip/flop holds each bit of memory (see 'ow *oolean :o#ic )orks for details on flip/flops). A flip/flop for a memory cell takes four or si$ transistors alon# with some wirin#! but ne"er has to be refreshed. This makes static RAM si#nificantly faster than dynamic RAM. 'owe"er! because it has more parts! a static memory cell takes up a lot more space on a chip than a dynamic memory cell. Therefore! you #et less memory per chip! and that makes static RAM a lot more e$pensi"e. So static RAM is fast and e$pensi"e! and dynamic RAM is less e$pensi"e and slower. So static RAM is used to create the (23%s speed/sensiti"e cache! while dynamic RAM forms the lar#er system RAM space.

Memory Modules
Memory chips in desktop computers ori#inally used a pin confi#uration called dual inline package (. 2). This pin confi#uration could be soldered into holes on the computer%s motherboard or plu##ed into a socket that was soldered on the motherboard. This method worked fine when computers typically operated on a couple of me#abytes or less of RAM! but as the need for memory #rew! the number of chips needin# space on the motherboard increased. The solution was to place the memory chips! alon# with all of the support components! on a separate printed circuit board (2(*) that could then be plu##ed into a special connector (memory bank) on the motherboard. Most of these chips use a small outline J-lead (S+;) pin confi#uration! but quite a few manufacturers use the thin small outline package (TS+2) confi#uration as well. The key difference between these newer pin types and the ori#inal . 2 confi#uration is that S+; and TS+2 chips are surface-mounted to the 2(*. n other words! the pins are soldered directly to the surface of the board! not inserted in holes or sockets. Memory chips are normally only a"ailable as part of a card called a module. <ou%"e probably seen memory listed as =$>? or @$1A. These numbers represent the number of the chips multiplied by the capacity of each indi"idual chip! which is measured in megabits (Mb)! or one million bits. Take the result and di"ide it by ei#ht to #et the number of me#abytes on that module. ,or e$ample! @$>? means that the module has four >?/me#abit chips. Multiply @ by >? and you #et 1?= me#abits. Since we know that a byte has = bits! we need to di"ide our result of 1?= by =. +ur result is 1A me#abytes& The type of board and connector used for RAM in desktop computers has e"ol"ed o"er the past few years. The first types were proprietary! meanin# that different computer manufacturers de"eloped memory boards that would only work with their specific systems. Then came SIMM! which stands for single in-line memory module. This memory board used a >0/pin connector and was about >.4 $ .64 inches in si7e (about B $ ? cm). n most computers! you had to install S MMs in pairs of equal capacity and speed. This is because the width of the bus is more than a sin#le S MM. ,or e$ample! you would install two =/ me#abyte (M*) S MMs to #et 1A me#abytes total RAM. Cach S MM could send = bits of data at one time! while the system bus could handle 1A bits at a time. :ater S MM boards! sli#htly lar#er at @.?4 $ 1 inch (about 11 $ ?.4 cm)! used a 6?/pin connector for increased bandwidth and allowed for up to ?4A M* of RAM.

rom the top! SIMM" #IMM and S$#IMM memory modules

As processors #rew in speed and bandwidth capability! the industry adopted a new standard in dual in-line memory module (. MM). )ith a whoppin# 1A=/pin or 1=@/pin connector and a si7e of 4.@ $ 1 inch (about 1@ $ ?.4 cm)! . MMs ran#e in capacity from = M* to 1 D* per module and can be installed sin#ly instead of in pairs. Most 2( memory modules and the modules for the Mac D4 systems operate at ?.4 "olts! while older Mac D@ systems typically use >.> "olts. Another standard! Rambus in-line memory module (R MM)! is comparable in si7e and pin confi#uration to . MM but uses a special memory bus to #reatly increase speed. Many brands of notebook computers use proprietary memory modules! but se"eral manufacturers use RAM based on the small outline dual in-line memory module (S+. MM) confi#uration. S+. MM cards are small! about ? $ 1 inch (4 $ ?.4 cm)! and ha"e 1@@ or ?00 pins. (apacity ran#es from 1A M* to 1 D* per module. To conser"e space! the Apple iMac desktop computer uses S+. MMs instead of the traditional . MMs. Sub/ notebook computers use e"en smaller . MMs! known as Micro. MMs! which ha"e either 1@@ pins or 16? pins.

Crror (heckin#
Most memory a"ailable today is hi#hly reliable. Most systems simply ha"e the memory controller check for errors at start/up and rely on that. Memory chips with built/in error/ checkin# typically use a method known as parity to check for errors. 2arity chips ha"e an e$tra bit for e"ery = bits of data. The way parity works is simple. :et%s look at e%en parity first. )hen the = bits in a byte recei"e data! the chip adds up the total number of 1s. f the total number of 1s is odd! the parity bit is set to 1. f the total is e"en! the parity bit is set to 0. )hen the data is read back out of the bits! the total is added up a#ain and compared to the parity bit. f the total is odd and the parity bit is 1! then the data is assumed to be "alid and is sent to the (23. *ut if the total is odd and the parity bit is 0! the chip knows that there is an error somewhere in the = bits and dumps the data. $dd parity works the same way! but the parity bit is set to 1 when the total number of 1s in the byte are e"en. The problem with parity is that it disco"ers errors but does nothin# to correct them. f a byte of data does not match its parity bit! then the data are discarded and the system tries a#ain. (omputers in critical positions need a hi#her le"el of fault tolerance. 'i#h/end ser"ers often ha"e a form of error/checkin# known as error-correction code (C((). :ike parity! C(( uses additional bits to monitor the data in each byte. The difference is that C(( uses se"eral bits for error checkin# // how many depends on the width of the bus // instead of one. C(( memory uses a special al#orithm not only to detect sin#le bit errors! but actually correct them as well. C(( memory will also detect instances when more than one bit of data in a byte fails. Such failures are "ery rare! and they are not correctable! e"en with C((.

The maEority of computers sold today use nonparity memory chips. These chips do not pro"ide any type of built/in error checkin#! but instead rely on the memory controller for error detection.

(ommon RAM Types


SRAM Static random access memory uses multiple transistors! typically four to si$! for each memory cell but doesn%t ha"e a capacitor in each cell. t is used primarily for cache. #RAM #ynamic random access memory has memory cells with a paired transistor and capacitor requirin# constant refreshin#. &M #RAM ast page mode dynamic random access memory was the ori#inal form of .RAM. t waits throu#h the entire process of locatin# a bit of data by column and row and then readin# the bit before it starts on the ne$t bit. Ma$imum transfer rate to :? cache is appro$imately 16A M*ps. '#$ #RAM '(tended data-out dynamic random access memory does not wait for all of the processin# of the first bit before continuin# to the ne$t one. As soon as the address of the first bit is located! C.+ .RAM be#ins lookin# for the ne$t bit. t is about fi"e percent faster than ,2M. Ma$imum transfer rate to :? cache is appro$imately ?A@ M*ps. S#RAM Synchronous dynamic random access memory takes ad"anta#e of the burst mode concept to #reatly impro"e performance. t does this by stayin# on the row containin# the requested bit and mo"in# rapidly throu#h the columns! readin# each bit as it #oes. The idea is that most of the time the data needed by the (23 will be in sequence. S.RAM is about fi"e percent faster than C.+ RAM and is the most common form in desktops today. Ma$imum transfer rate to :? cache is appro$imately 4?= M*ps. ##R S#RAM #ouble data rate synchronous dynamic RAM is Eust like S.RAM e$cept that is has hi#her bandwidth! meanin# #reater speed. Ma$imum transfer rate to :? cache is appro$imately 1!0A@ M*ps (for ..R S.RAM 1>> M'F). R#RAM Rambus dynamic random access memory is a radical departure from the pre"ious .RAM architecture. .esi#ned by Rambus! R.RAM uses a Rambus in-line memory module )RIMM*! which is similar in si7e and pin confi#uration to a standard . MM. )hat makes R.RAM so different is its use of a special hi#h/speed data bus called the Rambus channel. R.RAM memory chips work in parallel to achie"e a data rate of =00 M'7! or 1!A00 M*ps. Since they operate at such hi#h speeds! they #enerate much more heat than other types of chips. To help dissipate the e$cess heat Rambus chips are fitted with a heat spreader! which looks like a lon# thin wafer. ;ust like there are smaller "ersions of . MMs! there are also S+/ R MMs! desi#ned for notebook computers.

+redit +ard Memory (redit card memory is a proprietary self/contained .RAM memory module that plu#s into a special slot for use in notebook computers. &+M+IA Memory +ard Another self/contained .RAM module for notebooks! cards of this type are not proprietary and should work with any notebook computer whose system bus matches the memory card%s confi#uration. +M$S RAM (M+S RAM is a term for the small amount of memory used by your computer and some other de"ices to remember thin#s like hard disk settin#s // see )hy does my computer need a batteryG for details. This memory uses a small battery to pro"ide it with the power it needs to maintain the memory contents. ,RAM ,ideoRAM! also known as multiport dynamic random access memory (M2.RAM)! is a type of RAM used specifically for "ideo adapters or >/. accelerators. The "multiport" part comes from the fact that -RAM normally has two independent access ports instead of one! allowin# the (23 and #raphics processor to access the RAM simultaneously. -RAM is located on the #raphics card and comes in a "ariety of formats! many of which are proprietary. The amount of -RAM is a determinin# factor in the resolution and color depth of the display. -RAM is also used to hold #raphics/specific information such as >/. #eometry data and te$ture maps. True multiport -RAM tends to be e$pensi"e! so today! many #raphics cards use S-RAM (synchronous #raphics RAM) instead. 2erformance is nearly the same! but SDRAM is cheaper. ,or a comprehensi"e e$amination of RAM types! check out the 9in#ston Technolo#y 3ltimate Memory Duide.

'ow Much .o <ou HeedG


t%s been said that you can ne"er ha"e enou#h money! and the same holds true for RAM! especially if you do a lot of #raphics/intensi"e work or #amin#. He$t to the (23 itself! RAM is the most important factor in computer performance. f you don%t ha"e enou#h! addin# RAM can make more of a difference than #ettin# a new (23& f your system responds slowly or accesses the hard dri"e constantly! then you need to add more RAM. f you are runnin# )indows I2! Microsoft recommends 1?=M* as the minimum RAM requirement. At A@M*! you may e$perience frequent application problems. ,or optimal performance with standard desktop applications! ?4AM* is recommended. f you are runnin# )indows B4JB=! you need a bare minimum of >? M*! and your computer will work much better with A@ M*. )indows HTJ?000 needs at least A@ M*! and it will take e"erythin# you can throw at it! so you%ll probably want 1?= M* or more. :inu$ works happily on a system with only @ M* of RAM. f you plan to add I/)indows or do much serious work! howe"er! you%ll probably want A@ M*. Mac +S I systems should ha"e a minimum of 1?= M*! or for optimal performance! 41? M*. The amount of RAM listed for each system abo"e is estimated for normal usa#e // accessin# the nternet! word processin#! standard homeJoffice applications and li#ht entertainment. f you do computer/aided desi#n ((A.)! >/. modelin#Janimation or hea"y data processin#! or if you are a serious #amer! then you will most likely need more RAM. <ou may also need

more RAM if your computer acts as a ser"er of some sort ()eb pa#es! database! application! ,T2 or network). Another question is how much -RAM you want on your "ideo card. Almost all cards that you can buy today ha"e at least 1A M* of RAM. This is normally enou#h to operate in a typical office en"ironment. <ou should probably in"est in a >?/M* or better #raphics card if you want to do any of the followin#8

2lay realistic #ames (apture and edit "ideo (reate >/. #raphics )ork in a hi#h/resolution! full/color en"ironment .esi#n full/color illustrations

)hen shoppin# for "ideo cards! remember that your monitor and computer must be capable of supportin# the card you choose.

'ow to nstall RAM


Most of the time! installin# RAM is a "ery simple and strai#htforward procedure. The key is to do your research. 'ere%s what you need to know8

'ow much RAM you ha"e 'ow much RAM you wish to add ,orm factor RAM type Tools needed )arranty )here it #oes

n the pre"ious section! we discussed how much RAM is needed in most situations. RAM is usually sold in multiples of 1A me#abytes8 1A! >?! A@! 1?=! ?4A! 41?! 10?@ (which is the same as 1D*). This means that if you currently ha"e a system with A@ M* RAM and you want at least 100 M* RAM total! then you will probably need to add another A@ M* module. +nce you know how much RAM you want! check to see what form factor (card type) you need to buy. <ou can find this in the manual that came with your computer! or you can contact the manufacturer. An important thin# to reali7e is that your options will depend on the desi#n of your computer. Most computers sold today for normal homeJoffice use ha"e . MM slots. 'i#h/end systems are mo"in# to R MM technolo#y! which will e"entually take o"er in standard desktop computers as well. Since . MM and R MM slots look a lot alike! be "ery careful to make sure you know which type your computer uses. 2uttin# the wron# type of card in a slot can cause dama#e to your system and ruin the card. <ou will also need to know what type of RAM is required. Some computers require "ery specific types of RAM to operate. ,or e$ample! your computer may only work with A0ns/60ns parity C.+ RAM. Most computers are not quite that restricti"e! but they do ha"e limitations. ,or optimal performance! the RAM you add to your computer must also match the e$istin# RAM in speed! parity and type. The most common type a"ailable today is S.RAM.

Additionally! some computers support .ual (hannel RAM confi#uration either as an option or as a requirement. .ual (hannel means that RAM modules are installed in matched pairs! so if there is a 41?M* RAM card installed! there is another 41? M* card installed ne$t to it. )hen .ual (hannel is an optional confi#uration! installin# RAM in matched pairs speeds up the performance of certain applications. )hen it%s a requirement! as in computers with the Mac D4 chip(s)! the computer will not function properly without matched pairs of RAM chips. ,or complete #uidelines on settin# up .ual (hannel confi#uration on ntel 2entium @/based systems! check out this #uide. .efore you open your computer! check to make sure you won%t be "oidin# the warranty. Some manufacturers seal the case and request that the customer ha"e an authori7ed technician install RAM. f you%re set to open the case! turn off and unplu# the computer. Dround yourself by usin# an anti-static pad or wrist strap to dischar#e any static electricity. .ependin# on your computer! you may need a screwdri"er or nut/dri"er to open the case. Many systems sold today come in tool-less cases that use thumbscrews or a simple latch.

/o install more RAM" look for memory modules on your computer0s motherboard1 At the left is a Macintosh -2 and on the right is a &+1

The actual installation of the memory module does not normally require any tools. RAM is installed in a series of slots on the motherboard known as the memory bank. The memory module is notched at one end so you won%t be able to insert it in the wron# direction. ,or S MMs and some . MMs! you install the module by placin# it in the slot at appro$imately a @4/de#ree an#le. Then push it forward until it is perpendicular to the motherboard and the small metal clips at each end snap into place. f the clips do not catch properly! check to make sure the notch is at the ri#ht end and the card is firmly seated. Many . MMs do not ha"e metal clips5 they rely on friction to hold them in place. A#ain! Eust make sure the module is firmly seated in the slot. +nce the module is installed! close the case! plu# the computer back in and power it up. )hen the computer starts the 2+ST! it should automatically reco#ni7e the memory. That%s all there is to it&

,or more information on RAM! other types of computer memory and related topics! check out the links on the ne$t pa#e.