Electronics
Binary number system and logic gates — the digital foundation of all modern computing.
A. Binary Number System
Binary Fundamentals
- Binary uses only two digits: 0 and 1 (Base-2 system)
- Decimal system is Base-10 (digits 0–9)
- Each binary digit is called a BIT
- 8 bits = 1 Byte
Binary → Decimal
Multiply each bit by 2^(position) and sum
Example: 1011₂ = (1×2³)+(0×2²)+(1×2¹)+(1×2⁰) = 8+0+2+1 = 11₁₀
Decimal → Binary
Repeatedly divide by 2, read remainders bottom-up
Example: 13 ÷ 2 = 6 rem 1 | 6÷2 = 3 rem 0 | 3÷2 = 1 rem 1 | 1÷2 = 0 rem 1 → 1101₂
Live Binary Converter
Type in either box — converts instantly
⇄
| Position | 2⁷ | 2⁶ | 2⁵ | 2⁴ | 2³ | 2² | 2¹ | 2⁰ |
|---|---|---|---|---|---|---|---|---|
| Value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
B. Logic Gates
All Logic Gates Summary
| Gate | Symbol | Operation | Output Rule | A=1, B=1? |
|---|---|---|---|---|
| AND | A·B | Logical AND | Output 1 only if ALL inputs are 1 | 1 |
| OR | A+B | Logical OR | Output 1 if ANY input is 1 | 1 |
| NOT | Ā | Logical NOT | Output is opposite of input | 0 |
| NAND | NOT AND | NOT of AND | Output 0 only if ALL inputs are 1 | 0 |
| NOR | NOT OR | NOT of OR | Output 1 only if ALL inputs are 0 | 0 |
| XOR | A⊕B | Exclusive OR | Output 1 if inputs are DIFFERENT | 0 |
| XNOR | NOT XOR | Exclusive NOR | Output 1 if inputs are SAME | 1 |
⚡ MCQ Tip
AND = all inputs must be 1. OR = any input is 1. NOT = inverts.
NAND = opposite of AND (universal gate). NOR = opposite of OR.
XOR = different inputs give 1. Binary: 1011₂ = 11₁₀.
C. Complete Truth Tables
Two-Input Gate Truth Tables
| A | B | AND (A·B) | OR (A+B) | NAND | NOR | XOR (A⊕B) |
|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 | 0 | 0 | 0 |
| Input (A) | NOT Output (Ā) |
|---|---|
| 0 | 1 |
| 1 | 0 |
Live Animation: Logic Gate Signal Simulator
Interactive Gate Simulator
Toggle inputs A and B — all gate outputs update live with animated signals
Signal Pulse Animation — AND Gate
Animated pulses flow from inputs through the gate to the LED output
Quick MCQ Revision
| Gate / Fact | Rule |
|---|---|
| AND | Output = 1 only if ALL inputs = 1 |
| OR | Output = 1 if ANY input = 1 |
| NOT | Output = opposite of input |
| NAND | Opposite of AND — output = 0 only if ALL inputs = 1 |
| NOR | Opposite of OR — output = 1 only if ALL inputs = 0 |
| XOR | Output = 1 if inputs are DIFFERENT |
| XNOR | Output = 1 if inputs are SAME |
| 1 bit | Binary digit (0 or 1) |
| 1 Byte | 8 bits |
| 1011₂ | = 8+0+2+1 = 11₁₀ |
| 13₁₀ | = 1101₂ |
PreviousNuclear Physics
Next—