Shame on you for asking that question. Surely you know the following.
Memory in computers is
one of the most important things you need to know about when you buy a
computer. You usually ask questions like:
How much RAM does this
machine have?
How much space is there
on the hard drive?
How much cache does this
chip have?
All of those questions
relate to memory. However, the hard drive question asks about a different
kind of memory than we are going to talk about in this lesson. Here
we are going to talk about the evanescent kind of memory, RAM - or random
access memory.
Memory
Circuits - An Introduction
We'll start with a simulation of a simple memory. The simulation
demonstrates several - but not all - aspects of memory operation.
Simulation
In this simulator you can set four bits of data (using the small red buttons
to set each bit), and then you can store the data in the memory by "clocking"
it in. In the simulator below do the following.
Set the data you want
to enter. All four bits are pre-loaded to zero, so you need to set
at least one bit.
Cycle the clock through
one complete cycle (two mouse clicks) bringing the clock high, then low.
Data will be transferred
to the output stage of the flip-flops at the right when the clock cycle
is complete and the clock signal returns to zero. Click
here to review the operation of the flip-flop being used.
A Short
Note About The Four Bits Above
One interesting thing about the four bit memory above. Memory usually
comes in bytes.
A byte is eight bits. The memory register above only has four bits,
so it is half of a byte. Strangely enoungh, there is a name for four
bits of memory. Since it is half a byte, the name assigned to four
bits of memory is a nybl.
Although we make a few jokes here and there through these lessons, it is
true (albeit a little funny) that a nybl is half of a byte - and they are
both spelled with a "y".
When you buy
memory in a computer, you specify things like how much RAM (Random Access
Memory) you want the computer to have. You might want to have 512
Megabytes, for example. We can't simulate that large a memory, so
we will try something smaller. In the next simulation we give you
a four nybl memory. It's just large enough that you can experiment
with it, and you can give yourself a mental model of how larger memories
work.
Simulation
In this simulation, you can work with a four nybl memory. Note the
following about this simulation.
The data inputs are controlled
using the button/switch combinations at the left of the memory array.
Clicking a button once
will change the switch state from zero to one or back.
The address is set using
the two buttons on the control panel.
The address has two bits,
a zero bit and a one bit.
Addresses are zero (00),
one (01), two (10) and three (11).
Clicking the buttons changes
the state of the address bit.
The data is clocked
into the memory array, using the clock signal.
When the clock signal
is high, the address line that will be used is highlighted.
When the clock returns
low, the data bit - if it is set - will appear at the output of the memory
flip-flop.
Exercise
In the simulation above, set 1001 into memory element 2. As you do
that, assume the the lowest bit is the LSB and the highest bit is the MSB.
Steering
Circuits - Under Construction
Links to Other Lessons
on Digital Logic