Software Architecture
Logic Gates Simulator
Explore fundamental digital logic gates (AND, OR, XOR) with interactive inputs and truth tables. Perfect for learning computer architecture basics.
Estimated time: 2-5 min
Difficulty level: Beginner
Privacy: Runs locally
5000ms CPU256MB RAM64KB in · 256KB outEducational, no sensitive data
Mode
Input A
Toggle between 0 and 1
Input B
Toggle between 0 and 1
Export
Download results as PDF, CSV, or JSON.
Run the tool to enable exports.
Understanding Logic Gates
Gate Types
- •AND gate outputs 1 only when all inputs are 1
- •OR gate outputs 1 when any input is 1
- •XOR gate outputs 1 when the inputs are different
Real-World Applications
- •CPUs are built from millions of gates performing calculations
- •Memory uses flip-flops built from gates to store bits
- •Encryption often uses XOR as a basic building block
- •Access control can use AND logic for multi factor checks
AND Truth Table
| A | B | Output |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
OR Truth Table
| A | B | Output |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
XOR Truth Table
| A | B | Output |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |