Logic Gates
● Inside your computer are billions of units called transistors these transistors serve a
variety of purposes but they commonly act as a sort of very small light switch each
switch can be turned on or turned off computer scientists will often represent a switch
that's turned on with the number one and a switch that's turned off with the number zero
these zeros and ones form a number system called binary and it's the fundamental
language of computers from just these zeros and ones we end up with computers that
can perform calculations create documents view images browse the web and more.
● A logic gate is a device that acts as a building block for digital circuits. They perform
basic logical functions that are fundamental to digital circuits.
● All digital systems can be constructed by only three basic logic gates. These basic gates
are called the AND gate, the OR gate, and the NOT gate. Some textbooks also include
the NAND gate, the NOR gate and the EOR gate as the members of the family of basic
logic gates.
● Each switch stores a single bit of information a 0 or a 1.
● But computers don't just store information they process it transforming inputs into
outputs that's where logic gates come in.
● Logic gates are the building blocks of computer circuits; they accept input and produce
output according to a set of logical rules.
Figure 1.0 - Not Gate
● The NOT Gate takes a single input either a 0 or a 1 and inverts it so that the output is
the opposite of whatever the input is. If the input is a 1 then the not gate outputs a 0.
Figure 1.1 - And Gate
● An AND gate has two or more inputs and one output, and if the inputs applied to it are
all 1, then the output will be 1. An AND gate is an electrical circuit that combines two
signals so that the output is on if both signals are present.
Figure 1.2 - Or Gate
● An OR gate is a digital logic gate that gives an output of 1 when any of its inputs are 1,
otherwise 0. An OR gate performs like two switches in parallel supplying a light, so that
when either of the switches is closed the light is on.
Figure 1.3 - Nand Gate
● NAND gate is an abbreviation for “NOT AND.” A two-input NAND gate is a digital
combination logic circuit that performs the logical inverse of an AND gate. While an AND
gate outputs a logical “1” only if both inputs are logical “1,” a NAND gate outputs a
logical “0” for this same combination of inputs.
Figure 1.4 - Nor Gate
● NOR gate is the result of the negation of the OR operator.
Figure 1.6 - Xor Gate 1
Figure 1.7 - Xor Gate 2
● XOR gate is an abbreviation for “Exclusively-OR.” The simplest XOR gate is a two-input
digital circuit that outputs a logical “1” if the two input values differ, i.e., its output is a
logical “1” if either of its inputs are 1, but not at the same time (exclusively).
Figure 1.8 - Xnor Gate
● XNOR gate (Exclusive NOR gate) does the opposite of what exclusive-or does.