Boolean Circuits · NAND Game: Arithmetic and Switching

Lesson 6

Nikolai Chukhin · Alexander S. Kulikov

Problem. Synthesize a circuit of size \(3\) over \(\{\operatorname{NAND}_{2}, \operatorname{INV}_{1}, \operatorname{ZERO}_{1}, \operatorname{ONE}_{1}, \operatorname{OR}_{2}, \operatorname{INC}_{8}, \operatorname{ADD}_{8}, \operatorname{INV}_{8}\}\) computing \(8\)-bit subtraction: \[\operatorname{SUB}_{8}(a_{7},\dotsc,a_{0},b_{7},\dotsc,b_{0})=(y_{7},\dotsc,y_{0}),\] where \(y=a-b \pmod{2^8}\).