Boolean Circuits · NAND Game: Arithmetic and Switching

Lesson 4

Nikolai Chukhin · Alexander S. Kulikov

Problem. Synthesize a circuit of size \(2\) over \(\{\operatorname{NAND}_{2}, \operatorname{INV}_{1}, \operatorname{AND}_{2}, \operatorname{OR}_{2}, \operatorname{XOR}_{2}, \operatorname{FADD}_{3}\}\) computing the sum of two 2-bit numbers and a carry bit: \(2a_{1} + a_{0} + 2b_{1} + b_{0} + c_{\mathrm{in}}= 4c_{\mathrm{out}}+ 2s_{1} + s_{0}\).

The inputs are \(a_{1},a_{0},b_{1},b_{0},c_{\mathrm{in}}\); list the outputs as \(c_{\mathrm{out}},s_{1},s_{0}\).