KembaraXtra-Case Law-Logic with Mechanical Switches
1. Representing Digital Circuits
• Digital Representation: In digital circuits, high and low voltages represent 1 and 0, respectively.
2. Mechanical Switches
• Definition: A mechanical switch is a circuit element that can be either on or off, acting as a simple digital component.
• States:
- On (Closed): Acts like a copper wire, allowing current to flow freely.
- Off (Open): Acts like an open circuit, preventing current flow.
• Symbol: The switch symbol represents an open circuit when off and a closed circuit when on.
• Real-World Examples: Switches come in various forms, including pushbuttons (momentary switches) that are closed only when pressed.
3. Building Logic Gates with Switches
• Goal: To construct digital circuits where input and output voltages are predetermined high or low values (1 or 0).
• Voltage Levels:
- Vout ≈ 5V: Logical 1
- Vout ≈ 0V: Logical 0
4. AND Gate Implementation
• Truth Table:
| A |
B |
Output |
| 0 |
0 |
0 |
| 0 |
1 |
0 |
| 1 |
0 |
0 |
| 1 |
1 |
1 |
•
Circuit Design: Switches A and B are connected in series.
•
Functionality:
- If either switch A or B is off (0), no current flows, and Vout = 0V (logical 0).
- If both switches A and B are on (1), current flows, and Vout = 5V (logical 1).
5. OR Gate Implementation
• Truth Table:
| A |
B |
Output |
| 0 |
0 |
0 |
| 0 |
1 |
1 |
| 1 |
0 |
1 |
| 1 |
1 |
1 |
•
Circuit Design: Switches A and B are connected in parallel.
•
Functionality:
- If both switches A and B are off (0), no current flows, and Vout = 0V (logical 0).
- If either switch A or B is on (1), current flows, and Vout = 5V (logical 1).