Digital Basics
- Computers use digital electronics with only two voltage levels: high (1 / true / asserted) and low (0 / false / deasserted).
- 0 and 1 are complements/inverses.
- Binary numbers naturally match digital electronics.
- Pitfall: sampling a signal while it’s transitioning between high/low can cause errors.
Combinational vs. Sequential Logic
- Combinational logic: no memory; output depends only on current inputs.
- Sequential logic: has memory (state); output depends on inputs + stored state.
Truth Tables
- Fully describe any combinational logic function by listing outputs for every possible input combination.
- For n inputs → 2ⁿ rows.
- Example:
- D = true if at least one input true.
- E = true if exactly two inputs true.
- F = true only if all three inputs true.
- Eight-row truth table (for A, B, C) lists outputs D, E, F.
- Often only the “1” (true) output rows are listed for shorthand.
Boolean Algebra
- Variables take only 0 or 1.
- Operators:
- OR (+): 1 if either input is 1.
- AND (·): 1 only if both inputs are 1.
- NOT (overbar or ‘): inverts input (0 becomes 1 and 1 becomes 0)
- Useful laws (to simplify equations):
- Identity:
- Zero/One:
- Inverse:
- Commutative:
- Associative:
- (A + B) + C = A + (B + C)
- Distributive:
- DeMorgan’s laws (important):
- (A·B)' = A' + B'
- (A + B)' = A'·B'
Logic Equations Example (D, E, F):
- D = A + B + C (OR of inputs)