Logic gates are the fundamental building blocks of digital electronics. They perform logical operations on one or more binary inputs (0 or 1) to produce a single binary output (0 or 1). Logic gates are implemented using transistors, diodes, or ICs in hardware.
They are the core of digital circuits, computers, and microcontrollers.
Basic Logic Gates
| Gate | Symbol | Boolean Expression | Truth Table | Operation |
|---|---|---|---|---|
| AND | Y = A·B | A B | Y 0 0 | |
| OR | Y = A + B | A B | Y 0 0 | |
| NOT | Y = A’ | A | Y 0 | |
| NAND | Y = (A·B)’ | A B | Y 0 0 | |
| NOR | Y = (A + B)’ | A B | Y 0 0 | |
| XOR | Y = A ⊕ B | A B | Y 0 0 | |
| XNOR | Y = (A ⊕ B)’ | A B | Y 0 0 |
Logic Gate Symbols and Diagrams
- AND: D-shaped with flat left side
- OR: Curved input lines, pointed output
- NOT: Triangle with circle at tip (inverter)
- NAND/NOR: Same as AND/OR but with a circle at output (NOT)
- XOR/XNOR: OR gate shape with extra curved line at input
Applications of Logic Gates
- Computers: Arithmetic and logic operations
- Digital Circuits: Adders, multiplexers, memory units
- Control Systems: Traffic lights, elevators, automation
- Error Detection: Parity generation and checking
- Decision-making Circuits: Based on conditions
Combinations of Logic Gates
- Logic gates can be combined to form complex circuits:
- Half Adder: XOR + AND → Adds 2 bits
- Full Adder: Combines 2 Half Adders + OR → Adds 3 bits (2 + carry)
- Multiplexer (MUX): Selects one input from many
- Demultiplexer (DEMUX): Routes input to selected output
💡 Key Point:
- All digital circuits, no matter how complex, can be built using only NAND or NOR gates, because they are universal gates.