I'm trying to make a MS JK Flip Flop with Preset and Clear using only transistors(BC547B) and resistors in LTSpiceXVII. I made four 3-input NAND gates for the master flip flop and four 2-input ones for the slave. When I ran the simulation and measured the voltages at the outputs they were not what I expected. Q toggles on both edges of the clock pulse and Q` just varies slightly. I'm not very well versed in electronics so could anybody tell me what I'm doing wrong.
Logic Diagram Schematic Clock Pulse Voltage at Q Voltage at Q'