AND
OR
MEM
The Logic Gate
How Binary States Become Decisions, Operations & Digital Circuits
Central Doctrine
A computer does not merely store 0s and 1s. It transforms them according to absolute rules. This realm explores the fundamental physics of computation: how electrical voltages become Boolean logic, how logic gates combine into combinational circuits to perform arithmetic, and how sequential circuits create memory to construct a functioning processor.
BIT →
BOOLEAN →
LOGIC OPERATION →
GATE →
CIRCUIT →
FUNCTION →
ARITHMETIC →
CONTROL →
COMPUTATION
The Internal Chambers
Ontology of Digital Logic
CHAMBER 01
The Idea of Logic
1
0
- Propositions and Statements
- True and False / Binary decision
- Logical conditions and Boolean values
- Decision making in digital systems
CHAMBER 02
Boolean Algebra
A AND B = Y
- Variables, Constants (0 and 1), Expressions
- Logical operators: AND, OR, NOT
- Basic Boolean identities
- Simplification of Boolean expressions
CHAMBER 03
The NOT Gate
A
Ā
- Inversion / Complement
- Single-input logic: 0 → 1, 1 → 0
- Symbol and Boolean expression
CHAMBER 04
The AND Gate
- Logical conjunction (Series-condition)
- Output is 1 ONLY if ALL inputs are 1
- Boolean multiplication (A · B)
CHAMBER 05
The OR Gate
- Logical disjunction (Parallel-condition)
- Output is 1 if ANY input is 1
- Boolean addition concept (A + B)
CHAMBER 06
Universal Gates
NAND
NOR
- NAND and NOR capabilities
- Can construct ANY other logic gate (NOT, AND, OR)
- Foundation of efficient IC manufacturing
CHAMBER 07
The NAND Gate
- NAND = NOT AND
- Output is 0 ONLY if ALL inputs are 1
- Universal-gate property implementation
CHAMBER 08
The NOR Gate
- NOR = NOT OR
- Output is 1 ONLY if ALL inputs are 0
- Universal-gate property implementation
CHAMBER 09
XOR & XNOR
- Exclusive OR (XOR): Inequality detector (1 if inputs differ)
- Exclusive NOR (XNOR): Equality detector (1 if inputs match)
- Crucial for binary arithmetic and parity
CHAMBER 10
Truth Tables
A
B
Y
0
0
0
0
1
1
1
0
1
- Enumerating all possible input combinations
- n inputs → 2ⁿ rows
- Deriving Boolean functions from tables
CHAMBER 11
Boolean Expressions
Y = (A AND B) OR C
- Variables, Constants, Operators
- Operator precedence and Parentheses
- Product terms and Sum terms
- Translating diagrams ↔ expressions
CHAMBER 12
Boolean Identities
A + 0 = A(Identity)
A · 0 = 0(Null)
A + A = A(Idempotent)
- Commutative, Associative, Distributive laws
- Absorption and Involution laws
- Simplification using identities
CHAMBER 13
De Morgan's Laws
= +
= ·
- NOT(A AND B) = (NOT A) OR (NOT B)
- NOT(A OR B) = (NOT A) AND (NOT B)
- Logical transformation and NAND/NOR relationships
CHAMBER 14
Logic Circuits
- Gate-level circuits and signal propagation
- Connecting and cascading gates
- Evaluating logic diagrams
CHAMBER 15
Combinational Circuits
f(x)
- Output depends ONLY on current input
- No stored state (No memory)
- Multiplexers, decoders, comparators, adders
CHAMBER 16
Half Adder
SUM (XOR)
CARRY (AND)
- Binary addition of two bits
- A XOR B → SUM
- A AND B → CARRY
- Cannot accept a carry from a previous stage
CHAMBER 17
Full Adder
FA
- Adds A, B, and Carry-in
- Outputs Sum and Carry-out
- Constructed from two half-adders + OR gate
- Cascaded for multi-bit addition (Ripple Carry)
CHAMBER 18
Subtractors
HS
vsFS
- Half/Full subtractors
- Difference and Borrow outputs
- Often implemented via Adders using Two's Complement
CHAMBER 19
Arithmetic Logic Unit
ALU
- Combining Adders, Subtractors, and Logic gates
- Operation selection (e.g., ADD, SUB, AND, OR)
- The core computational heart of the CPU
CHAMBER 20
Multiplexer (MUX)
- MANY INPUTS → SELECT → ONE OUTPUT
- Data routing based on selector inputs
- 2-to-1, 4-to-1, 8-to-1 MUX
CHAMBER 21
Demultiplexer (DEMUX)
- ONE INPUT → SELECT → ONE OF MANY OUTPUTS
- Output routing based on selection lines
CHAMBER 22
Decoders
- n inputs to 2ⁿ outputs
- Only one output is active (One-hot)
- Crucial for Memory Address decoding
CHAMBER 23
Encoders
- Multiple inputs to binary code output (2ⁿ-to-n)
- Priority encoders resolve simultaneous inputs
CHAMBER 24
Comparators
A > B0
A = B1
A < B0
- Digital magnitude comparison
- Equality, Greater than, Less than outputs
- Cascaded for multi-bit comparison
CHAMBER 25
Parity & XOR Logic
1
⊕0
⊕1
=0
- Even/Odd parity bit generation
- XOR chains for basic error detection
- Checking data integrity in transmission
CHAMBER 26
Sequential Logic
CLK
- Output depends on Current Input AND Previous State
- Introduces Memory via Feedback loops
- Synchronized by a Clock signal
CHAMBER 27
Latches
SQRQ'
- Basic storage element (Set / Reset)
- Asynchronous (level-sensitive)
- Maintains a stable state via cross-coupled gates
CHAMBER 28
Flip-Flops
- Clocked storage (Edge-triggered)
- D, SR, JK, T flip-flops
- State transitions occur only on clock edges
- True 1-bit synchronized memory
CHAMBER 29
Registers
→→→
- Groups of flip-flops for multi-bit storage
- Parallel load vs. Shift registers (Serial)
- The foundation of CPU temporary memory
CHAMBER 30
Counters
- Sequential binary counting (Up/Down)
- Asynchronous (Ripple) vs. Synchronous
- Modulo counters and frequency division
CHAMBER 31
Clock & Sync
- Clock pulse, frequency, and period
- Rising edge vs. Falling edge
- Setup time and Hold time
- Orchestrating sequential circuit timing
CHAMBER 32
Circuit Delay
DELAY
- Propagation delay and gate delay
- Critical path dictating max frequency
- Glitches and introduction to race conditions
CHAMBER 33
Circuit Technology
- Integrated Circuits (ICs) and VLSI
- Logic families: CMOS vs. TTL
- Power consumption and gate density
CHAMBER 34
Logic Levels
HIGH (1)
NOISE MARGIN
LOW (0)
- Voltage representations of 0 and 1
- Noise margins and thresholds
- Real hardware vs. Ideal Boolean models
CHAMBER 35
Circuit Design Process
PROBLEM↓
TRUTH TABLE↓
EQUATION↓
CIRCUIT
- Define inputs/outputs → Truth Table
- Derive Boolean expression → Simplify
- Draw Logic Diagram → Implement & Test
CHAMBER 36
Boolean Simplification
AB+AB'→A
- Algebraic reduction vs. Karnaugh Maps (K-maps)
- Sum of Products (SOP) / Product of Sums (POS)
- Minimizing gate count for optimization
CHAMBER 37
Minterms & Maxterms
m0
M0
m1
M1
- Minterm (AND term) / Maxterm (OR term)
- Canonical SOP and POS forms
- Direct translation from truth tables
CHAMBER 38
Implementation
CMOSvsTTL
- Transistor-level foundation of gates
- NAND/NOR physical implementation
- Fan-in, Fan-out, speed, and power limits
CHAMBER 39
Logic in Architecture
- Gates → Circuits → Arithmetic Units → ALU
- Flip-Flops → Registers → Processor State
- Hardware implementation of computation
CHAMBER 40
Everyday Logic
📱
⌚
🚗
📠
📸
🎮
- Logic circuits in calculators and clocks
- Embedded systems and industrial controllers
- The invisible foundation of modern appliances
CHAMBER 41
Key Comparisons
COMBINATIONAL vs SEQUENTIAL
- AND vs OR | XOR vs XNOR | NAND vs NOR
- Latch vs Flip-flop | Register vs Counter
- Multiplexer vs Decoder
CHAMBER 43
Key Vocabulary
- Boolean, Gate, Truth Table, De Morgan's
- Combinational, Sequential, Latch, Flip-flop
- Adder, MUX, Encoder, Decoder, Clock
- Minterm, Maxterm, K-map, Propagation Delay
CHAMBER 44
Problem Skills
A+
- Construct & read truth tables
- Evaluate & simplify Boolean expressions
- Design circuits from truth tables
- Analyze Adders, MUX, Decoders, and Flip-flops
FINAL CHAMBER
The Bridge to Algorithms
REALM 04 taught the hardware logic:
0/1 → GATES → CIRCUITS → ALU → MEMORY
↓
REALM 05 asks: How do we instruct it?
PROBLEM → STEPS → ALGORITHM
- We now have a machine that can calculate and control.
- How do we describe a complex solution as precise steps?