Week 2-2: Fundamental Logic Gates

Course Overview and Learning Outcomes
  • Course Learning Outcomes (CLOs):

    • CLO1: Describe analogue and digital signal characteristics and perform timing analysis in circuits containing switches.

    • CLO2: Understand number systems and convert numbers between systems.

    • CLO3: Describe functions of combinational and sequential components; construct truth tables and Boolean equations.

    • CLO5: Use manufacturers' data sheets to design functional digital circuits.

    • CLO6: Formulate Boolean equations and verify circuit functions using simulation models.

    • CLO7: Validate digital logic circuits via breadboard wiring and Proteus simulation.

    • CLO8: Articulate laboratory observations and conclusions using standard digital systems terminology.

Fundamentals and Roles of Logic Gates in Digital Systems
  • Core Definition:

    • Elementary building blocks of digital circuits and computational systems used to execute calculations, automate decision-making, and store binary information.

  • Real-World Implementations:

    • Computers & Smartphones: Processor execution units, memory controllers, and peripheral input interfaces.

    • Digital Watches: Real-time clock tracking, user alarms, and multi-segment displays.

    • Automation Systems: Mission-critical sequencing and safety monitoring in machinery, traffic lights, and domestic appliances.

  • Primary Gate Types: AND, OR, NOT, NAND, and NOR.

The AND Gate
  • Functional Definition: Produces a HIGH (11) output only when all inputs are HIGH (11); otherwise produces a LOW (00) output.

  • Graphic Symbols: Distinctive flat-input/rounded-output shape, and IEEE/IEC rectangular box with qualifying ampersand (&\&).


Distinctive shape and rectangular outline symbols for the AND gate
  • Boolean Algebraic Expression:

    • X=A⋅BX = A \cdot B or X=ABX = AB (Logical multiplication).

  • Truth Table Verification:

    • Input A=0A = 0, Input B=0→X=0B = 0 \rightarrow X = 0

    • Input A=0A = 0, Input B=1→X=0B = 1 \rightarrow X = 0

    • Input A=1A = 1, Input B=0→X=0B = 0 \rightarrow X = 0

    • Input A=1A = 1, Input B=1→X=1B = 1 \rightarrow X = 1


Truth table for a 2-input AND gate
  • Dynamic Timing Analysis:

    • Output X=1X = 1 exclusively when inputs AA and BB are simultaneously HIGH (11). If either input transitions LOW (00), the output immediately falls to LOW (00).


Timing diagram of a 2-input AND gate across intervals t1 through t5
  • Application (Security System):

    • Intrusion alarm triggers only when a perimeter door contact sensor (A=1A = 1) AND an infrared motion detector (B=1B = 1) are concurrently activated, preventing false alarms.

The OR Gate
  • Functional Definition: Produces a HIGH (11) output if at least one input is HIGH (11); produces a LOW (00) output only when all inputs are concurrently LOW (00).

  • Graphic Symbols: Distinctive concave-input/pointed-output shape, and IEEE/IEC rectangular box with qualifying designation ≥1\ge 1.


Distinctive shape and rectangular outline symbols for the OR gate
  • Boolean Algebraic Expression:

    • X=A+BX = A + B (Logical addition).

  • Truth Table Verification:

    • Input A=0A = 0, Input B=0→X=0B = 0 \rightarrow X = 0

    • Input A=0A = 0, Input B=1→X=1B = 1 \rightarrow X = 1

    • Input A=1A = 1, Input B=0→X=1B = 0 \rightarrow X = 1

    • Input A=1A = 1, Input B=1→X=1B = 1 \rightarrow X = 1


Truth table for a 2-input OR gate
  • Dynamic Timing Analysis:

    • Output XX remains steadily HIGH during any time interval where at least one incoming input pulse maintains a logic HIGH level.


Timing diagram of a 2-input OR gate across intervals t1 through t4
  • Application (Automotive Safety):

    • Warning lamp illuminates when either a driver seatbelt sensor indicates unbuckled (A=1A = 1) OR an entry door switch detects open (B=1B = 1).

The NOT Gate (Inverter)
  • Functional Definition: Single-input logic device that outputs the inverse or logical complement of its input.

  • Graphic Symbols: Distinctive triangle amplifier symbol with an inversion bubble, or IEEE/IEC rectangular box with the digit 11 and a polarity indicator.


Distinctive shape and rectangular outline symbols for the NOT gate
  • Boolean Algebraic Expression:

    • X=A′X = A' or X=A‾X = \overline{A} (Logical negation).

  • Truth Table Verification:

    • Input A=0→X=1A = 0 \rightarrow X = 1

    • Input A=1→X=0A = 1 \rightarrow X = 0


Truth table for a single-input NOT gate
  • Dynamic Timing Analysis:

    • Inverts the input waveform: transitions to LOW when input is HIGH, and switches to HIGH when input is LOW.


