MODULE 14
Logic Circuits
Standard combinational circuit building blocks.
Understanding Logic Circuits
Logic circuits are physical or simulated networks of logic gates (AND, OR, NOT, XOR, NAND, NOR) that implement boolean functions in hardware. Every digital device, from a calculator to a CPU, is built from these fundamental building blocks wired together. This module lets you evaluate a circuit's output for given inputs and see how gates combine to produce more complex behavior.
Key Definitions & Formulas
- AND gate: outputs 1 only when all inputs are 1.
- OR gate: outputs 1 when at least one input is 1.
- NOT gate (inverter): flips a single input.
- XOR gate: outputs 1 when inputs differ (exactly one is 1).
- NAND / NOR gates: AND/OR followed by a NOT; NAND alone is "functionally complete" — any boolean function can be built from NAND gates only.
Worked Example
A half-adder circuit (adds two single bits) uses an XOR gate for the sum bit and an AND gate for the carry bit: inputs 1 and 1 give XOR = 0 (sum) and AND = 1 (carry), correctly representing 1 + 1 = 10 in binary.
Where This Is Used
- CPU arithmetic logic units (ALUs) built from chains of adders like the example above.
- Memory and storage circuits (flip-flops built from NAND/NOR gates).
- Embedded systems and microcontroller design.
- FPGA (field-programmable gate array) programming.