STEM · Computer Science · Foundational Concepts/Principles
SaveBoolean Logic and Digital Circuits
Significance: Foundation of digital computers. Boolean algebra: AND, OR, NOT operations on true/false. DeMorgan's laws, distributivity enable circuit simplification. Logic gates (NAND is universal—can build any circuit). Sequential circuits (flip-flops, registers) store state. Combination of logic and state enables computation. Every program ultimately executes as sequences of logic operations.
Questions to think through
- explain
Design circuit: Build full adder (adds three bits: A, B, carry-in; outputs sum and carry-out). Sum = A ⊕ B ⊕ Cin (XOR), Carry = AB + ACin + BCin. Draw circuit using gates. Explain how to chain full adders for multi-bit addition (carry propagates through chain). Why is carry propagation slow? How do carry-lookahead adders improve performance (compute carries in parallel)?
- apply
Prove universality: Show any Boolean function can be built from NAND gates. NAND(A,A) = NOT(A). NAND(NOT(A), NOT(B)) = NOT(NOT(A) AND NOT(B)) = A OR B (DeMorgan). Thus NAND implements NOT and OR, and NOT + OR is functionally complete (can build AND: NOT(NOT(A) OR NOT(B))). Why is hardware often built from NAND/NOR (simpler transistor implementation than AND/OR)?
