Logic Sec1
Logic Sec1
2
INTRODUCTION
• Logic gates are fundamental building blocks of digital circuits, used in various
electronic devices.
• They perform basic logical functions that are fundamental to digital circuits.
• .
Definition:
Logic gates are electronic components that perform Boolean logic
operations on one or more binary inputs to produce a single binary output.
• In a circuit, logic gates work based on a combination of digital signals coming
from its inputs.
• .
• Most logic gates have two inputs and one output, and they are based on
Boolean algebra.
• Depending on the type of logic gate being used and the combination of inputs,
the binary output will differ. 4
BASIC LOGIC GATES
5
AND Gate
Logical 'and' operator
• Symbol: &
• Output is 'true’ or 1 only when both inputs are 'true’ or 1.
• Acts like a light switch.
• Used in integrated circuits (IC).
Truth table
Photo by Pexels
TRUTH TABLES
7
OR Gate
Logical inclusive 'or'
• Symbol: +
• Output is 'true’ or 1 if any input (one or both) is 'true’ or 1.
• At least one input must be 'true’ or 1 for output to be 'true’ or 1.
• Commonly used in digital ICs. Truth table
Photo by Pexels
XOR Gate
Exclusive 'or'
• Symbol: ⊕
• The output of the Exclusive –OR gate, is 0 when it’s two inputs are
the same and its output is 1 when its two inputs are different.
• Output is 'true' if either, but not both, inputs are 'true'.
• Output is 'false' if both inputs are the same.
• Used in digital circuits and quantum circuits. Truth table
Photo by Pexels
NOT Gate
Logical inverter
• Symbol: ¬
• Has only one input.
• Output is inverse of the input.
• The output is 0 when the input is 1, and the output is 1
when the input is 0.
• Used to reverse logic state.
Truth table
Photo by Pexels
NAND Gate
Negated AND
• Symbol: AND gate with a circle at the output.
• Acts as an AND gate followed by a NOT gate.
• Output is 'false’ or 0 if both inputs are 'true’ or 1.
• Inverts the output of an AND gate.
Truth table
Photo by Pexels
NOR Gate
NOT OR
• Symbol: OR gate followed by an inverter.
• Output is true or 1 if both inputs are false or 0.
• Output is opposite of an OR gate.
• Used in digital ICs.
Truth table
Photo by Pexels
XNOR Gate
Exclusive-NOR
• Symbol: XOR gate followed by an inverter.
• Output is true or 1 if inputs are the same.
• Output is false or 0 if inputs are different.
• Building block of quantum circuits.
Truth table
Photo by Pexels
Conclusion: Logic Gates and Digital Circuits
Photo by Pexels