Part of 'RAM-a-thon'

cyber rift

Segment 1

What is RAM

Random Access Memory stands for RAM, or the opposite... Honestly it depends on how you look at it.
But in reality it's like the short-term memory of your computer, where it stores data that needs to be accessed quickly while being used. As opposed to long-term storage like hard drives or SSDs, RAM can be accessed randomly, meaning your computer can grab any piece of data from any memory location without having to go through the preceding bytes. Some people claim RAMs are made of cheese (And that's a fact).
Think of it as a fast and temporary storage space computers keep the information it's currently using to run programs and execute tasks. When you start a program or perform anything, the necessary data loads into RAM so the computer can access it quickly whenever needed.
It's what's allowing your computer to multitask, run multiple programs simultaneously without causing a fire. The more RAM capacity your computer has, the more tasks it can handle at once without getting bogged down by the browser you're using right now.
You should also know that RAM is volatile, which means it loses all its stored data when the power is turned off. That's why your computer saves files and data to long-term storage, to keep them safe even when the computer is shut down, because without it computers would struggle to multitask, run programs or even boot up!

Importance of RAM (in) Computing

TLDR: It's more important than a keyboard (And that's another fact).

To clarify the keyboard mention: do you need one? Yes. But can you start a computer without it? Yes. That's the point when you launch a program or load a file, the data is temporarily stored in your RAM so that the CPU can quickly access and manipulate it.
To remind you, The more RAM your computer has, the more data it can store temporarily, allowing for smoother multitasking, faster program execution and letting Windows use almost 50% of it (please use Linux).
The CPU can quickly retrieve and modify data stored in it, And if that data takes more space than it should, the CPU would have to heavily rely on storage devices.
If you're psyching your self-out because of it like i am, then yes using an SSD as RAM leads to poor performance, making loading a program as slow as waiting for the sun to explode. Which I'm sure nobody wants, unless you’re truly a psycho.

Later, we will dive deeper into the inner workings of RAM, It's internal structure, how it really works, and common implications in modern computing.
But what about the not-so-modern implications? Consider, just for refference. The first commercially mass-produced RAM chip to enter the market liquidity was the 'Intel® 1103' , developed and fabricated by them in October 1970. It was a dynamic-random-access-memory (DRAM) chip, marking a significant advancement from earlier memory technologies, it offered relatively greater storage density and less Latency. Despite its modest capacity by modern standards – holding just '1 kilobit' of data still laid the groundwork for the dynamic RAM technology to continue to today's computers as it turned computing up-side down – After learning about that, I bet you can’t emphasize the fact that Intel® used to make RAMs, and neither do i!

But hear me out, knowing how RAM functions is the key to make it faster or simply finding computer architectures interesting in first place.

The Basics of it

Have you ever pondered why data is temporarily stored in RAM rather than permanently like SSDs? How exactly does the CPU manage to store and retrieve its data in RAM when needed? We’ll find out… Keep in mind this topic is a general explanation of the basics of RAM (you will find detailed technical coverage of this in the next segments). And to get you started, lets begin with taking a scope on how the CPU stores said data to RAM.

We have what is known as the CPU fetch-decode-execute cycle. Where the CPU continuously draws instructions from memory, decodes them to determine the operation and operands then executes the instructions, performing computations accordingly to its demands.
I decided to further delay this topic all the way down to Segment 3 in “CPU Registers” since it needs its own Topic.

So we’ll get back to it after a bit – to get you prepared for the low-level tech talk down the line, you'll see some basic concepts of RAM’s specifications:

• Memory: Not your memory whether you remember things or not – but in computer science, Memory refers to the electronic components that store data temporarily or permanently (in our case its temp stored).

• Volatility: Why did the RAM module break up with its computer? I'll answer that in a moment. Volatility is about whether the data stored in memory persists or not after the power is lost – to answer the chubby question, the RAM broke up with its computer because it couldn’t handle the memory leaks in their relationship! Haha, that was slightly humorous.... or was it?

• Random Access: The random access capability of this type of memory allows data to be accessed quickly and rather efficiently from any location, unlike sequential access where data needs to be accessed in a pre-determined order, it lets CPU to access data from any memory location constantly at all times regardless of the previously accessed data.

• Temporary Storage: RAMs serve as temporary storage data for program instructions that are actively used by the CPU and possibly other components. The downside for that? it has a limited storage capacity to even count as a storage ‘drive’ but does not retain data when power is lost. And kids… this is why im advising you to Hibernate your PC.

• Bizzare Measurements: It is usually measured in gigabytes (GB) or gigabits (Gb), as computers have a certain amount of RAM installed, they range all the way from megabytes (MB) up to terabytes (TB) for current gen 64-Bit computers and older 32-Bit systems have a maximum of 4GB. meaning a higher capacity like 8GB can't be used due to a hardware limitation of having just 2^32 Bits, this goes for CPUs as well.

