All things in all posts will help you visualize about the way that computers work generally. Note that it is not the real structure of modern computers, but the way that modern computers work is nearly the same as in my posts. I am sure that if you understand about the way that computers work in my posts, you will easy to learn about all fields of computer afterward. Thank you !!!
RAM is an important memory device component in computers. To imagine how RAM works, let us look at the picture below and I will explain it in detail.
On the leftmost of the diagram, you can see a register that I mentioned in a previous post. Now, it has “a” inputs that come from somewhere in computers. These “a” inputs are transferred to this register through the bus. You can also see a “sa” input that is short for “set a” because it is the input that decides whether bits in the bus can go into this register.
This register does not have any “e” (enable) input (does not have an enable device) because a register can only have “s” (set) input and “e” input is not necessary in this type of register. So, eight “a” inputs and one “sa” input is enough for the device that we want to build.
Look at devices that label “4 x 16” on the diagram. This device is called a “decoder” that we learned in a previous post. You can see that the 4-bit inputs of the decoders are from the 8-bit output of the register. Because each decoder receives 4-bit input, it will output 24 = 16 possibilities from the decoder. Each possibility of the decoder will be corresponding to a wire from the decoder.
So, you can count all wires that output from two decoders and you will see each of them has 16 wires output. And each of these decoders are arranged horizontally and vertically like in the diagram. Because each decoder has wires output, we can have 16 x 16 = 256 intersections and each wire in these intersections does not touch each other (they are separate). Later, you will realize these two wires of the intersection are two inputs of an AND gate (so it can not touch each other). Finally, we have a grid of wire that has 256 intersections like in the diagram.
Everytime, a decoder will only have 1 wire in 16 wires “on” (you learned in a previous post). So, everytime we can only have one intersection that is “on” (both wire “on”, each wire for each decoder, vertically and horizontally). And these two wires will connect to a register system that helps to store and transfer information. Remember that the intersections will connect to a register system. Let’s see the diagram at one intersection above to understand more about them!!!
On the bottom of the diagram, you can see a 8-bit bus, a “s” input and a “e” input. The 8-bit bus will contain information that represents in 1 byte (8 bits) that will be stored or transferred in the register system at the intersections. The “s” input will set 8 bits in the bus to the register at the intersections if it is “on” and the intersection is “on”. The “e” input will help transfer the 8 bits in that register to the bus if it is “on” and the intersection is “on”.
The device that we mentioned above is RAM and is one in two parts of the computer's main memory (beside ROM). Why do we call them RAM (random access memory)? Because you can choose any registers in the grid of registers and you do not need to go through other registers to choose registers that you want, so you do not need to notice in order that you want to choose a byte for best speed in memory access (all of them are nearly similar).
Again now, we will symbolize this RAM for use in other parts of computers. We have a register that contains an address for memory location, that is the leftmost register in the diagram. We call this register a memory address register (MAR). So, we have symbol for RAM as below:
The RAM 256 above has a small memory. We can build a larger memory as below:
As you can see, we can use two registers and two “8 x 256” decoders for larger memory because we have more intersections, 256 x 256 = 65536 intersections. We must set an address for MAR more complicated than the RAM 256. First, we set the haft address for R0, then set the haft address for R. Finally, we have a complete address that is ready for access.
We can also symbolize it like the RAM 256 as below:
Thanks for reading and see you later!!!
0 Nhận xét