5 ms·
thanks for your reply, but this is not the answer I am looking, I want to know the reason why RAM is necessary for a computer, why not just leave those circuits
by terrycody 8y ago
thanks for your reply, but this is not the answer I am looking, I want to know the reason why RAM is necessary for a computer, why not just leave those circuits untouched, because if a number is 10001011, those wires already got current, I don't need to store this number elsewhere, right?
- pwg 8y agoYou can't leave wires 'untouched' in an electrical system. Unless something continuously supplies energy to maintain the charge, the charges on those 'untouched' wires will simply fade away, and with it, your data. [1] The data is stored in the electrical charges on the wires, not in the actual wires, which appears to be one source of your confusion. Further, those wires will get reused on the next cycle for the next piece of data moving through, which means if you don't save the values represented by the current charge state of the wires, the data will be gone when the next cycle happens and new charges are forced onto the wires for the next piece of data. RAM (memory) is the place for holding onto those particular charges (which is what is storing the data) that were on the wires, until a later time when you want to go pick those pieces of data up again. [1] ignoring flash memory, which is a very specially designed "charge holder" that does not need the continuous energy supply to be able to maintain the charge states.
- AnimalMuppet 8y agoAmusing 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.
- terrycody 8y agothanks so much sir! Really appreciated your help! You must be at least a very high-level expert in big company like Google or whatever, or you won't know these things so clearly. To be honest, I have a feeling your answer is 100% what I need to find, but my head is still spinning like hell, I am very old guy now and I have no background of STEM, want to be a self-taught CS person, I just started recently :( I already watched some basic videos like transistors, logic gates, and can fully understand them (what a luck!), and yesterday when I watch that video series:https://www.youtube.com/watch?v=fpnE6UAfbtU&list=PL8dPuuaLjXtNlUrzyH5r6jN9ulIgZBpdo&index=8&t=0s&ab_channel=CrashCourse https://www.youtube.com/watch?v=fpnE6UAfbtU&list=PL8dPuuaLjX... I really have a hard time to understand it clearly in my head, the video is going to build a RAM from scratch, but didn't explain why computer MUST need RAM from a hardwire level, thats why I ask the question. ------------------------------------------------- I will listed the parts I still don't understand in your answer, no idea if u will back at this or not :( -------------------------------------------------- "The data is stored in the electrical charges on the wires, not in the actual wires, which appears to be one source of your confusion." From what I learned the data indicates 1 when that wire got current flow, but since the voltage is still there I think this wire will always has current flow to keep show "1" to our human, until the next circle e.g. a 0 state input come, then no flow anymore because no voltage to send current, am I right? You said its the charges which I try to accept but can't. Because later we will talk about RAM, when data is stored in RAM, a 1 bit number like "1" means that wire will keep getting current in order to keep the state. Sry my English is not good enough hope u can understand, what I mean is, I can see you describe 2 different logics in your answer, input wires only flow a sudden flow of current then fade away, whereas RAM wires will keep let charges flow, but in my eye, all these things build with transistors, so why design like this? (lets go to 2nd question) "those wires will get reused on the next cycle" If the final purpose of design like above is re-use the "input wires" which I can understand! but is this necessary? I mean, in today's CPU, we has billions of transistors inside, for example, if we want to store the number, 1101, just keep current flow in 1, 2, 4 wires, and done! If we need store another number, 11000101, just choose another 8 wires and keep the states, why not just this? We have billions of such wires! ---------------------- Sry for these question, I know myself is a stubborn guy and love to dig things from the very ground up, I think my problem is how to visualize these hardware levels, why they design like this or that, why all these things necessary, I know today's programmer most of them don't even know these things and won't harm to be a good developer, but I don't know why, I want to learn them! Thank you very much sir, at least I will read your answer again and again and again. PS: I already opened a ton of taps to read similar answer online hope I find sth :)