Boolean Circuits · NAND Game: Memory (Optional)
Lesson 8
You are now able to store a \(16\)-bit word in a register. Additional memory capacity can be obtained simply by stacking such registers. However, since a processor operates on one word at a time, it is necessary to provide a mechanism for selecting and modifying individual words within a larger memory bank. This objective is achieved through the use of memory addresses. Each word in memory is assigned a numerical address, thereby enabling the retrieval or overwriting of a word by specifying its corresponding number. In this task, you are required to employ two registers and to address them using a single-bit address signal.
Problem. Synthesize a circuit of size \(4\) over \[\{\operatorname{NAND}_{2}, \operatorname{INV}_{1}, \operatorname{AND}_{2}, \operatorname{REGISTER}_{16}, \operatorname{SWITCH}_{1}, \operatorname{SELECT}_{16}\}\] computing the two-cell 16-bit memory function \[\operatorname{RAM}_{16}(st,x,ad,cl)=q.\] Both cells start at \(0\). The address bit \(\texttt{ad}\) selects the cell to read; if \(\texttt{st}\)=1, \(\texttt{x}\) is also written to that cell using the same clock protocol as a register. Assume the inputs do not change while \(\texttt{cl}\)=1.