Timing diagram of a NOT gate demonstrating waveform inversion
  • Application (Temperature Control):

    • When system temperature exceeds limits, an active-LOW protection shutdown signal is inverted by a NOT gate to an active-HIGH drive signal to activate an auxiliary cooling fan.

The NAND Gate and Universal Gate Implementation
  • Functional Definition: Digital logic gate producing a LOW (00) output only when all inputs are HIGH (11); otherwise outputs HIGH (11).

  • Graphic Symbols: AND gate shape with an output inversion bubble, or IEEE/IEC box with qualifying ampersand (&\&) and polarity indicator.


Distinctive shape, NOT-AND equivalent, and rectangular outline for the NAND gate
  • Negative-OR Equivalence:

    • By DeMorgan's laws, NAND is logically equivalent to an OR gate with active-LOW inverted inputs:     A⋅B‾=A‾+B‾\overline{A \cdot B} = \overline{A} + \overline{B}


NAND gate equivalence to a Negative-OR gate
  • Boolean Expression & Truth Table:

    • Expression: X=(A⋅B)′X = (A \cdot B)' or X=(AB)′X = (AB)'

    • Input A=0A = 0, Input B=0→X=1B = 0 \rightarrow X = 1

    • Input A=0A = 0, Input B=1→X=1B = 1 \rightarrow X = 1

    • Input A=1A = 1, Input B=0→X=1B = 0 \rightarrow X = 1

    • Input A=1A = 1, Input B=1→X=0B = 1 \rightarrow X = 0


Truth table for a 2-input NAND gate
  • Dynamic Timing Analysis:

    • Output remains continuously HIGH, dropping to active-LOW only when inputs AA and BB are concurrently HIGH.


Timing diagram of a 2-input NAND gate
  • Universal Gate Synthesis via NAND:

    • Synthesizing NOT: Tie both inputs together: (A⋅A)′=A′(A \cdot A)' = A'