The Internal Structure

Want to become a ramstermind? Then you can't skip learning about it from the inside-out, but wait!

The way it works is fascinating because at the heart of each and every RAM are memory cells, tiny units capable of storing a single bit of data (0 or 1). Arranged in an array, forming the building blocks of RAM modules with each cell being essentially a capacitor or a flip-flop circuit holding an electrical charge to represent binary data (again. 0 or 1) living in a grid that looks like a row of.. slots? Yep!
If you don't know yet, CPUs interpret only binary code, which consists of numerical instructions. This is referred to as machine code or machine language, and it is represented solely with 1s and 0s.

While known as Rows in computer science, they are structured into rows and columns, resembling the described layout. Each one intersects at a memory cell and is defined as a wordline, allowing the selection of specific memory Rows for reading from or writing to the desired address in memory.

You recognize this... 0xA011FF? no? okay you clearly never cheated in any game, well no worries.
0xA011FF is a physical RAM address that consists of 6 Hexadecimal digits and each character in the latter address represents a nibble (4-Bits). It is controlled by the memory controller, the desired row and column in the RAM array based on the memory address is provided/selected by the CPU.
everything you just read is wrong, just kidding. But who knows? because we may (will) have new architectures sometime in the future.

The 'instructions' that CPUs execute are nothing but raw binary data that is formed by a series of bits, which represent specific operations (Opcodes) to be performed by the CPU, that is. The Control Unit. Think of it as 8 groups and each group has 8 people, with each one representing a bit, by doing a simple calculation you can tell we have 8 bytes.
All memory cells store one Bit of data and multiple of these can be combined to store larger numbers of data units such as Bytes, Megabytes or even Terabytes… etc. making the browser you’re reading this with possible as you're most likely to be using a DRAM right now.
What's that? a ‘DRAM’ (Dynamic RAM) is. As the name states, dynamic because memory cells require periodic refreshing to maintain the integrity of stored data due to charge leakage from the capacitors used to store data because, again RAM is way faster and incomparable to the other methods of slow data storage. Now that you’re familiar with that term, DRAM comes equipped with a Refresh Circuitry. A chip-like module built into it that ensures data is being periodically re-written to memory cells preventing the possibility of charge and data loss.

A Nugget of information: A Byte is the smallest addressable unit, meaning that the CPU can read or write one Byte at once at speeds you can't possibly fathom.

RAM Operating

Why does RAM use addresses instead of storage blocks to manage data? This aspect is only the tip of the ice-berg as they say. Let's see how memory addresses in RAM operate during workloads and ongoing tasks. Random access memories run through a structured process involving memory addressing, reading, writing... etc.

The range of valid memory addresses in a computer is called the address space. In a 32-bit system, each memory address is typically represented by a 32-bit binary number, such as ‘0x08405260’, which corresponds to the hexadecimal translation of the number ‘134484912’. This translation from physical address to a virtual address is handled by the memory management unit (MMU), allowing the operating system to manage memory by providing each process with its own virtual address space.
For example, reading from RAM is a relatively fast operation because data can be accessed directly without needing retrieval from external storage devices, But the CPU, and only it, can request stored data in RAM by sending the corresponding memory address to the desired location. The memory controller then intercepts this address and activates the appropriate row and column in the RAM array using address lines. Thus, in the state of reading, the CPU can retrieve data stored in RAM but cannot change or modify the content of RAM cells. Because when writing to RAM, the CPU sends a write command along with the memory address and the data to be written. For example, to write the value ‘0xFF’ to address ‘0x00400000’, the memory controller locates the specified memory cell by allowing access to the corresponding row and column in the RAM array.
Writing to RAM is also a fast operation, although it may require slightly more time than reading due to the additional step of data transfer and the commands issued by the CPU. Access time and latency are important in memory operations. Have you ever experienced stutters when playing a game or running an intensive program? You're not alone.

As much as this can be related to RAM, It's not.
Mostly When the CPU requests to write or read data from the RAM, there is a delay caused by various factors, including the RAM itself. Remember, the more your RAM costs, the faster it is, because fast and good-quality RAMs tend to have lower latencies due to the way they're made.
Lastly, each memory cell within the RAM stores a physical bit in the ‘flip-flop’ capacitor in certain types of RAM. (ie: A memory cell might store the value ‘1’ if the capacitor is charged or ‘0’ if it is discharged)

Fa'g't: In ASCII, the table goes up to the number 255, which is '11111111' in binary. Meaning, 8 bits are sufficient to cover all the characters you're seeing right now!

Empty space for no reason, literally