Boolean Circuits · NAND Game: Processor (Optional)

Lesson 3

Nikolai Chukhin · Alexander S. Kulikov

The next component selects between two control buses.

Problem. Synthesize a circuit of size \(5\) over \(\{\operatorname{NAND}_{2}, \operatorname{SELECT}, \operatorname{SPLIT}, \operatorname{ISNEG}\}\) computing the control-selector function: \[\begin{aligned}\operatorname{CONTROLSELECTOR}(&s,R_1,a_1,d_1,\texttt{*a}_1,j_1,\\ &R_0,a_0,d_0,\texttt{*a}_0,j_0)=(R,a,d,\texttt{*a},j)=B_s,\end{aligned}\] where \(B_{i}=(R_{i},a_{i},d_{i},\texttt{*a}_{i},j_{i})\).

The input-label line is \(\texttt{s a1 d1 *a1 j1 a0 d0 *a0 j0}\); the 16-bit labels \(\texttt{R1 R0}\) are predefined. Output \(\texttt{R a d *a j}\), choosing all five values with \(\texttt{s}\) from bus \(1\) or bus \(0\); \(\texttt{R}\) is 16-bit and the other values are bits. The function \(\operatorname{SELECT}\) is used at both widths: write \(\texttt{SELECT}\) for one-bit data and \(\texttt{SELECT16}\) for 16-bit data.