NOT gate implementation using a single NAND gate
  • Synthesizing AND: Feed NAND output into a second NAND-based inverter: ((A⋅B)′)′=A⋅B((A \cdot B)')' = A \cdot B


AND gate implementation using two NAND gates
  • Synthesizing OR: Invert inputs independently, then route into a third NAND gate: (A′⋅B′)′=A+B(A' \cdot B')' = A + B


OR gate implementation using three NAND gates
  • Real-World Applications:

    • Flash Memory: High-density, non-volatile series-connected cell architecture used across SSDs and USB drives.

    • Liquid Storage Tank Monitoring:

    • Discrete sensors output HIGH (11) when fluid is above 1/41/4 level.

    • Green LED (Both Tanks > 1/4 Full): NAND output drops to active-LOW, sinking current to turn on the green status LED.


Chemical storage tanks A and B connected to a NAND gate driving a green indicator LED
- **Red LED (One or Both Tanks < 1/4 Full):** By Negative-OR logic, any LOW sensor input drives the gate output HIGH, sourcing current to illuminate the red warning LED.


Storage tanks monitoring circuit using Negative-OR logic to trigger a red fault LED
The NOR Gate and Universal Gate Implementation
  • Functional Definition: Digital logic gate producing a LOW (00) output if any input is HIGH (11); produces a HIGH (11) output only when all inputs are concurrently LOW (00).

  • Graphic Symbols: Distinctive OR curve with an output inversion bubble, or IEEE/IEC box with qualifying designation ≥1\ge 1 and polarity indicator.


Distinctive shape, NOT-OR equivalent, and rectangular outline for the NOR gate
  • Negative-AND Equivalence:

    • By DeMorgan's laws, NOR functions identically to an AND gate with active-LOW inverted inputs:     A+B‾=A‾⋅B‾\overline{A + B} = \overline{A} \cdot \overline{B}


NOR gate equivalence to a Negative-AND gate
  • Boolean Expression & Truth Table:

    • Expression: X=(A+B)′X = (A + B)'

    • Input A=0A = 0, Input B=0→X=1B = 0 \rightarrow X = 1

    • Input A=0A = 0, Input B=1→X=0B = 1 \rightarrow X = 0

    • Input A=1A = 1, Input B=0→X=0B = 0 \rightarrow X = 0

    • Input A=1A = 1, Input B=1→X=0B = 1 \rightarrow X = 0


Truth table for a 2-input NOR gate
  • Multi-Input Extension (3-Input NOR):

    • X=(A+B+C)′X = (A + B + C)'; evaluates to 11 only when A=0,B=0,C=0A = 0, B = 0, C = 0.


Truth table for a 3-input NOR gate across all binary input states
  • Dynamic Timing Analysis:

    • Forced to LOW whenever either input line carries a HIGH logic level; pulses HIGH exclusively when all inputs are concurrently LOW.


Timing diagram of a 2-input NOR gate
  • Universal Gate Synthesis via NOR:

    • Synthesizing NOT: Tie inputs together: (A+A)′=A′(A + A)' = A'


NOT gate implementation using a single NOR gate
  • Synthesizing OR: Cascade NOR output into a secondary NOR-based inverter: ((A+B)′)′=A+B((A + B)')' = A + B


OR gate implementation using two cascaded NOR gates
  • Real-World Applications:

    • Microcontroller Reset Subsystems: Ensures a system reboot executes only when all reset condition inputs are inactive.

    • Aircraft Landing Gear Status Panel:

    • Dedicated limit switches output LOW (00) when extended and HIGH (11) when retracted.

    • Retracted Status (Red LED): When all gears are retracted, sensor inputs are all HIGH (11), driving the 3-input NOR gate output to active-LOW (00) to sink current and illuminate the cockpit Red LED.

    • Extended Status (Green LED): When all gears deploy, sensor inputs are all LOW (00), causing a 3-input Negative-AND configuration to output active-HIGH (11) to source current and illuminate the Green LED.

    • Transit/Discrepancy: If any gear fails to lock in transit, neither condition evaluates to true, extinguishing both LEDs to alert the flight crew of an unsafe state.


Aircraft landing gear status monitoring circuit utilizing dual NOR logic configurations
Integrated Circuit (IC) Logic Gates: Configurations and Pinouts
  • Packaging Formats: Standard 14-pin DIP with Pin 7=GND7 = \text{GND} and Pin 14=VCC14 = V_{CC}.

    • Hex Configuration: Houses 66 independent single-input gates (e.g., inverters).

    • Quad Configuration: Houses 44 independent 2-input gates.

  • Fairchild 74AC08 / 74ACT08 (Quad 2-Input AND Gate):

    • Standard pin layout: Inputs at Pins 1,21, 2; Output at Pin 33; repeated across 44 internal gates.


Fairchild 74AC08 Quad 2-Input AND Gate connection diagram and IEEE logic symbol
  • Fairchild 74AC32 / 74ACT32 (Quad 2-Input OR Gate):

    • Standard layout: Inputs at Pins 1,21, 2; Output at Pin 33 across four OR gates.


Fairchild 74AC32 Quad 2-Input OR Gate connection diagram and IEEE logic symbol
  • Fairchild DM74LS04 (Hex Inverting Gates):

    • Six independent inverters with Y=A‾Y = \overline{A}.


Fairchild DM74LS04 Hex Inverter connection diagram and function table
  • Fairchild DM74LS00 (Quad 2-Input NAND Gate):

    • Four independent 2-input NAND gates with Y=AB‾Y = \overline{AB}.


Fairchild DM74LS00 Quad 2-Input NAND Gate pinout and function table
  • Fairchild MM74HC02 (Quad 2-Input NOR Gate):

    • Non-Standard Pin Configuration: Gate outputs occupy the initial pin of each gate cluster (Pin 1=Y11 = Y_1, Pin 2=A12 = A_1, Pin 3=B13 = B_1).


Fairchild MM74HC02 Quad 2-Input NOR Gate pinout connection diagram
Digital Circuit Troubleshooting Methodologies and Fault Diagnosis
  • Troubleshooting Diagnostic Tools:

    • Logic Probe: Visualizes pin states—glows strongly for valid HIGH, dimly for floating/high-impedance nodes, and turns off for LOW.

    • Logic Pulser: Injects momentary digital stimulus pulses into active circuit nodes without desoldering.

  • Three-Step Troubleshooting Protocol:

    • Step 1: Probe outputs of each gate using a logic probe to identify incorrect resting logic levels.

    • Step 2: Inject pulses into gate inputs using a logic pulser while observing outputs to verify truth-table compliance.

    • Step 3: Diagnose internal transistor defects, including stuck-at-HIGH (s-a-1\text{s-a-1}) or stuck-at-LOW (s-a-0\text{s-a-0}) faults.

Summary of Logic Operations and Upcoming Topics
  • Comparative Gate Operations:

    • AND Gate: Outputs HIGH only when all inputs are HIGH (X=ABX = AB).

    • OR Gate: Outputs HIGH when at least one input is HIGH (X=A+BX = A + B).

    • NOT Gate: Outputs the complement of the input (X=A‾X = \overline{A}).

    • NAND Gate: Outputs LOW only when all inputs are HIGH (X=(AB)′X = (AB)'); acts as a universal logic gate.

    • NOR Gate: Outputs LOW if any input is HIGH (X=(A+B)′X = (A + B)'); acts as a universal logic gate.

  • Upcoming Topics (Week 3):

    • XOR and XNOR gate architectures and parity applications.

    • Fundamentals of Boolean algebra identities and algebraic reduction.

    • Advanced minimization techniques using DeMorgan's Theorems.