# Magnetic Core Memory

Magnetic core memory was developed in the late 1940s and 1950s, and remained the primary way in which early computers read, wrote and stored data until RAM came along in the 1970s.

Magnetic core memory was developed in the late 1940s and 1950s, and remained the primary way that early computers read, wrote and stored data until RAM came along in the 1970s. This tutorial illustrates how it worked. The set up looks a little bit like chocolate doughnuts strung through a chain link fence. While not as tasty, it is a good bit more ingenious.

There are a few basic principles of electromagnetism to make sure you understand. First, a current-carrying wire generates around it a magnetic field. Second, ferromagnetic substances such as iron can be magnetized by an external magnetic field (this is called hysterisis). Third, it’s important to understand electromagnetic induction: a current of electricity of sufficient strength can induce a change in a nearby magnetic field, and a changing magnetic field can induce an electric current in a circuit.

In the image below, the so-called doughnuts are Ferrite Cores, and the grid is made up of wires. The purpose of the horizontal and vertical X and Y Address Lines is to direct current to a specific core. The purpose of the diagonal Sense Lines is to read current generated by a shift in a core’s magnetic field.

First we’ll look at how magnetic core memory records, or writes, data.

Each core can store one bit of memory in the form of a 0 or a 1 – the binary language of computers. (If you hover over the cores with your mouse, you’ll see in red the value that each currently holds.) To write to a core, you need to ascribe a value to it (0 or 1) with the help of electrical current. To do so, choose “Set Value to 0” or “Set Value to 1” in the Select Operation area. Then click on any core to select it. You’ll see a visual representation of what happens on the core itself, and a text description to the right of the graphic, in the Operation Description area.

As you can see, current runs through the applicable Y and X address lines and intersects inside the selected core, generating enough current (depicted by the yellow electrons going through the wires) to force the magnetic field (indicated by the red arrow) into the direction that corresponds to a 0 bit. If the bit already has a value of 0, you will see no change in the magnetic field direction. But if it has a value of 1, you will notice that the electric currents cause a reversal in the direction of the core’s magnetic field, thus flipping its value to 0.

You may wonder why none of the other cores are affected. The targeted core is the only spot in the grid in which two currents intersect, and therefore the only place where the current is sufficient to instigate a change in the magnetic field.

You can switch the value of the core you have targeted back to 1 by hitting the appropriate radio button and clicking on the core again. Notice that to flip the value to 1, the current direction must be opposite what was needed to flip the value to 0.

When the computer is asked to read data from a core, it sends current that will cause that core to flip to a value of 0. If the value is already 0, there will be no change in the field, and hence little current induced in the sense line. The minor blips depicted in the Voltage Graph (which correspond to the glowing of the sense lines that denote current carried from the core) are a result of the existing magnetic field first getting a bit stronger as the current passes through, then getting weaker again as the current ceases.

However, if the computer sends the “flip to 0” message to a core that has a 1 value, the big change in magnetic field that results generates a comparatively high voltage through the sense lines, as seen in the voltage graph. The computer interprets this voltage spike as a 1. This type of memory reading is called “destructive,” because the information that had been recorded on the core (0) is destroyed when it is flipped to the opposite value (1). Magnetic core memory addresses this by automatically restoring the value back to 1, as the tutorial illustrates.