Learn digital electronics
Each guide explains one classic circuit, shows its truth table and Boolean expressions, and opens a working copy in the LogicLab simulator.
Basics
Arithmetic
- Half adderA half adder is a combinational circuit that adds two single bits and produces a sum bit and a carry bit.
- Full adderA full adder adds three bits (A, B and a carry-in) and outputs a sum bit and a carry-out.
- 4-bit ripple-carry adderA ripple-carry adder adds two multi-bit binary numbers by chaining one full adder per bit.
- 1-bit comparatorA digital comparator tells you whether one binary number is less than, equal to, or greater than another.
Combinational
- 4:1 multiplexerA 4:1 multiplexer routes one of four input bits to a single output, chosen by two select bits.
- 1:4 demultiplexerA 1:4 demultiplexer takes one input bit and routes it to one of four outputs, chosen by two select bits.
- 2:4 decoder with enableA 2-to-4 decoder converts a 2-bit binary input into a one-hot output: exactly one of four lines is 1.
- 4:2 priority encoderA priority encoder converts the position of the highest active input line into a binary number.
- BCD to 7-segment decoderA BCD to 7-segment decoder turns a 4-bit binary-coded decimal digit into the seven signals that drive a…
Latches & flip-flops
- SR latch (NOR)An SR latch is the simplest memory circuit: two cross-coupled gates that store one bit.
- Gated D latchA gated D latch stores one bit: while its enable input is high the output follows the data input, and when…
- Master-slave D flip-flopA master-slave D flip-flop is an edge-triggered memory element built from two gated D latches.
- Master-slave JK flip-flopA JK flip-flop is a clocked memory element that can hold, set, reset or toggle its output.