Basic Switch and Light Demo
Simple switch-to-light connections demonstrating basic digital input and output. Perfect starting point for digital circuit exploration.
What You'll Learn
- Identify the input switch and output light as digital I/O primitives.
- Trace a single signal from source to sink.
- Recognize that 'no logic' is still a valid circuit — just a wire.
- Connect this to physical buttons and LEDs in microcontroller projects.
- Build the mental model that more-complex circuits add gates to this base.
How It Works
The simplest circuit you can build: an input switch wired directly to an output light. Flipping the switch turns the light on; releasing turns it off. No gates, no logic — just a direct wire.
Why include this in a logic simulator? Because it teaches the I/O abstraction: switches produce digital values (0 or 1), lights consume them. Every more-elaborate circuit ultimately reduces to this — sources of truth flowing through some logic to drive observable outputs.
The schematic introduces three primitives: 1. Input switch: A user-controlled toggle producing 0 or 1. 2. Wire: A logical connection that transmits the same value end-to-end. 3. Output light: A visualizer that lights up when its input is 1.
From this base, every other DigiSim circuit adds gates between the switch and the light to compute *something* about the input(s). Mastering this template means you can read schematics: where signals enter, where they exit, and what flows where.
Truth Table
Just two rows — one input, one output, identity function.
| Inputs | Output | |
|---|---|---|
| Switch | Light | |
| 0 | 0 | Switch off → light off |
| 1 | 1 | Switch on → light on |
Boolean Expression
The output equals the input — identity function. No logic, just a wire.
Try It Step-by-Step
Set the inputs in the embed above, then read what should happen and confirm.
- 1Switch = 0Expected:
Light = 0What you'll see: Switch off — light dark. The starting state of any unpowered circuit. - 2Switch = 1Expected:
Light = 1What you'll see: Switch on — light on. The input signal flows directly to the output without modification.
Components Used
Real-World Applications
Pull-up / pull-down resistor inputs. Microcontrollers reading button presses use the same I/O abstraction — a button is the switch, an LED is the light, and the GPIO line carries the digital signal.
LED indicators. Power lights, status lights, fault lights — any LED on a control panel is the simplest output light driven by a logic signal.
Test fixtures. Bench testing a digital signal often involves driving it with a switch and observing it with an LED to confirm the path is intact.
Educational starting point. Every introductory digital electronics class begins with switch + LED to establish the I/O model before introducing logic gates.