.PS log_init # Usual defs... qrt=dimen_/4; hlf=dimen_/2; dim=dimen_; # Basic RS Flip Flop: G1:NOR_gate line from G1.In1 left_ 6*L_unit; R:Here line from G1.Out right_ 6*L_unit; " $Q$" ljust_ line from G1.In2 left_ 3*L_unit then down_ 3*L_unit J1:Here move to G1.center then down_ 12*L_unit; right_ G2:NOR_gate with .center at Here line from G2.In2 left_ 6*L_unit; S:Here line from G2.Out right_ 6*L_unit; " $\overline{Q}$" ljust_ line from G2.In1 left 3*L_unit then up_ 3*L_unit J2:Here move to G1.Out then right_ 3*L_unit line from J2 to (Here,J1) then to Here; dot move to G2.Out then right_ 3*L_unit line from J1 to (Here,J2) then to Here; dot # Clock circuit... G3:AND_gate with .Out at R G4:AND_gate with .Out at S line from G3.In2 left_ 3*L_unit line to (Here,G4.In1) then to G4.In1 move to G3.In2+(-3*L_unit,(G4.In1.y-G3.In2.y)/2); dot; line left_ 4*L_unit; "Clock " ljust_ line from G3.In1 left_ 7*L_unit; "$R$ " ljust_ line from G4.In2 left_ 7*L_unit; "$S$ " ljust_ move to G2.center then down_ 4*L_unit; "\tiny ClockedRS" ljust_ .PE