How is it that a collection of pins, solder, and metal is able to store information? My non scientific mind just doesnt get the science of it.
The pins, solder and metal are what you see from the outside. Inside, is a semiconductor device that has active transistors in it. Those transistors form circuits that act as memory storage devices.
Is this a question specifically about the CPU chips, or about the working of memory in general?
If it’s about the CPU (central processing unit) chip, then it’s pretty straightforward. The chip itself contains a bunch of active transistors making up the registers, data paths, and so forth. In early CPUs, that’s about all they could fit. As transistors got smaller, more of them could fit in a single chip, which made room to add memory along with everything else.
If you want to be pedantic, all CPUs have some form of memory, as even the CPU registers and flags store data, albeit very small amounts. Modern CPU chips and microcontrollers often have enough RAM or ROM to store realtime operating systems or large amounts of cache.
This is not easy to explain if you have a non-scientific mind, so generalizations will have to suffice.
Asside from a certain amount of temporary registers and data buffers, CPUs don’t generally contain a lot of memory storage area. Memory chips are usually provided around the periphery of a CPU for whatever it needs to do. This saves valuable CPU real estate and lets the chip designer devote space and resources to actual processing functions.
Data is stored as a singular binary state within memory chips. Each transistor is held in either an “on” or “off” state to represent the binary digit of 1 or 0.
Memory chips contain the largest number of transistors per unit area compared to other integrated circuits. The device density is referred to as SSI, MSI, LSI, VLSI which stand for small (medium, large, very large) scale integration.
LSI and VLSI marked the change from ferrite core memory storage to the ability to squeeze thousands of transistors on a microchip. A VSLI chip (c. 1990) can contain over 1 million transistors on a single chip.
The increase in transistor density has been fairly well predicted by Moore’s Law.
There used to be two types of memory and I think these types still are used. One is composed of two transistors interconnected in such a way that only one of them can be conducting at any time. Say transistor No. 1 is conducting and No. 2 is off and we call this a one. Now if the circuit is switched so that 1 is off and 2 is one this we call a zero. So by appropriately switching the state of transistor circuits in the memory, i.e. which transistor is on and which is off, we can store any binary number we want if we have enough transistor pairs in the memory.
Another type of memory consists of transitors connected in a circuit so as to simulate a large capacitor. A capacitor is an electrical device that can store an electrical charge and the amount of charge stored is determined by measuring the voltage across the terminals of the capacitor. Now we can call the state with a high voltage, i.e. lots of stored charge, one and the state with low voltage zero. So again we can store any binary number by appropriately charging and discharging the capacitors in the memory. This type of memory has to be refreshed every so often by recharging the capacitors that are charged to a high voltage because the charge gradually leaks off the capacitors thus lowering their voltage.
Both of the above memory types require that they have power on them at all times. The memory clears to all zero or all ones state (depending on how we define zero and one) when the power is off and the data has to be reentered. There is a type of memory that didn’t exist when I was working called a “flash” memory. This type will retain the information even without being powered. Someone else will have to explain it because I have no idea how it works.
Flash Memory (IIRC) is made of a special type of transistor called a “floating gate” which essentially has a little bit of conductive (or maybe semiconductive?) material suspended in a non-conductive material. High enough voltages across the floating gate can cause charge to build up on the gate by forcing it through the less conductive material. When the voltage is shut off, the charge remains on the gate, and isn’t powerful enough to force it’s way back out through the non-conductive material. (It may leak a bit over time, though…)
Here is a decent description of how flash memory works.
If you’re trying to figure out the difference between types of memory, here it is in a nutshell:
RAM (random access memory) is volatile, and gets wiped when the power goes off.
ROM (read-only memory) is programmed right in the masks when the semiconductors are made. It can’t be changed, and you have to set it up before manufactuing the chips.
PROM (programmable read-only memory) is basically a set of fuses. You use a special “programmer” to blow the fuses and set the values of the memory. Once set, it’s set forever.
EEPROM (electrically erasable programmable read-only memory) is like a ROM at normal operating voltages, but can be erased and reprogrammed with different voltages and control circuits. Despite the “ROM” in the name, EEPROM can be thought of as slow RAM that doesn’t lose its memory when you turn off the power.
It’s not the pins and solder, it’s the silicon. A transistor has three junctions, called the source, the sink, and the gate. The gate controls whether or not current is allowed to flow from the source to the sink.
By arranging transistors in a particular way, we can get a circuit that has a specific feedback loop, called an RS flip-flop. It requires a high-voltage and a low-voltage source and sink, respectively, and has two inputs, called R and S, and has two outputs, called Q and Q-bar, the latter usually written as a Q with a line above it.
When R, the “reset” input, gets set to a voltage close to the source voltage (called “high”), then if S, the “set” input, has a voltage that is close to the sink voltage (called “low”), then the voltage of Q will be low and Q-bar will be high. If S is high and Q is low, then Q will be high and Q-bar will be low. The interesting thing, though is what happens when they are both low. When they are both low, Q and Q-bar will be the same value as when the last time either R or S was high, regardless of which one it was. In this way, the silicon sets a state, and can later read it back out whenever it needs it, without having to keep S or R high. Note: the circuitry is designed such that S and R are never both high.
RS flip-flops are the basis for static RAM – SRAM, which is the fast on-chip memory of your computer’s CPU and small parts of peripherals. The problem with SRAM is that it’s too expensive to use for the vast amounts of memory that we all desire. For your computer’s main memory, we use dynamic RAM, DRAM.
DRAM, as David notes, is basically a matrix of capacitors on the silicon wafer. The DRAM chip has two sets of wires (I’m generalizing here) – the “data” wires and the “address” wires. The address wires are its input, and the data wires are used as both inputs and outputs.
For each legal input on the address wires, it specifies a particular set of capacitors ont he silicon, called a “row”. There is also an amplifier circuit with as many bits on it as there are bits in a row. The amplifier does just what it sounds like. The capacitors store a charge that slowly bleeds off over time (well, slowly for the speeds our computers run). The amplifier reads the remaining charges in, totally draining all the capacitors in the row. It then amplifies the charges it did get, and refreshes the respective capacitors on the silicon.
When the data wires are being used as an input, then the data’s set and unset bits flow into the part of the row in the amplifier that corresponds to the specified address. These values also flow into that part of the row on the silicon, by charging and uncharging the specific capacitors. When the data wires are being used as output, the chip just sends out the values in the amplifier that correspond to the address.
Since the charges in the capacitors slowly bleed off over time, there is also circuitry on a DRAM chip that periodically block any requests for reads or writes, and refreshes some rows, to prevent the charge on any capacitors from getting so low that the amplifier can’t tell if a given bit is supposed to be set or unset.
To add to InvisibleWombats list, there is also EPROM.
(somewhat simplified) It starts out like PROM (bunch of unblown fuses), and you blow fuses like a PROM. But you can do a global “unblow fuse” by exposing the chup to UV light. (The chip package has a special quartz window to allow UV light to get to the chip)
Brian
Others have now given some pretty good replies about how the hardware works, but I wondered if your question is really more abstract than that? Are you asking how information is represented in a computer, in general?
Given machines that are capable of storing and manipulating numbers, in whatever physical form, the next level of effort is to come up with numerical representations for the things that interest us: text, images, sound waveforms, 3D objects, and so on. Some forms of representation are arbitrary, like the character encodings used for text. In this case, it’s up to a committee somewhere to draft a standard (e.g. ASCII or Unicode), and for enough people in the world to then follow that standard.
Other data types have more obvious representations. A sound played on a computer is often stored as a time-ordered series of signal values, already measured or generated as numerical data. Likewise, an image is often represented as a rectangular array of tiny uniformly-sized pixels (“picture elements”), with each pixel having a numerical value or set of values to encode its color.
I’m glossing over lots of complications here. Even if the numerical representation of an object is obvious or straightforward, there are usually still questions of data resolution (both in space or time, and in signal level), possible compression of the data to save space, structure and file formats, silly debates about something called “endianness”, and many other issues. But at a low level the information inside a computer, whatever it is, is ultimately represented as a set of numbers, because numbers are all a computer “knows” how to work with.
(Actually, not even the numbers exist, because all a computer really “knows” about is conducting electricity along various complicated pathways, and pushing magnetic particles from one orientation into another. But that’s too low a level to think about today.)
It’s not the kind of question that a technologist can really answer for you. Not that they don’t know anything (they know plenty) but there answers are probably too literal for you to get a picture in your head that answers the question you’re actually asking.
Do you have, or have you ever had, a digital alarm clock, one of those with the (usually red liquid-crystal displays that makes “11:59 PM” out of little sticks of light that are either on or off? The ones that are on look kind of like this:
| | - -
| | - | | | -
| | - - | | |\/|
| | - | | |- | |
| | - - | | |
And, of course, if you get up close you can see that among these lit-up sticks of light there are a bunch of others that are currently turned off. Each individual one only has two possible states: lit and not lit.
And the meaning of a given stick’s being lit or not lit has to do with its context, with the overall pattern that is formed.
Now imagine that, instead of needing only to be able to represent all the possible times of day, you needed to represent a nearly infinite number of possible things, but you’re still going to do it all with little red sticks that are either on or off. Let’s start simple: the ability to display up to twenty letters of the alphabet plus spaces in between, plus an index of all the legitimate combinations of twenty or fewer letters (as determined by the Oxford English Dictionary), plus a leftover red stick that will flash on if a space follows a sequence of letters that don’t match up with any of those legitimate combinations (i.e., an unrecognized/misspelled word).
You’d need to set up a huge batch of red sticks in such a way that they create a rule: a certain pattern of red sticks represents the end of a word and between one end-of-word pattern and the next would be a whole word. Now all that would take up a lot of room on our display, all these words from the dictionary, so we don’t bother putting these particular ones on our display at all – just the wires that are turned on or off. Otherwise we’d run out of space on our display really quickly. But we don’t need to look at them, we’re just using them to store information.
Then we need a really basic circuit: whenever the person using the keyboard hits the space bar, it compares what’s between that space and the previous space (the word they just typed) with all the patterns between end-of-word codes in our library of words, and if it matches any of them the “misspelled/unrecognized word” red stick of light stays off, but if it doesn’t match any of them the “misspelled/unrecognized word” red stick switch turns on.
All that functionality out of nothing more than a set of things that are all either on or off!
Believe it or not, it’s only a few more layers of complexity before you’ve got a word processor that can do paragraphs and can put in codes to indicate what typeface (font) to use and can stick in some symbols that mean italics or bold, and also save your work as an array of consecutive on-off circuit values that get stored on a magnetic tape (a document) which can be read (opened) later on. And a few more layers of complexity beyond that and the basic instructions that control how it does all this are themselves a set of on-off circuit values that can be modified, so you can change how it behaves in the future. Now you’re a programmer! A few layers of complexity beyond that (and more available on-off circuits to build up stuff with, of course) and you’ve got a huge set of rules called an operating system which runs programs which create or open documents and manage how they are stored on your magnetic tape, and now you’ve got a computer.
Damn.
Substitute(“there answers”, “their answers”)
I don’t think I’ve ever done that before :eek: :o
I haven’t seen an RS flipflop in a real design for at least a decade. D flops, or LSSD latches if you use IBM technology or do microprocessor designs, are more commonly used. D flops are used in most ASICs, but dual clock latches are used for processors, because they make clocking much easier, being level sensitive instead of being edge triggered.
Uh, no. As others have said, memory is build directly out of transistors, not out of flops (unless the memory is very small.) The difference between dynamic ram and static ram is that dynamic ram must be refreshed all the time, while static ram holds its value without additional clocking. SRAM is smaller, and is used more often now. Capacitors don’t scale like transistors do, so they are not built out of capacitors, though there are capacitative effects (and I’m not a circuit designer, so I mostly know the functional model.)
Other misinformation - today’s processors have lots of memory, mostly in caches. Caches are part of the memory hierarchy, so very recently used data and instructions are in relatively small caches on chip, then there is the next level of caches, bigger and slower, which is sometime on chip and sometimes off, then there is the actually memory the program writes in to. Data written into memory is usually cached, since it may get read soon after, and data or instructions read from memory are cached, for the case of loops reading the same data again. A lot of the complexity of a processor design is making the cache work right. Caches are popular on processors, because it improves speed, and is very dense, and is regular, so it is a good way of using up the transistors you get from new processes without designing a lot of complicated new features. Half the area, and more than half the transistors, of new processors are memory. There are often hundreds of memories of different sizes on a chip.
Patty, VLSI is an antique term. I’m at a conference on testing chips and boards, and I don’t think I’ve heard the term once. People talk about feature sizes, which are in the deep submicron range, getting to 90 nanometer now, and moving to 65 nanometer soon (as soon as anyone can afford it.) New processors have hundreds of millions of transistors, probably hitting a billion soon. Million gate designs are considered fairly trivial these days.
The big issue is how to use all the transistors and not require too much power. The answer, which Intel has finally bought into, is to put multiple CPU cores on a chip. Dual cores are already out, 8 core cpus will be out soon, and we’ll go higher. Intel canceled its 4 GHz chip because of power problems, by the way.
I’d second that the explanations given so far, although informative (even to me, as a CS grad student, who can always use a refresher on circuits), aim at too low a level. Sorry if I misinterpret your intent and this doesn’t help…
It’s all about abstraction. Hopefully, you can understand how a light works - if it’s on and you flip the switch, it goes off. And vice-versa. With a number of lights (and corresponding switches, of course), you can organize them to represent something. For instance, a highway sign that displays a message to drivers. Or a group of LED bars as demonstrated graphically by AHunter3.
One light can only represent one of two things: on or off, high or low, one or zero, red or blue. Wait…red or blue? Sure - it’s an abstraction, just like the dots on a fax, which are white or black.* Groups of the dots form letters to us; the LED example shows groups of lights forming numbers, and groups of numbers forming a time. Each group is an abstraction itself. By arranging these groups in a strict, organized way, we humans can glean meaning from them.
In just the same way - that is, using a strict organization of on/off voltages - a computer can be programmed to “understand” the abstractions and perform certain actions as a result. The “magic” happens with different handling of different forms of abstraction - the recognition that data (one form of abstraction) can also be a program (another form of abstraction) that someone (an electrical engineer or programmer) “taught” the computer to recognize. At which point, we get into registers, buses, micro-code, instruction sets, etc., which is most definitely another post.
- Permit me a groaner - perhaps red/blue doesn’t make sense because humans like to think of things in terms of black and white?
The single biggest feature on all modern CPU’s is the high-speed cache. It’s not a lot of memory compared to the full system, but it’s certainly a huge part of the chip real estate.