module sr_latch_nor ( input S, input R, output Q, output Qn ); assign Q = ~(R | Qn); assign Qn = ~((~R & S) | Q); endmodule