I have an issue with the outputs from a half-adder. I am using three CD4007UBE chips and the outputs always stay at zero. I simulated using a model for the CD4007, and it worked without any issues. However, the actual circuit's outputs remain zero for every input. The input signals are A and B. Each is connected to a separate function generator with a 5V square wave (5V high, 0V low). I have adjusted the frequencies and no matter what, the outputs are always zero. I noticed if I disconnect the wire connecting PIN 1 from x1 and PIN 5 from x2, the output C works. I heard from some that it's not possible to use only three chips for this, since I have four NAND gates and an inverter (18 total transistors). I don't see why it would not work with three, if this is the case. The circuit diagram is attached, as well as the model I'm using for the CD4007UB. Any help is greatly appreciated. EDIT: I modified the circuit and used four chips instead of three. Now, the C output is working correctly, but S is not. The S output is inverting whatever C is (so they're opposite) for some reason. Schematic is attached.