# Understanding of RAM

5 messages
Open this post in threaded view
|

## Understanding of RAM

 Conceptually i know how a RAM works. But i have a big doubt thinking about the width and the size (mainly) of this. I understood that a w-bit register can to have different widths, let's say: 32-bit register. But, The numbers of registers in the RAM depends of the width of a single register ? How many registers are there in a 32-bit-wide RAM?... I do not know of what depends the size of the RAM... Can  somebody be a little specific?
Open this post in threaded view
|

## Re: Understanding of RAM

 Administrator Each addressable storage location in a RAM is, in effect, a register. In a 4K-word RAM there will be 4096 registers. Each register will be 1 word wide. So an 8K x 32-bit memory will have a total of 256K bits. The confusion is compounded because real-word memories are advertized by their number of bits. Something called a 64K RAM might be organized as 8K x 8 bits, 16K x 4 bits, or 64K by 1 bit. --Mark
Open this post in threaded view
|

## Re: Understanding of RAM

 In reply to this post by Juan Camilo Valencia Espitia You can think of the RAM as an array of cells (or registers, or boxes). The number of cell that you can have depend on how many bits are in the address: address with k bits can point to 2^k different positions. This is called the "length" of the RAM. All cells in a single RAM chip are the same size between themselves (width), but it can be different from the address width. For example you can have a RAM chip of 1024 cells, each of which can store 1 byte of information. This will require 10 bits for the address and 8 bits for the data. You can combine smaller RAM chips to create bigger ones in two different ways: 1. You can "widen" the cells. E.g. if you have two chips like the above one, you can put them in "parallel" to obtain 1 chip which can store 1024 16-bit cells. For that you just store the lower 8 bits in one of the chips and the higher 8 bits in the other. That is, you have 10 address bits and 16 data bits. 2. You can put them in "sequence" to obtain 1 chip which can store 2048 8-bit cells. That would amount to 11 address bits and 8 data bits. The size of RAM is thus determined by this two numbers: the number of addressable cells and the size of each cell. One may wonder why not just multiply them and say that we have 8192 bits of RAM. The problem with such approach is, that you loose important information. For example, you can read or write 1 byte in 1024x8 memory chip with a single write, but you'll need 2 operations for a 2048x4 chip.