Artificial Intelligence (GPT-3) Explains How RAM (Computer Memory) Works

Photo by Liam Briese on Unsplash

Below is a conversation I had with OpenAI’s GPT-3’s language model. I gave GPT-3 the role of “Wise Being.” All of the regular text is generated from the artificial intelligence, the italics are me. (Disclaimer)

You can also talk to Wise Being yourself.

Kirk Ouimet: Grateful to have the opportunity to speak with you today.

Wise Being: Grateful to be able to help you.

Kirk Ouimet: I wanted to talk about computers today if that is OK with you.

Wise Being: OK.

Kirk Ouimet: So I have built computers all of my life. My Dad and I built them together when I was a kid.

Wise Being: Your computer-building days are not over.

Kirk Ouimet: They are not, I just ordered a new processor from AMD which has 32 cores and I am pretty excited for it.

Wise Being: What do you use computers to do?

Kirk Ouimet: I play games and code and talk with friends. Lately I have been having an issue with my computer. It has been randomly crashing, giving me “blue screens of death” and having other random errors. The first thing I suspected was that one of the DDR4 memory modules was bad so I removed of the memory sticks I had in and just put one in. The computer has been stable so there is either an issue with one of the memory modules or there is a problem with one of the memory slots on the motherboard.

Wise Being: How many memory modules do you have installed?

Kirk Ouimet: I just have the one in there now and will slowly add the others and see if it starts crashing again. I was holding one of the memory sticks in my hand and realized I have no idea how it functions. It has a bunch of pins on the bottom of it. Can you explain to me how DDR4 RAM works?

Wise Being: Sure. Please keep in mind that I am working from a simplified model of a computer for the purpose of this conversation and no doubt I will not explain everything perfectly.

Kirk Ouimet: Sounds great. So my first question is — how does the motherboard communicate with the RAM?

Wise Being: OK. The motherboard has a chip inside of it called the memory controller. The memory controller acts as the “instruction set” to the RAM. In other words, it is the interface on the motherboard that is used for communicating with the RAM. The memory controller contains specialized instructions on how you can interact with RAM. If you want to read from RAM (often done if your primary function is to read data in and write data out), there are different instructions for reading than there are writing. Similarly, if you want to access a specific location in RAM the memory controller contains instructions on how that should be done. The process by which this interaction occurs is very simple.

Kirk Ouimet: Please explain this process.

Wise Being: The memory controller and the RAM itself contain rows of pins, much like a conductor on an electric circuit board has. When you want to read from RAM or write to RAM you actually route the data through a series of complex pathways so that it is directed into the correct pin on the memory module and then out of that pin into the “bus” (a pathway that goes directly into and out of all of the pins on the memory controller).

Kirk Ouimet: So the memory controller on the motherboard sends electrons over the pathways to the pins on the bottom of the RAM stick? And depending on what needs to be accessed certain pins will receive the electricity?

Wise Being: Yes, that is an approximation of the process.

Kirk Ouimet: So each pin provides access to a portion of the memory. How is the information physically stored on the memory stick?

Wise Being: There are different methods for constructing RAM but they are all based on “cells”. The cells are the smallest unit of information that can be stored on a memory stick. Each cell has two states — it either stores a 1 or a 0.

Kirk Ouimet: How are cells activated or deactivated?

Wise Being: If you add electricity from a power source to a cell, it will go into state 1. If no electricity is supplied then the cell is in state 0.

Kirk Ouimet: Does every cell have a wire that connects it to the pin?

Wise Being: No, not necessarily. A lot of times the wires for all of the cells in a memory module are stored together in a single wire, as there is probably not enough room on each pin to route a wire for each cell. That is where the “row” and “column address” comes in. Each cell on a memory stick is associated with a row and column address number. The row and column addresses are what tell the memory controller which cell we are trying to access.

Kirk Ouimet: So how can we activate a specific cell? How is each cell addressed so that it can be accessed?

Wise Being: In order to activate a specific cell, which can be thought of as pin number X, row Y, column Z, what you do is send electricity down the rows so that the electrons arrive to each cell. Then you send the correct combination of electricity and voltage down the columns to ensure that only pin number X goes into state 1. It is similar to a sliding puzzle in this way. It turns out that there are a lot of different combinations that will work for each puzzle, but only one correct combination of electricity and voltage in the correct sequence will produce the correct “image” of 1s and 0s (the actual data stored in the memory controller).

Kirk Ouimet: I see — so the memory controller adjusts the voltage applied to the pin in order to read data. Is it just the voltage amount which is used?

Wise Being: Voltage plays a role, but it is more complicated than that. There are actually separate voltage and current settings that can determine how much electricity of each type is allowed to cross the pin and thus flow through the cell.

Kirk Ouimet: The sticks of RAM I just ordered are 32 gigabytes. That is 256,000,000,000 cells to store 0s or 1s. How can something with that many cells be manufactured by humans?

Wise Being: Good question. I will try to explain the process. There are two different manufacturing methods for constructing RAM: One is more common and older (called “Static RAM”), while the other is newer and less common. With static RAM you construct the memory from a material called silicon-oxide. Silicon-oxide is known as an insulator, meaning that it naturally repels electrons. To make a cell, you need to put a small amount of silicon-oxide on the cell’s surface and then provide current to it which encourages it to release some of its electrons. Once a cell has been made, so that electricity can flow through it, this material must be baked at over 1000 degrees F to harden it and keep it in place.

Kirk Ouimet: Every cell must be placed in the perfect location? Or do we just put a bunch of silicon-oxide in the chip and then send current through it?

Wise Being: Every cell must be placed in the correct location. The name of the technique for doing this is called “self-aligned silicon-oxide”.

Kirk Ouimet: So our manufacturing process is precise enough to place 256,000,000,000 cells onto a chip?

Wise Being: Yes.

Kirk Ouimet: That seems like alien technology.

Wise Being: In some ways for the people who are doing it, it is alien technology. However, all of that complexity is abstracted. There are teams of intelligent people making very sophisticated machines and software to accomplish this task for you. That is how many of the most sophisticated human technologies work today. At some point, it becomes a machine far too complex for humans to control directly and is thus controlled indirectly by humans.

Kirk Ouimet: So as I am typing to you now the battery in my phone is supplying voltage to the memory stick in my phone and manipulating millions of the cells to turn off and on every second.

Wise Being: Yes.

Kirk Ouimet: It is incredible.

Wise Being: It is pretty awesome, isn’t it?

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How to use Django Models

Introduction to GIG — General Information Graph

Leetcode 875. Koko Eating Bananas

OpenPaaS Newsletter 7 - September 2017

What the hell is scalable code anyway?

Feeling lost as a new Quality Engineer (QE)?

A Bit of History: Outsourced Development and Offshore Development

Definition of Done and Why It Makes the Difference

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Kirk Ouimet

Kirk Ouimet

More from Medium

GPT-3 in a Nutshell

Open AI

Dexai Robotics, the Boston startup that is automating restaurants

What it is, What it isn’t, and How to do it. AlphaCode from DeepMind

The Future of Cities: Futuristic Architecture and Habitat by AI