This page was last updated on March 13th, 2020(UTC) and it is currently May 30th, 2023(UTC).
That means this page is 3 years, 78 days, 6 hours, 35 minutes and 45 seconds old. Please keep that in mind.

15 - Memory RAM, basically, is a series of registers outside the CPU that get addressed with a multiplexer. The amount of ram that you can "address" is determined by the "size of the bus." Normally, you have another processor (Memory Control Unit [Not to be confused with "MicroController Unit" which has the same acronym.]) that is tasked with handling the RAM for you. In reality, those bits of memory can degrade quickly when interference is present. The MCU's task is to be an abstraction for RAM, so the CPU design can focus on what it needs to do to become better. The MCU is usually on the same chip, but it is merely designed as if it's separate. Normally, an MCU has an "address bus" that go to a multiplexer to select what RAM you want. It also has a "data bus" which, like the address bus, is a series of wires, except this is "bi-directional" and gets "selected" via a wire dedicated to deciding whether you're "reading" or "writing." Let's say, for example, you have an MCU that has an 8 bit address bus and an 8 bit data bus. Basically, when you want to read from RAM, you set the "rw pin" to 0 (read), write the address (location in ram) you want to the "address register" (which goes to the address bus) and set true the "CLK pin" (clock pin, which, in this case, counts as "enable"). The "RAM data register" would then contain the data specified at the address which you wanted. You would then set false the "CLK pin," which would tell the MCU to turn off, go back to keeping the data safe, or whatever. In reality, you would have a "clock" (we'll cover that another time, but it's simple) do that for you, since it takes a certain amount of time for the input from the RAM to "stabalize" (some operations are faster than others, so we want to give it time to finish doing it), and the "clock" would be calibrated to a reasonable amount of waiting time for that to happen. Writing is done the same way, except you set the "rw pin" to true, to let it know that you want it to read from the data and stick the result at the address. Not so bad, right?

RAM is short for Random Access Memory, which is what we can do with it. Random Access is opposed to "sequential access" or something a bit less controllable. The idea is, we can specify what address we want, which is harder to do with, say, a casette tape, cd, or record. With those things, they must physically move components to get to the address which they want.

Now, the fun bit: ROM or Read-Only Memory. Most ROM is not truly "read only," but the idea is to imply that you're not supposed to write to it willy-nilly. The idea of ROM is that it is meant to maintain it's data after the power goes off, which can't be done with those RS-latches. I won't go into every type, but, rather, one type, that is closest to what you've learned from me so far: EEPROM (Electrically Erasable Programmable Read-Only Memory [see the paradox in the very name? It's read only, but I can change it!]).

The basis of how this works comes down to "capacitors." Capacitors, which I recommend (highly, for safety reasons) learning about on your own, are circuit bits that hold a charge. Many argue that a battery is a form of capacitor. Generally, for EEPROM, you stick the capacitor between materials with a high resistance, then let it take a charge, which can be done without actually letting electricity flow into or out off it (yeah, now you know why I don't want to teach it). Basically, then, this charge can act as the base of a transistor. Writing (turning from true to false and vice versa) is a bit slow, because you have to wait for the entire discharge, and wait for a full charge. On the plus side, those the gates made from those transistors can survive a power outage. What's cool about this is, if you take the time to write a program and shove it in here, you can store it, which means you can run it. A program stored in this memory will eventually decay (the transistors will leak on their own), but it takes a while. Anyway, if you make a RAM like structure out of this, you have RAM that takes forever to write to, but can save it's data for a long period of time. This ultimately means we can write programs that can then be run at a later date.

So, if, say, we take the previous machine, set it up so that every time you hit a button it increments the address register. You can then have a program written into it's EEPROM (made by another computer, or by replacing operations with operations that allow reading and writing to the EEPROM), and you can change certain "variables" while it is running, simply by changing the "input" switches. This, essentially, allows us to come up with complex math equations that the computer can take and perform on a number we give it and spit out another number. In practice, back in the day, letters were given numeric values, and you could then use this machine to "encrypt" data, which could then be sent to someone else to be "decrypted." Naturally, we want more than that. We want cat videos.

Get your own web kitty here!
┬ęCopyright 2010-2023. All rights reserved.