// Senior Computing

Logic Circuit
Design

Discover how computers think using just two states: ON and OFF. From simple switches to complex systems — build it, break it, understand it.

→ Open the Circuit Simulator

// Start here

Before You Begin

Watch this short video from Khan Academy and Code.org to understand what logic gates are and how they form the foundation of every computer ever built.

Circuits & Logic — Khan Academy × Code.org

A clear walkthrough of how binary signals, switches, and logic gates combine to perform real computations. Great starting point if you're brand new to this topic.

▶ Watch on Khan Academy

Logic Gates & Truth Tables

Every circuit is built from just a handful of gates. Click the input buttons on each card to see the gate respond in real time — the output light will turn on when conditions are met.


// Your mission

Build These Circuits

Use the Logic.ly simulator to complete each challenge below. Read the hints and logic expressions carefully before you start wiring.

01
Beginner

Simple Switch Light

Goal: A light that turns on when a switch is activated.

This is the simplest possible circuit — a direct connection from a toggle switch to a light bulb. No gates needed, but it sets the scene for understanding how inputs drive outputs.
How to build it

Add a Toggle Switch and a Light Bulb. Draw a wire from the switch output to the bulb input. Click the switch to test.

Output = Switch
→ Open Logic.ly
02
Intermediate

Home Alarm System

Goal: A buzzer that sounds when:

Condition A: A window is open AND nobody is home (both must be true)

Condition B: A door is forced open (always triggers, regardless of anything else)

Either condition alone is enough to trigger the alarm.
Logic breakdown

Use three inputs: WindowOpen, NobodyHome, DoorForced. An AND gate handles Condition A. An OR gate combines both conditions.

CondA = WindowOpen AND NobodyHome
Alarm = CondA OR DoorForced
→ Open Logic.ly
03
Advanced

Majority Vote Light

Goal: Three switches, but the light turns on only when at least 2 of the 3 switches are on.

Useful in real life for voting systems and fault-tolerant circuits. You'll need AND gates and an OR gate. Think about every combination of two switches that could be active at once.
Logic breakdown

The light should turn on when: A AND B, or A AND C, or B AND C are both on. Combine three AND gates and one OR gate (with 3 inputs).

Output = (A AND B) OR (A AND C) OR (B AND C)
→ Open Logic.ly
04
Challenge

Automatic Hex Counter

Goal: An automatic counter that cycles through hexadecimal values 0–F (0 to 15 in binary) using logic gates and clock inputs.

You'll need 4 bits of output to represent values 0–15. Use logic gates to control how each bit toggles based on the state of the bits before it. Connect your outputs to a 7-segment display to see the hex value.
Critical warning — clock timing

Each clock input triggers the moment you release your mouse button — not when you press it. Be deliberate about when and where you place each clock. Wire up your logic gates first, then add and connect your clocks one at a time, testing carefully as you go. Adding a clock to a partially-built circuit can cause it to fire at an unexpected moment and put your counter into a wrong state.

Bit 0 toggles every clock pulse
Bit 1 toggles when Bit 0 is 1
Bit 2 toggles when Bits 0 & 1 are 1
Bit 3 toggles when Bits 0, 1 & 2 are 1
→ Open Logic.ly