Main content
Computers and the Internet
Course: Computers and the Internet > Unit 2
Lesson 4: Computer componentsComputer memory
When input devices send binary data to a CPU, it immediately stores that data in memory to make it easier to process.
Let's say we ask a computer to add 2 + 4. Here's what it will do:
- Store 2 (0010) and 4 (0100) in memory
- Use a circuit in the CPU to calculate the result
- Store 6 (0110) in memory
Since the CPU is constantly using data from memory, they're connected via a memory bus, a high speed communication transfer system, typically made from wires, conductors, or optical fibers.
Memory size
Memory is designed for fast access and typically stores only the data and instructions that are necessary for the currently running programs on a computer.
Computer memory isn't infinite, so there's a limit to how much data we can input before we overflow the memory. Computers also vary a lot in memory size, usually because of physical size constraints. A desktop computer can remember more than your phone, but your phone can remember more than the Raspberry Pi.
🔍 How much memory does your computer have? Most computers make it easy to find out.
My own MacBookPro has 16 GB of RAM, which is more than enough for my needs:
Memory types
This type of memory, also called main memory or RAM (Random Access Memory), is only used for temporary storage of data. When you restart a computer, it typically wipes the memory entirely. Memory wouldn't be a good place to store data for later, like files and programs.
Computers store long-term data in a different type of memory: external memory or secondary storage, like a hard drive or USB drive. We'll learn about that next.
🙋🏽🙋🏻♀️🙋🏿♂️Do you have any questions about this topic? We'd love to answer— just ask in the questions area below!
Want to join the conversation?
- what about the memory types. For example: RAM ROM DRAM SRAM DROM EROM EEROM. I dont know anything about them. Can you explain me?(6 votes)
- I know it's a little late but I'll just add some to the previous answers.
RAM, ROM and Cache are the 3 main types of memory.
RAM stands for Random Access Memory and it only stores data temporarily, as soon as your power is off,you will lose the data, but the advantage is that its speed is a lot faster than external memory or ROM (we will get into that)
SRAM ( static RAM ) and DRAM ( dynamic RAM ) are the two main types of RAM.
When a SRAM unit is given a status (0/1), it will maintain this status until the power is off or given a new status. But SRAM need 4-6 transistors to store a 1-bit data,so it costs a lot.
DRAM on the other hand, only needs 1 transistor to store the 1-bit, but you have to keep refreshing in a certain period of time to keep the data, otherwise it will disappear. DRAM keeps data fora short time, the speed is also slower, but it's cheap, and still faster than any type of ROM. There are many types of DRAM too, but you can look it up yourself. (the most used type is DDR RAM)
ROM stands for read-only memory, like its name, you can only read the data, once the data is written in it won't change, and will be saved even if the power is off. It's usually a readable chip integrated on a hardware and is written before putting the computer together to identify and control hardwares.
By EROM and EEROM I think you mean EPROM and EEPROM?
EPROM, erasable programmable ROM, uses ultraviolet rays to erase data,one of the common used ones.
EEPROM, electrically EPROM, doesn't need ultraviolet to erase, so the programming can be done in the circuits, but with high price and slow writing.
I hope this helps!(17 votes)
- Do things like addition operations use many interlinked logic gates (which, presumably, would then be called a logic circuit) to add numbers?(4 votes)
- Yes, addition uses the ADDER circuit: https://en.wikipedia.org/wiki/Adder_(electronics)
It's built on XOR gates, so I did not show it here, but it's actually pretty simple once you understand XOR gates:
https://en.wikipedia.org/wiki/Adder_(electronics)#/media/File:Halfadder.gif(6 votes)
- How exactly is data stored within the memory of computers? How does a memory chip know how to respond to the CPU's "request" to either store or output specific data?(5 votes)
- typically a memory controller will be included with the ram package, that controller will interface with the cpu and the ram as a means of sort of a translator. the way it is stored is in tiny capacitors that are constantly being rewritten because of how fast the lose there charge(2 votes)
- What is the minimum GB of RAM that I would want for a new desktop?(4 votes)
- It depends on what tasks you want to do on your desktop, for example if you want to just do light tasks like for work 4-8gb is good enough if you are using it for gaming, 16-32gb is good, and i you are doing heavy tasks like 4k video editing or gaming with extremely high graphics, 32-64gb is good(2 votes)
- you say, "a desktop computer's CPU can remember more." That suggests that a CPU itself has memory. Do some, all, or no CPUs contain memory? If there is memory in a CPU, is that accessed via bus?(1 vote)
- From the author:I think I worded that poorly. It is the RAM (main memory) that is doing the remembering, not the CPU itself. The CPU gets to utilize that memory thanks to the high-speed bus. I will reword that.
However, now that you ask: CPUs do often have a little bit of memory, known as the registers: https://en.wikipedia.org/wiki/Processor_register(5 votes)
- can stuff still work if there is no more memory space(1 vote)
- yes, but you won't be able to save things unless you have a hard drive.(4 votes)
- So the desktop would be an example of RAM memory?(2 votes)
- A desktop computer has RAM memory, as the running applications uses the RAM to store data temporarily. A desktop computer also has a CPU, input and output devices, and a hard drive ("secondary" memory).(1 vote)
- do certain memeory types work better than others(2 votes)
- can someone tell me the 359th digit of pi?(2 votes)
- 360 is the 359th digit of pi(1 vote)
- So I see I have friends this is entertaining wabuglating for a bondalence(2 votes)