3 ms·
Amusing and somewhat related story: I was trying to (programmatically) tell the difference between two versions of a circuit board. At a certain address, vers
by AnimalMuppet 8y ago
Amusing and somewhat related story: I was trying to (programmatically) tell the difference between two versions of a circuit board. At a certain address, version 1 had an 8-bit read-write register, and version 2 had a 16-bit read-write register. So I wrote a 16 bit value to that address, read it back... and read the correct value, even from the board that only had an 8-bit register there!
What happened was, when I wrote the value, the bus driver chips drove all 16 bits of the bus to the levels specified by the data. Even if the data wasn't latched by the register, that bit of the data bus still had the voltage level corresponding to the data bit. When I read the value, the bus driver chips reversed direction, and wrote out what the voltage level on the data lines said. For the 8 bits that were not driven by the register, the voltage level they had was the voltage level that I just wrote to them (because every chip on those bits of the data bus was in a high impedance state, both for the read and for the write). So I was literally using the wires of the data bus as memory! I found that it could remember data for roughly two seconds this way.
So, why do we need memory? Because we want the computer to remember for more than two seconds. And because we want it to remember more bits of data than we have transistors in the CPU chip. And because we want to use the transistors in the CPU chip for something else - for computing, not for memory.
- terrycody 8y agothank you for your story, I am too early to understand such a case lol, but I get the idea, which means, a wire can hold current a while, but not forever, yes this is clear, but why not just keep give the wires current flow? Then a "1" state stored! If we want to store another number, just use other wires! We have billions of transistors and bus wires right? Why a RAM is a must when we have near unlimited wires already ?
- AnimalMuppet 8y agoThe wires are a "data bus", which connects multiple things. You could think of it as a street, which has multiple houses on it. Sure, I could use the street to store my stuff in, but then other people can't use the street to get to their houses. It's better that I store my stuff in my house. This leaves the street free so that multiple people can use it to get to and from multiple houses.
- pwg 8y ago> but why not just keep give the wires current flow? And... On a very abstract level, you've just designed a memory. A memory is a particular design of "wiring" [1] setup in such a way to keep the current flowing [2] to store the charge that represents the data. [1] There is more than just wires, as just wires alone can not store a charge for very long (example, plug in an extension cord, the extension cord output will be powered, unplug it, no power on the other end). [2] This is exactly the design of a SRAM chip. Wires and transistors connected together to "keep the current flowing" to hold the data represented by the charges.