Skip to content
/ Logic gates

Logic gates and SR latch

Place logic inputs (0 or 1), AND, OR, NOT, NAND, NOR, XOR gates and an SR latch, connect an LED to the output: click the inputs to check the truth table.

Circuit and source

Circuit diagram

Transient response

Click on a graph (curves or oscilloscope) to place cursors A and B, then drag them to move them.

Calculations

Export:

Sinusoidal steady state: Bode plot

How to do it

  1. Click the 0/1 inputs to toggle them: the LED lights when the output is 1.
  2. Click a gate to see its truth table.
  3. Replace the gate with another from the palette (logic row).
  4. Try the SR latch: pressing S lights the LED, which stays on until R is pressed (memory).

Tips

  • 0 / 5 V logic: an input is 1 above 2.5 V; an unconnected input is 0.
  • NAND and NOR gates are universal: all others can be built from them.
  • Export the diagram as circuitikz (European standard symbols) for a lesson.

Frequently asked questions

What is the difference between OR and XOR?

OR gives 1 if at least one input is 1; XOR gives 1 if the inputs differ (and 0 when both are 1).

What is an SR latch for?

It is a one-bit memory: S (set) sets the output to 1, R (reset) clears it to 0, and otherwise it keeps its state.

Is my data uploaded?

No, the simulation runs in your browser; the share link contains the circuit.