Basic Switch and Light Demo
Simple switch-to-light connections demonstrating basic digital input and output. Perfect starting point for digital circuit exploration.
Lo que aprenderás
- 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.
Cómo funciona
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.
Tabla de verdad
Just two rows — one input, one output, identity function.
| Entradas | Salida | |
|---|---|---|
| Switch | Light | |
| 0 | 0 | Switch off → light off |
| 1 | 1 | Switch on → light on |
Expresión booleana
The output equals the input — identity function. No logic, just a wire.
Pruébalo paso a paso
Configura las entradas en la simulación de arriba, lee qué debería suceder y verifícalo.
- 1Switch = 0Esperado:
Light = 0Lo que verás: Switch off — light dark. The starting state of any unpowered circuit. - 2Switch = 1Esperado:
Light = 1Lo que verás: Switch on — light on. The input signal flows directly to the output without modification.
Componentes utilizados
Aplicaciones en el mundo real
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.
Preguntas frecuentes
Why is this called a circuit if there are no gates?
A circuit is any connected collection of components, with or without logic. A switch + light + wire is a complete circuit, even if the only function is identity. More elaborate circuits add gates between the input and output.
Could this be useful in a real product?
Yes — every LED indicator on a control panel is essentially this circuit (with a current-limiting resistor in the physical version). Status lights for power, fault indicators, activity LEDs all work this way.
What's the difference between this and a buffer?
A buffer also implements Y = A but provides drive-strength amplification. A wire passes the signal at the source's drive strength; a buffer regenerates a clean, full-strength signal. For long wires or high fan-out, you need a buffer; for short signal paths a wire is fine.
How is this different from analog electronics?
In digital, the signal is 0 or 1 — the wire transmits one of two discrete states. In analog, the wire carries any voltage in a continuous range. Digital simulators abstract over the analog physics; here, switch on means "input voltage above threshold," but you only see 0 or 1.
Why include this in a simulator with hundreds of complex circuits?
It's the entry point. Anyone new to digital logic should start here, see how the simulator represents I/O, and then add gates from this base. Every more-complex circuit decomposes back to switches and lights at the I/O level.