From "Code"
🎧 Listen to Summary
Free 10-min PreviewArchitecture and Scaling of Random Access Memory (RAM)
Key Insight
Constructing a memory system capable of storing multiple individual 1-bit values, which can be separately written and read through single data input and output lines, requires specialized circuits. For output, an 8-to-1 Data Selector is used; it routes one of its eight 'Data' inputs to a single 'Output' based on three 'Select' inputs, which can represent eight values from 000 to 111 (e.g., 101 selects D5). This selector is built from three inverters, eight 4-input AND gates, and an 8-input OR gate. Conversely, for input, a 3-to-8 Decoder is employed, which takes a 'Data Input' and three 'Select' inputs, activating only one of its eight 'Outputs' based on the 'Select' combination (e.g., 101 routes the 'Data Input' to O5, with all other outputs remaining 0).
When these components are integrated with 1-bit latches, a read/write memory system emerges, commonly known as Random Access Memory (RAM). The 'Select' signals for both the Decoder and Selector are collectively termed the 'Address', which uniquely identifies one of the individual latches for either writing new data or reading stored data. This 'random access' capability distinguishes it from sequential memory, as any address can be accessed directly without needing to traverse preceding ones. A RAM configuration is termed a 'RAM array', with its size often abbreviated, such as '8 x 1' for eight 1-bit values. The total number of values a RAM array can store is determined by the formula 2^(Number of Address inputs), meaning four address inputs allow storage of 16 values.
RAM arrays can be scaled significantly. For example, a 1024-byte RAM array (1 kilobyte or 1 KB) features ten 'Address' inputs (2^10 = 1024), along with eight 'Data' inputs and eight 'Data' outputs, allowing storage of 1024 8-bit values. This nomenclature, where a kilobyte is 1024 bytes instead of 1000, stems from the incompatibility of powers of 2 (binary) and powers of 10 (metric), with 1024 (2^10) being a close approximation of 1000 (10^3). Similarly, 1024 kilobytes form a megabyte (MB), 1024 megabytes a gigabyte (GB), and 1024 gigabytes a terabyte (TB). It is crucial to note that RAM is 'volatile memory', meaning it requires a continuous power supply to retain its stored contents; upon power loss, all data is immediately lost.
📚 Continue Your Learning Journey — No Payment Required
Access the complete Code summary with audio narration, key takeaways, and actionable insights from Charles Petzold.