CS-150 Gates and Circuits
Basic Concepts
- Gate: device performing a basic logical operation on electrical signals
- Circuit: interconnection of gates to realize complex functions
- Two circuit categories
- Combinational: output depends only on current inputs
- Sequential: output depends on inputs + internal state
Gate Types & Representations
- Six common electronic gates: NOT, AND, OR, XOR, NAND, NOR
- Three equivalent descriptions
- Boolean expression (e.g., , )
- Truth table (lists all input–output combinations)
- Logic symbol (graphical)
• Key truth-table summaries
- NOT:
- AND: output only when
- OR: output when any input is
- XOR: output when inputs differ
- NAND / NOR: inverted AND / OR
Transistors & Gate Construction
- Transistor (NPN) behaves as voltage-controlled switch
- Terminals: collector, base, emitter
- Base low ⇒ no conduction; base high ⇒ conduction
- Gate implementations
- NOT: single transistor; base high pulls output low, base low lets pull high
- AND: two transistors in series; both bases high needed for high output
Circuit Types & Descriptions
- Boolean expression, truth table, and logic diagram apply to any circuit
- Example: implemented with two ANDs + OR
- Equivalent forms proven via Boolean algebra, e.g.,
Boolean Algebra Essentials
- Distributive, associative, commutative, De Morgan’s
- Used to minimize gate count and prove circuit equivalence
Adders
- Half-adder (HA)
- Inputs:
- Sum:
- Carry:
- Full-adder (FA)
- Inputs:
- Sum:
- Carry-out:
- 8-bit ripple-carry adder ≈ inputs, outputs, ~ gates
Multiplexers (MUX)
- Selects one of many data inputs to a single output using control lines
- For inputs ⇒ select lines (because )
Sequential Memory: S-R Latch
- Stores one bit (outputs with )
- Inputs active-low
- low ⇒ set ,
- low ⇒ reset ,
- Illegal to drive both low simultaneously
Integrated Circuits
- Chip: silicon die containing many gates; packaged with pins
- CPU: complex IC central to system; communicates through its pin array