### Magnetic Core Memory: Working Principle
Magnetic core memory is a type of non-volatile random-access memory (RAM) that was used extensively in early computers from the 1950s to the 1970s. It stores data using small magnetic rings (cores) made of a ferromagnetic material, through which wires are threaded to control and detect the magnetic state of each core.
Here’s a detailed breakdown of how it works:
### 1. **Magnetic Cores:**
- Each memory bit (either 0 or 1) is represented by the magnetic polarity (direction) of a small ferrite ring, called a **core**.
- These cores are made of a material that can be magnetized in either a clockwise or counterclockwise direction, corresponding to a binary state (1 or 0).
- The magnetic state of the core remains stable until it is intentionally changed, making core memory **non-volatile** (retains data even when power is off).
### 2. **Memory Grid Layout:**
- The cores are arranged in a 2D matrix (usually a grid), with each core representing one bit of information.
- Wires are threaded through the cores in an arrangement that allows them to be selectively magnetized or sensed.
### 3. **The 3-Wire System:**
Three sets of wires pass through each core:
- **X-Wire (Horizontal):** Controls the row selection.
- **Y-Wire (Vertical):** Controls the column selection.
- **Sense/Write Wire:** Detects the magnetic state or changes the state of the core.
By sending currents through the X and Y wires simultaneously, a specific core at the intersection of a row and column is selected.
### 4. **Read Operation:**
The key feature of core memory is that **reading is a destructive process**:
- A specific core is selected by passing currents through its X and Y wires.
- This current is strong enough to change the core's magnetic state to a "0".
- If the core was already in the "0" state, no change occurs. If the core was in the "1" state, it flips to "0".
- As the core changes from "1" to "0", it induces a small voltage pulse in the sense wire threaded through it. This pulse is detected and interpreted as a binary "1".
- After reading, if the core was originally "1", the system automatically writes "1" back to the core to restore its original state.
### 5. **Write Operation:**
- To write a value (either 0 or 1) into a specific core, currents are passed through the X and Y wires at the selected core’s location.
- If the value to be written is "1", a current strong enough to magnetize the core in a specific direction (clockwise) is applied.
- If the value is "0", the current is set to magnetize the core in the opposite direction (counterclockwise).
- No current is passed through the sense wire during a write operation.
### 6. **Coincidence Current:**
- To avoid altering other cores when writing or reading, the current passed through any one wire (X or Y) alone is insufficient to change the magnetic state of a core.
- Only when both X and Y wires are activated together (coincidence of current) does the combined magnetic field have enough strength to switch the selected core’s magnetic state.
### 7. **Non-Volatile Memory:**
Since the magnetic state of each core remains stable when the power is turned off, core memory is non-volatile. This was a crucial feature before modern semiconductor memory, as data could be retained even if the computer was shut down or restarted.
### Example of Core Selection in a Grid:
Let’s say we have a 4x4 matrix of cores, and we want to access the core at position (2,3). Here’s the step-by-step process:
- The current flows through the X-wire corresponding to row 2.
- Simultaneously, the current flows through the Y-wire corresponding to column 3.
- This combination selects the core at the intersection of row 2 and column 3.
- Depending on whether a read or write operation is desired, the system either senses the core’s state or alters it.
### Advantages:
- **Non-volatile:** Data is retained even without power.
- **Durable:** Magnetic core memory is highly reliable and resistant to radiation, which made it suitable for early space missions.
- **Random Access:** Any bit can be accessed independently and instantly.
### Disadvantages:
- **Slow:** Compared to modern memory technologies like DRAM, magnetic core memory has much slower read and write speeds.
- **Bulky and Expensive:** As technology advanced, smaller and more cost-effective memory solutions like semiconductor RAM replaced core memory.
### Summary:
Magnetic core memory operates by magnetizing small ferromagnetic cores in one of two directions to store binary data. It uses a matrix of cores, with each core being selected via X and Y wires. Reading a core’s state involves a destructive read, followed by restoring the original data if necessary. Despite being overtaken by semiconductor memory, core memory was fundamental in the development of early computer systems.