Basic Switch and Light Demo
Simple switch-to-light connections demonstrating basic digital input and output. Perfect starting point for digital circuit exploration.
배울 내용
- 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.
작동 원리
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.
진리표
Just two rows — one input, one output, identity function.
| 입력 | 출력 | |
|---|---|---|
| Switch | Light | |
| 0 | 0 | Switch off → light off |
| 1 | 1 | Switch on → light on |
불 대수식
The output equals the input — identity function. No logic, just a wire.
단계별로 시도해 보세요
위 임베드에서 입력을 설정한 후, 예상 결과를 읽고 직접 확인하세요.
- 1Switch = 0예상:
Light = 0관찰 포인트: Switch off — light dark. The starting state of any unpowered circuit. - 2Switch = 1예상:
Light = 1관찰 포인트: Switch on — light on. The input signal flows directly to the output without modification.
사용된 구성 요소
실제 응용 사례
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.