Learn the reasoning

Digital logic worked examples

Short, original examples to help you connect the mathematics to the simulators. Try solving each one yourself before reading the explanation.

1. Convert a binary number to decimal

101101₂ = 45₁₀

Each binary position represents a power of two, starting from 2⁰ on the right. The bits that are 1 contribute 2⁵ + 2³ + 2² + 2⁰ = 32 + 8 + 4 + 1 = 45.

Try the base converter →

2. Represent −5 using eight-bit two's complement

00000101 → 11111010 → 11111011

Write +5 as 00000101. Invert all eight bits to obtain 11111010, then add 1. The result 11111011 is −5 in eight-bit two's-complement representation. The width matters because the leftmost bit carries the negative weight.

Explore signed conversion →

3. Simplify a Boolean expression

AB + AB′ = A(B + B′) = A

First factor out A using the distributive law. Since B + B′ = 1 by the complement law, the expression becomes A · 1. The identity law leaves A. Each equality preserves the same truth table.

Check the simplification →

4. Find a two-variable K-map result

F(A,B) = Σm(1,3) = B

With A as the most significant variable, minterms 1 and 3 correspond to inputs 01 and 11. Both have B = 1 regardless of A. Group these adjacent ones on the K-map to eliminate A, leaving B.

Open the K-map tool →

5. Understand a JK flip-flop

J = 1, K = 0 ⇒ Q(next) = 1

At the selected active clock edge, a JK flip-flop with J = 1 and K = 0 sets its state to 1. With J = K = 1, it instead toggles; with J = K = 0, it holds its previous state. Be sure to distinguish an edge-triggered flip-flop from a level-sensitive latch.

Practise timing diagrams →

6. Build a learning sequence

Begin with number representation, move to Boolean expressions and truth tables, then create gate circuits. After understanding combinational logic, explore storage elements and waveform timing. DLDForge provides separate tools for each stage so you can isolate one concept at a time.

Simulators can help you check your reasoning, but a useful habit is to write down your expected result before pressing Generate or Run.