Math
Logic gates
Operate Boolean gates, half and full adders, a four-bit carry chain and an edge-triggered memory bit.

Try this
Gold wires carry 1, dark wires carry 0. Click input cells or change integer inputs. Single-bit circuits use the low bit. The D flip-flop captures D only on the rising clock edge; changing D alone does not change Q.
Equations used in the module
Equations Half adder: S = A XOR B; C = A AND B Full adder: S = A XOR B XOR Cin Cout = (A AND B) OR (Cin AND (A XOR B)) D flip-flop: Qnext = D on a rising clock edge; otherwise Qnext = Q

