Boolean Circuits · NAND Game: Memory (Optional)

Lesson 5

Nikolai Chukhin · Alexander S. Kulikov

You are now able to properly store a single bit of data! In this task, you are required to combine two data flip-flops (DFFs) in order to store and retrieve two bits of data within a single operation. Ultimately, the objective is to store and retrieve \(16\)-bit words simultaneously; however, once the mechanism for storing two bits has been established, extending the construction to larger bit-widths becomes straightforward.

Problem. Synthesize a circuit of size \(2\) over \(\{\operatorname{DFF}, \operatorname{NAND}_{2}, \operatorname{INV}_{1}, \operatorname{AND}_{2}, \operatorname{OR}_{2}, \operatorname{XOR}_{2}\}\) computing a 2-bit register: \(\operatorname{REGISTER}(st,d,cl)=q\), where \(d=(d_{1},d_{0})\) and \(q=(q_{1},q_{0})\).

The input-label line is \(\texttt{st d1 d0 cl}\); list the outputs as \(\texttt{q1 q0}\). Initially, the clock is set to zero. The register has the same clock behavior as a DFF, but stores two bits and outputs the stored high bit before the low bit.