DIGITAL LOGIC 101
The Ultimate Guide to Logic Gates & Circuits
What's the Big Deal?
Welcome, future tech wizard! You're about to learn the secret language of computers. Everything your phone, laptop, or gaming console does—from browsing the web to running a game—boils down to incredibly simple decisions made billions of times per second. These decisions are handled by tiny electronic switches called logic gates. Master them, and you'll understand the very foundation of all digital technology. Let's dive in!
The Core Concepts: Binary
Computers don't understand words or numbers like we do. They only understand two states: ON and OFF. We represent these states using a system called binary.
1represents ON (or HIGH, TRUE, POWER ON)0represents OFF (or LOW, FALSE, POWER OFF)
Logic gates are the components that take these binary inputs (0s and 1s) and produce a single binary output based on a specific rule.
ON / TRUE
OFF / FALSE
NOT Gate (The Inverter)
The NOT gate is the simplest of all. It takes one input and flips it. If you give it a 1, it outputs a 0. If you give it a 0, it outputs a 1. It's the rebel of the circuit world.
Truth Table
| Input A | Output |
|---|---|
0 | 1 |
1 | 0 |
Interactive Simulation
AND Gate (The All-or-Nothing)
The AND gate is a strict one. It has two or more inputs and will only output a 1 if ALL of its inputs are 1. If even one input is 0, the output is 0.
Truth Table
| Input A | Input B | Output |
|---|---|---|
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
Interactive Simulation
OR Gate (The Easy-Going One)
The OR gate is much more relaxed. It will output a 1 if ANY of its inputs are 1. It only outputs 0 if all inputs are 0.
Truth Table
| Input A | Input B | Output |
|---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
Interactive Simulation
XOR Gate (The "One or the Other")
XOR stands for "Exclusive OR". It only outputs 1 if the inputs are DIFFERENT. If both inputs are the same (both 0 or both 1), it outputs 0.
Truth Table
| Input A | Input B | Output |
|---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |