Friday, September 5, 2025

Second Semester_Digital Logic_Basic Logic Gates

🔹 Basic Logic Gates

1. NOT Gate (Inverter)

  • Equation: Y=A‾Y = \overline{A}

  • Truth Table:

    • A=0⇒Y=1A=0 \Rightarrow Y=1

    • A=1⇒Y=0A=1 \Rightarrow Y=0


2. AND Gate

  • Equation: Y=A⋅BY = A \cdot B (sometimes written as ABAB)

  • Truth Table:

    • 0⋅0=00 \cdot 0 = 0

    • 0⋅1=00 \cdot 1 = 0

    • 1⋅0=01 \cdot 0 = 0

    • 1⋅1=11 \cdot 1 = 1


3. OR Gate

  • Equation: Y=A+BY = A + B

  • Truth Table:

    • 0+0=00+0 = 0

    • 0+1=10+1 = 1

    • 1+0=11+0 = 1

    • 1+1=11+1 = 1


🔹 Universal Gates

4. NAND Gate (NOT-AND)

  • Equation: Y=A⋅B‾Y = \overline{A \cdot B}

  • Truth Table:

    • 0⋅0=0⇒10 \cdot 0 = 0 \Rightarrow 1

    • 0⋅1=0⇒10 \cdot 1 = 0 \Rightarrow 1

    • 1⋅0=0⇒11 \cdot 0 = 0 \Rightarrow 1

    • 1⋅1=1⇒01 \cdot 1 = 1 \Rightarrow 0


5. NOR Gate (NOT-OR)

  • Equation: Y=A+B‾Y = \overline{A + B}

  • Truth Table:

    • 0+0=0⇒10+0 = 0 \Rightarrow 1

    • 0+1=1⇒00+1 = 1 \Rightarrow 0

    • 1+0=1⇒01+0 = 1 \Rightarrow 0

    • 1+1=1⇒01+1 = 1 \Rightarrow 0


🔹 Exclusive Gates

6. XOR (Exclusive-OR)

  • Equation: Y=A⊕B=AB‾+A‾BY = A \oplus B = A\overline{B} + \overline{A}B

  • Truth Table:

    • 0⊕0=00 \oplus 0 = 0

    • 0⊕1=10 \oplus 1 = 1

    • 1⊕0=11 \oplus 0 = 1

    • 1⊕1=01 \oplus 1 = 0


7. XNOR (Exclusive-NOR / Equivalence)

  • Equation: Y=A⊕B‾=AB+A‾ B‾Y = \overline{A \oplus B} = AB + \overline{A}\,\overline{B}

  • Truth Table:

    • 0 XNOR 0=10 \text{ XNOR } 0 = 1

    • 0 XNOR 1=00 \text{ XNOR } 1 = 0

    • 1 XNOR 0=01 \text{ XNOR } 0 = 0

    • 1 XNOR 1=11 \text{ XNOR } 1 = 1


✅ Summary Table (Equations Only)

GateSymbolEquation
NOTA‾\overline{A}Inverts input
ANDA⋅BA \cdot BOutputs 1 if both are 1
ORA+BA + BOutputs 1 if any is 1
NANDA⋅B‾\overline{A \cdot B}Inverse of AND
NORA+B‾\overline{A + B}Inverse of OR
XORA⊕B=AB‾+A‾BA \oplus B = A\overline{B} + \overline{A}BOutputs 1 if inputs differ
XNORA⊕B‾=AB+A‾ B‾\overline{A \oplus B} = AB + \overline{A}\,\overline{B}Outputs 1 if inputs are same

0 comments:

Post a Comment