Chapter 2
Chapter 2
Logic gates are the primary building blocks of all digital circuits and systems.
The operation of logic gates is based on the Boolean mathematics. They are
widely used in digital systems to perform operations such as controlling,
processing, manipulation of digital data, etc.
All these gates are combined together to implement complex practical digital
systems to perform various computational and logical operations.
A Boolean variable can have one of the two possible values, i.e., 0 or 1.
Where, 0 represents "false" or "low state" while 1 represents "true" or "high
state".
The operation of each logic gate is described using a table of input and
output variables, which is called truth table of the logic gate.
Transistor
Transistors are the main electronic components used to design a logic gate
circuit. A number of transistors are connected together to form a circuit that
can perform different logic gate functions.
Input Terminals
A logic gate can have one or more input terminals. Each input terminal can
receive binary signals.
Output Terminals
Logic gates have an output terminal that produces the result of the logical
operation performed by the logic gate.
Power Supply
Being an electronic circuit, a logic gate requires a source of electric power to
work. In general, a voltage VCC represents the power supply.
Ground Terminal
The ground terminal is a 0 V terminal. It acts as a reference point in the
circuitry of the logic gate.
Connecting Wires
These are essential components in the logic gate circuitry. The connecting
wires are required to connect transistors and other components of a logic
gate in a circuit.
These are the main components of a logic gate essentially required to design
and implement it. However, some advanced logic gates can have some more
circuit components as well.
● Logic gates can process digital signals which are essential component
in modern computing systems.
● Logic gates can perform logical or Boolean operations efficiently.
● Being digital circuits, logic gates are highly immune to noise and
electromagnetic interference. Hence, they are more reliable.
● Multiple logic gates can be combined to obtain higher order logic gates
and design complex digital systems.
● Logic gates are versatile in terms of logical operations, as they can
perform a variety of operations when configured in different ways.
● Logic gates have high operating speed.
● Logic gates consume lower amount of electric power. Hence, they
result in higher energy efficiency.
● Logic gates can be integrated in the form ICs. This feature enables
engineers to design compact and efficient electronic devices.
All these advantages make logic gates the essential components in the field
of digital electronics.
● Logic gates have a finite propagation delay and take a certain amount
of time to process. This can be a limiting factor in case of high-speed
digital systems.
● In some complex digital systems, logic gates can degrade the quality
of the signals.
● Logic gates can operate with binary voltage levels only.
● In large digital circuits, the use of multiple logic gates can increase
complexity of the circuit.
● The continuous switching i.e., toggle between on and off states can
heat up the logic gates and degrade their performance.
● Design, fabrication, and testing of logic gate is a complex and cost
intensive process.
● Logic gates require addition analog to digital converts to process
analog signals.
● Logic gates are highly sensitive faults and errors.
LOGIC GATES
● Logic gates are the basic building blocks of any digital system.
● It is an electronic circuit having one or more than one input and only one output.
● The relationship between the input and the output is based on a certain logic.
● Based on this, logic gates are named as AND gate, OR gate, NOT gate etc.
AND Gate
What is an AND Gate?
An AND gate is a type of basic logic gate used in various digital circuits and
systems. It produces a high or logic 1 or True output, only when all its inputs
are high or logic 1 or true. For all other combinations of inputs, it produces a
low or logic 0 or False output.
The logic symbols for the two and three input AND gates are depicted in the
following figure.
Here, A, B, and C are the input variables and Y is the output variable.
In this chapter, we will cover AND gates having three inputs only. But we can
design an AND gate for any number of input variables.
Input Output
A B Y
0 0 0
0 1 0
1 0 0
1 1 1
From this truth table of two-input AND gate, it can be observed that the
output of the AND gate is logic 1 or high, only when both inputs are logic 1
or high.
The following table represents the truth table of a three-input AND gate −
Input Output
A B C Y
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1
This truth table shows that the output is high or logic 1 only when all the
three inputs to the AND gate are high or logic 1. For rest input combinations,
the output is low or logic 0.
From these truth tables of AND gate, we can conclude that an AND gate
produces a high or logic 1 output, only when all its inputs are high or logic 1,
otherwise the output is low or logic 0.
Y=A·B
Where, A and B are inputs and Y is the output. This expression is read as "Y is equal to A AND
B." The dot (·) symbol represents the AND operation.
For the three-input AND gate, the Boolean expression is given by,
Y=A·B·C
In the same way, we can obtain the Boolean expression for an AND gate having any number of
input variables.
The implementation of AND gate using transistors requires as many transistors as the number of
inputs. For example, a two-input AND gate requires two transistors.
When both inputs A and B are low, the transistors Q1 and Q2 remain in off state and act as
open switch. Therefore, the output line Y will directly connect to the ground potential. Thus, the
output is low or logic 0.
When the input A is low and the input B is high, the first transistor Q1 is off and the
second transistor Q2 is on. But still the supply voltage will not connect to the output line and the
output line will remain at ground potential. Consequently, the output is low or logic 0.
When the input A is high and the input B is low, the transistor Q1 will conduct and the
transistor Q2 will remain off. In this condition, the output line does not receive the supply voltage
but connect to the ground potential. Hence, for this input combination, the output is low or logic
0.
When both inputs A and B are high, both transistors Q1 and Q2 will turn on and act as
closed switches. In this condition, the supply voltage directly connect to the output line. This
makes output of the circuit high or logic 1.
This is how the above transistor circuit acts a two-input AND gate. We can add more transistors
to implement a high order AND gate.
In this AND gate circuit, we have a voltage source, two switches representing two input
terminals of the AND gate, and a lamp representing the output.
From the circuit, we see that if both switches A and B are closed, there will be a closed for
current to flow in the circuit. Hence, the lamp will glow that represents the high or logic 1
output.
If both or any of the two switches be open, there will be a break in the current path, making the
lamp off. This represents the low or logic 0 state of the output of the AND gate.
This way, the above depicted switching circuit performs the AND gate operation. By adding
more number of switches in series, we can implement a higher order AND gate.
AND Gate IC
In practice, there is an integrated circuit namely, IC 7408 which is a most commonly used AND
gate IC. This AND gate IC is implemented in transistor-transistor logic (TTL). The block
diagram of the AND gate IC 7408 is shown in the following figure.
It is a Quad-2 AND gate IC having four two-input AND gates integrated on a single chip. It has
14 pins.
Conclusion
In conclusion, the AND gate is a fundamental logic gate used in digital circuits to implement the
Boolean multiplication function.
The output of the AND gate is high or logic 1 only when all its inputs are high or logic 1.
Otherwise, it generates a low or logic 0 output.
AND gate plays an important role in various digital electronic applications such as data
processing, memory devices, arithmetic logic units, control systems, and more.
Print Page
What is an OR Gate?
An OR gate is a type of logic gate used to perform logical addition. It can
have two or more inputs and one output.
The output of the OR gate is low or logic 0 only when all its inputs are low or
logic 0. For rest input combinations, the output of the OR gate is high or
logic 1.
The logic symbols for a two-input and a three-input OR gate are shown in
the following figure.
Here, A, B, and C are the input lines and Y is the output line.
Input Output
A B Y
0 0 0
0 1 1
1 0 1
1 1 1
The following table shows the truth table for a three-input OR gate −
Input Outpu
A B C Y
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
From these two truth tables, we can observe that the output of the OR gate
is logic 0 or low, only when all the inputs to the OR gate are logic 0 or low.
Otherwise, the output of the OR gate is high or logic 1.
Explore our latest online courses and learn new skills at your own pace. Enroll
and become a certified expert to boost your career.
Y=A+B
Here, A and B are input variables and Y is the output variable. This
expression is read as "Y is equal to A OR B". Here, the "+" sign represents
the OR operation.
Y=A+B+C
In the same way, we can extend this expression to any number of input
variables.
Working of OR Gate
The operation of a two input OR gate for different input combinations is
described below −
This theory explains that when both inputs applied to an OR gate are low or
logic 0, the output of the OR gate is also low or logic 0, otherwise it is high
or logic 1.
This theory also explains that the output of an OR gate is low or logic 0, only
when all the three inputs are low or logic 0.
When both inputs A and B are low, i.e., both A and B are connected to a low
voltage (0 V), the transistors Q1 and Q2 remain off and act as open switches.
The result is that the output line will directly connect to the ground potential.
This makes the output of the circuit low or logic 0.
If the input A is low and the input B is high, the transistor Q1 will be off, and the
transistor Q2 will turn on and acts as a closed switch. Thus, the supply
voltage VCC will connect to the output line through the transistor Q2.
Consequently, the output of the circuit is high or logic 1.
If the input A is high and the input B is low, the transistor Q1 will conduct, while
the transistor Q2 will act as open switch. Thus, the output line will connect to
the power supply VCC through the transistor Q1. Consequently, the output of
the circuit is high or logic 1.
When both inputs A and B are high, both transistor Q1 and Q2 will conduct and
act as the closed switches. The output line will connect to the power supply
VCC through both transistors, this makes the output of the circuit high or
logic 1.
This theory explains that when both inputs of the circuit are connected to
logic 0 or low signal, the output is low or logic 0, otherwise the output is
high or logic 1. Hence, this circuit implements the OR gate function.
When both switches A and B are open, there is closed path for the flow of
current. Hence, the lamp will remain off which represents the low or logic 0
output.
If the switch A is open and the switch B is closed, there is a closed path for the
current flow through the switch B. In this case, the lamp will glow and
represents the high or logic 1 output.
If the switch A is closed and the switch B is open, there will be a closed path
for the current to flow through the switch A. In this case, the lamp will glow
that represents the high or logic 1 output.
If both switches A and B are closed, there will a closed path for the current to
flow. This will also turn on the lamp and represents the high or logic 1
output.
This way, the above shown switching circuit implements the OR gate
operation. We can add more switches in parallel to implement a higher order
OR gate logic.
OR Gate IC
In practice, the OR gate is available in the form of integrated circuits or ICs.
The most popular OR gate IC is IC 7432 which is a Quad 2-input OR gate IC.
It has four two-input OR gates.
The following figure depicts the pin and block diagram of the OR gate IC
7432.
Conclusion
In conclusion, the OR gate is a basic logic gate having two or more input
lines and one output line. It produces a low or logic 0 output only when all
its inputs are low, otherwise it produces a high or logic 1 output.
In this chapter, we explained the theory of OR gate. Here, we covered only
two and three-input OR gates. But the same theoretical and technical
explanation is valid for OR gate with any number of inputs.
It has only one input line and one output line. The output of the NOT gate is
high or logic 1 when its input is low or logic 0. The output of the NOT gate is
low or logic 0 when its input is high or logic 1.
The logic symbol of the NOT gate is shown in the following figure −
Here, A is the input line and Y is the output line of the NOT gate.
0 1
1 0
From this truth table, we can observe that the NOT gate inverts the input
applied to it. Hence, if we apply a high input, it produces a low output and
vice-versa.
Explore our latest online courses and learn new skills at your own pace. Enroll
and become a certified expert to boost your career.
Y=A¯=A′Y=A¯=A′
Here, the symbols "(-) overbar" and "(') prime" represents the inversion or
complement operation.
● If A = 0, the output is Y = 1.
● If A = 1, the output is Y = 0.
Thus, the output of the NOT gate is the complement of the input applied to
it.
The following figure shows the circuit diagram of a NOT gate using transistor
or transistor inverter.
Working of Transistor NOT Gate
The above transistor inverter circuit operates as described below −
When the input A is low, the transistor will be inactive and acts as an open
switch. Thus, there is no closed path between the power supply VCC and
ground terminal. Hence, the total supply voltage will appear at the output
line. This represents the high or logic 1 output.
When the input A is high, the transistor will turn on and act as a closed
switch. As a result, the power supply is directly connected to the ground
terminal and the voltage available at the output line is equal to the ground
voltage. This makes the output of the circuit low or logic 0.
This is how, the above transistor circuit implements the NOT logic.
If the switch A is closed, i.e., logic 1, the current flows through the
short-circuited path provided by the closed switch and no current will flow
through the lamp. Hence, in this case, the lamp will be off and represents
the low or logic 0 output.
From this discussion, it is clear that the output is high when the input is low
and vice-versa. Thus, the above switching circuit implements the NOT gate
logic.
NOT Gate IC
The NOT gate comes in the form of integrated circuits or ICs. The most
commonly used NOT gate IC is IC 7404. It contains six TL (transistor logic)
NOT gates.
The pin diagram of the NOT gate IC 7404 is depicted in the following figure.
Conclusion
In conclusion, the NOT gate is a logic gate used in digital electronics to
implement inversion operation. It has only one input line and one output
line.
The output of the NOT gate is the complement of the input signal applied to
it. In this chapter, we explained the basic theory of NOT gate along with its
working and applications.
The NAND gate can have two or more input lines and one output line. The
output of the NAND gate is low or logic 0 only when all its inputs are high or
logic 1. Otherwise, the output of the NAND gate is high or logic 1.
The NAND gate is basically a logic gate that performs the inverse operation
of an AND gate.
Being a universal gate, the NAND gate can implement any possible Boolean
function or operation of any other type of logic gate.
Logic Symbol of NAND Gate
The logic symbols of a two-input and three-input NAND gates are depicted in
the following figure.
Here, the bubble at the output side represents the inversion operation.
The variables A, B, and C designate the input lines and the variable Y
represents the output line of the NAND gate.
Explore our latest online courses and learn new skills at your own pace. Enroll
and become a certified expert to boost your career.
Input Output
A B Y
0 0 1
0 1 1
1 0 1
1 1 0
A B C Y
0 0 0 1
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 0
From these two truth tables, we can observe that the NAND gate produces a
low or logic 0 output only when all its inputs are high or logic 1. For any
other input combinations, the output is high or logic 1.
Y=AB¯¯¯¯¯¯¯=(AB)′Y=AB¯=(AB)′
The Boolean expression for a three-input NAND gate is given by,
Y=ABC¯¯¯¯¯¯¯¯¯¯¯=(ABC)′Y=ABC¯=(ABC)′
Here, A, B, and C are the input variables and Y is the output variable.
This is all about the operation of a NAND gate for different input
combinations.
It is also important to note that in this chapter, we are discussing the theory
of NAND gate by considering only two and three input variables. But the
same logic and theory is applicable to any number of inputs.
When both inputs A and B are connected to a low signal, the transistors Q1 and
Q2 act as open switches. The entire supply voltage will appear at the output
line Y. Hence, for this input combination, the output of the circuit is high or
logic 1.
When the input A is at low level and the input B is at high level, the transistor
Q1 acts as an open switch and the transistor Q2 acts as a closed switch. In
this case, there is not a direct connection between power supply and the
ground terminal. Hence, the whole supply voltage will appear at the output
terminal Y, making it high or logic 1.
When the input A is at high level and the input B is at low level, the transistor
Q1 acts as a closed switch and the transistor Q2 acts as an open switch.
Again, there is a disconnection between power supply and the ground
terminal. For this combination of inputs, the entire supply voltage will appear
at the output line and sets the output high or logic 1.
When the both inputs are connected to a high or logic 1 signal, both transistors
will turn on and connects the output line directly to the ground terminal i.e.,
to a low potential. This makes the output of the circuit low or logic 0.
Hence, the output of this circuit is low or logic 0, only when all inputs are
high or logic 1, otherwise the output is high or logic 1. Thus, this circuit
implements the NAND gate logic.
In this switching circuit, when both switches A and B are closed, there is a
short-circuited path for the flow of electric current that bypasses the lamp.
Hence, no current will flow through the lamp and the lamp will not glow. This
represents the low or logic 0 output.
Thus, the output of this switching circuit is low or logic 0 only when both
switches are closed, otherwise the output is high or logic 1. Hence, this
circuit acts as a NAND gate.
● Alarm circuits
● Buzzer and burglar devices
● Automatic temperature regulation systems
● Security systems
● Automated doors and windows, etc.
This is all about the NAND gate, its working and applications. Let us now
discuss the theory of another universal gate named, NOR gate.
Here, A, B, and C are the input lines and Y is the output line. The bubble at
the output end represents the inversion operation.
Input Output
A B Y
0 0 1
0 1 0
1 0 0
1 1 0
Input Outpu
A B C Y
0 0 0 1
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 0
From these truth tables, we can observe that the output of the NOR gate is
high or logic 1 only when all its inputs are low or logic 0, otherwise the
output is low or logic 0.
From this discussion, we can observe that the NOR gate produces a high or
logic 1 output when all its inputs are low or logic 0.
When both inputs A and B are low, the transistors Q1 and Q2 do not conduct
and act as open switches. In this case, the output line Y will directly connect
to the power supply. Thus, the whole supply voltage will appear at the
output terminal. This makes the output of the circuit high or logic 1.
When the input A is connected to low and the input B is connected to a high
signal, the transistor Q1 will act as an open switch while the transistor Q2 will
act as a closed switch. In this case, the output line Y will directly connect to
the ground terminal through the transistor Q2. This results in a low signal at
the output line.
When the input A is connected to high and the input B is connected to a low
signal, the transistor Q1 will conduct and the transistor Q2 will act as an open
switch. In this case, the output line is directly connected to the ground
terminal. Thus, the output is low or logic 0.
When both inputs A and B are connected to a high signal, both transistors
Q1 and Q2 will act as closed switches and connect the output line directly to
the ground terminal. In the case also, the output is low or logic 0.
From this discussion, we can observe that this transistor circuit implements
the NOR logic and hence called as transistor NOR gate.
We can add more transistors to the circuit to obtain a higher order NOR
gate.
In this circuit, if both switches A and B are open, the entire current flows
through the lamp and turn it on. This represents the high or logic 1 state of
the output.
If both or any of the switches is closed, there is a short-circuited path for the
flow of current that bypasses the lamp. In this case, the lamp will not glow
and represent the low or logic 0 state of the output.
Thus, the output of this switching circuit is high or logic 1, only when both of
its inputs are low i.e., open switches, otherwise the output is low or logic 0.
Therefore, this electric circuit realizes the NOR gate operation and logic.
Conclusion
In conclusion, a universal logic gate is one that can implement any possible
Boolean functions or other logic gates without need of any other type of logic
gates. In digital electronics, there are two universal logic gates namely,
NAND gate and NOR gate.
XOR gate is also called Exclusive OR gate or Ex-OR gate. This logic gate is
widely used in digital arithmetic circuits like adders and subtractors.
Since the output of the XOR gate is high only when both of the inputs are
dissimilar, it is also known as the inequality detector.
It is very important to note that there is no such thing like three or more
input XOR gate. Hence, when we need XOR gate for more than two input
variables, we use two or more two-input XOR gates.
It has only two inputs designated as A and B and one output denoted by Y.
Explore our latest online courses and learn new skills at your own pace. Enroll
and become a certified expert to boost your career.
Inputs Output
A B Y
0 0 0
0 1 1
1 0 1
1 1 0
From this truth table, we can observe that the output of the XOR gate is high
or logic 1 only when the both inputs are different. In the case, when both
inputs are similar the output is low or logic 0.
The following equation is known as the Boolean expression of the XOR gate.
Y=A⊕BY=A⊕B
This equation can also be expressed as below −
Y=AB′+A′B=AB¯+A¯BY=AB′+A′B=AB¯+A¯B
From this explanation, we can see the output of XOR gate is high or logic 1
only when inputs are dissimilar.
A⊕1=A¯A⊕1=A¯
Hence, by utilizing this property, we can state that if one of the input lines of
the XOR gate is connected to logic 1 and the input signal is applied to
another input line. Then, the XOR gate produces the inverted version of the
applied signal as the output.
A⊕0=AA⊕0=A
Hence, if one of the two input lines of the XOR gate is connected to a logic 0
and the input signal is applied to another input line. The XOR gate then
produces the output same as the input.
The operation of the XOR gate as a buffer logic is illustrated in the following
figure.
The following figure depicts the circuit diagram of the XOR gate using
switches.
In this switching circuit, if the switches A and B are on the same level (either
0 or 1), the lamp will not glow. This state represents the low or logic 0
output.
Hence, the above shown electrical circuit implements the XOR logic function.
Conclusion
In conclusion, the XOR gate is a two input and one output logic gate that
produces a high or logic 1 output when the inputs applied to it are dissimilar.
The XOR gate logic is widely used in staircase electric wiring and many other
automation circuits, where a single device like lamp has to be controlled
from two different locations.
What is XNOR Gate?
The XNOR gate is a logic gate that has two inputs and one output.
The output of the XNOR gate is high, only when both of its inputs same, i.e.,
either both inputs are high or both inputs are low. If the inputs are
dissimilar, i.e., one is high and the other low, the output is low or logic 0.
Since the XNOR gate produces a high output when both its inputs are
similar, it is also known as an equality detector.
Actually, the XNOR gate is a combination of two logic gates namely, XOR
gate and NOT gate. Therefore,
It is important remember that there is no such thing like an XNOR gate with
three or more inputs. To obtain an XNOR gate with inputs more than two, we
combine multiple two-input XNOR gates together.
The bubble on the right-end represents the NOT operation. The variables A
and B represent the input lines while Y represents the output line.
Explore our latest online courses and learn new skills at your own pace. Enroll
and become a certified expert to boost your career.
Input Output
A B Y
0 0 1
0 1 0
1 0 0
1 1 1
From this truth table, it can be observed that the XNOR gate produces a high
or logic 1 output when both of its inputs are same i.e., 0 and 0 or 1 and 1.
Otherwise, it gives a low or logic 0 output.
Y=A⊙BY=A⊙B
This can also be expressed as,
Y=AB+AB¯Y=AB+AB¯
Here, A and B are input variables while Y is the output variable.
Hence, we can see that the output is high or logic 1 for similar inputs. It is
low or logic 0 for dissimilar inputs.
In this circuit, when both switches A and B are at same level i.e., at 0 and 0
or 1 and 1. There is a closed path for the current to flow through the lamp.
This turns on the lamp and represents the high or logic 1 output.
If the switches are at different levels i.e., one is at level 0 and the other is at
level 1. There is no complete path between the battery and lamp. Hence, the
lamp will not glow and represent the low or logic 0 output.
Hence, the above shown switching circuit implements the XNOR logic
operation.
Y=AB+AB¯Y=AB+AB¯
If B is set at logic 0, then
Y=A⋅0+A¯⋅1=A¯Y=A⋅0+A¯⋅1=A¯
Hence, if one input XNOR gate is tied to logic 0, then the gate will work as
an inverter.
Y=AB+AB¯Y=AB+AB¯
If B is set at logic 1, then
Y=A⋅1+A¯⋅0=AY=A⋅1+A¯⋅0=A
Thus, an XNOR gate with one input set to logic 1 acts as a buffer.
Conclusion
In conclusion, the XNOR gate or Exclusive NOR gate is a logic gate used in
various digital electronic applications. It is a two-input logic gate.
Since, Boolean algebra is based on the binary number system. Hence, the
Boolean variables can take only two possible values i.e., 0 and 1. Here, the
value 0 represents the False state, while the value 1 represents the True
state.
AND Operation
In Boolean algebra, a logical operation in which the outcome is true (1) only
when all the input values are true (1), otherwise, the output is false (0) is
termed as AND operation. The AND operation is represented by a dot (.). For
example, A AND B can be represented as A.B in symbolic form.
OR Operation
In Boolean algebra, the OR operation is another logical operation in which
the output is false (0) only when all input values are false (0), otherwise the
output is true (1). The OR operations is denoted by a plus (+). For example,
A OR B can be represented as A + B.
NOT Operation
In Boolean algebra, the NOT operation is performed to obtain the inverted
version of the input value. Thus, the result of the NOT operation is false (0),
if the input is true (1) and vice-versa. The NOT operation is represented by
the symbol "~". For example, NOT A is represented as ~A.
These are the basic operations used in the Boolean algebra. However, there
are many more logical operations and rules that used in the Boolean algebra
to perform complex tasks.
Explore our latest online courses and learn new skills at your own pace. Enroll
and become a certified expert to boost your career.
Terminology of Boolean Algebra
The following are some important terms commonly used in Boolean algebra
−
Boolean Variable
A Boolean variable is a symbol that can take one of the two possible binary
values i.e., 0 and 1.
Boolean Value
It is nothing but a value representing the state of a variable. It can be either
True (1) or False (0).
Logic Gate
A logic gate is a digital circuit that can perform a specific logical operation.
There are 7 main logic gates used in digital electronics, they are AND gate,
OR gate, NOT gate, NOR gate, NAND gate, XOR gate, and XNOR gate.
These are the basic terms used in Boolean algebra and provides a foundation
for its understanding and working.
Here is a list of some of key factors that make Boolean algebra an important
concept in the field of digital electronics −
Conclusion
In conclusion, Boolean algebra is a mathematics of logic that provides a set
of rules and a framework to design and develop digital and logical systems.
0 AND 0 = 0 0 OR 0 = 0 N
0 AND 1 = 0 0 OR 1 = 1 N
1 AND 0 = 0 1 OR 0 = 1
1 AND 1 = 1 1 OR 1 = 1
AND Laws
In Boolean algebra, there are four AND laws given below −
OR Laws
There are four OR laws described below −
Complementation Laws
There are following five complementation laws in Boolean algebra −
● Law 1 − 0' = 1
● Law 2 − 1' = 0
● Law 3 − If A = 0, Then A' = 1
● Law 4 − If A = 1, Then A' = 0
● Law 5 − (A')' = A (This is called double complementation law)
Commutative Laws
There are following two commutative laws in Boolean algebra −
Law 1 − According to this law, the operation A OR B produces the same
output as the operation B OR A, i.e.,
A+B=B+A
Hence, the order of the variables does not affect the OR operation.
This law can be extended to any number of variables. For example, for three
variables, it will be,
A+B+C=C+B+A=B+C+A=C+A+B
Law 2 − According to this law, the output of the A AND B operation is same
as that of the B AND A operation, i.e.,
A·B=B·A
This law states that the order in which the variables are ANDed does not
affect the result.
We can extend this law to any number of variables. For example, for three
variables, we get,
A·B·C=A·C·B=C·B·A=C·A·B
Associative Laws
Associative laws define the ways of grouping the variables. There are two
associative laws as described below.
Law 1 − The expression A OR B ORed with C results the same as the A Ored
with B OR C, i.e.,
(A + B) + C = A + (B + C)
This law can be extended to any number of variables. For example, for 4
variables, we get,
(A + B + C) + D = A + (B + C + D) = (A + B) + (C + D)
Law 2 − The expression A AND B ANDed with C results the same as the
expression A ANDed with B AND C, i.e.,
(A · B) · C = A · (B · C)
We can extend this law to any number of variables. For example, if we have
4 variables, then
Distributive Laws
In Boolean algebra, there are the following two distributive laws that allow
for multiplying or factoring out of expressions.
Law 1 − According to this law, we OR several variables and then AND the
result with a single variable.
It gives the same result as the expression in which the single variable is
ANDed with each of the several variables and then ORed the product terms,
i.e.,
A · (B + C) = AB + AC
Law 2 − According to this law, if we AND several variables and then the
result is ORed with a single variable.
It gives the same result as we OR the single variable with each of the
several variables and then the sum terms are ANDed together, i.e.,
A + BC = (A + B)(A + C)
RHS = (A + B)(A + C)
= AA + AB + AC + BC
= A + AB + AC + BC
= A (1 + B + C) + BC
Since,
1+B+C=1+C=1
Therefore,
A · 1 + BC = A + BC = LHS
A + A’B = A + B
= 1 · (A + B) = A + B = RHS
A(A’ + B) = AB
= 0 + AB = AB = RHS
Both these laws show that the complement of a term appearing in another
term is redundant. Hence, the rule is named as Redundant Literal Rule.
Idempotence Laws
The term "idempotence" is a synonym for "same value". There are two
idempotence laws in Boolean algebra. They are,
Law 1 − According to this law, ANDing a variable with itself is equal to the
variable, i.e.,
A·A=A
Law 2 − According to this law, ORing a variable with itself is equal to the
variable, i.e.,
A+A=A
Absorption Laws
There are two absorption laws in Boolean algebra and they are explained
below.
Law 1 − According to this law, if we OR a variable with the AND of the that
variable and another variable, then it is equal to the variable itself, i.e.,
A+A·B=A
LHS = A + A · B = A · (1 + B)
= A · 1 = A = RHS
Law 2 − According to this law, the AND of a variable with the OR of that
variable and another variable is equivalent to the variable itself i.e.,
A(A + B) = A
LHS = A(A + B) = AA + AB
= A + AB = A(1 + B) = A · 1 = A = RHS
Hence, this law proves that if a term appears in another term, then the latter
term will become redundant and can be removed from the expression.
DeMorgan's Theorem
In Boolean algebra, DeMorgan’s theorem defines two laws which are
explained below.
Law 1 − According to this law, the complement of a sum of variables is
equivalent to the product of complement of each of the variables, i.e.,
A+B¯¯¯¯¯¯¯¯¯¯¯¯¯=A¯⋅B¯A+B¯=A¯⋅B¯
This law can be extended to any number of variables.
Law 2 − The second law of DeMorgan’s theorem states that the complement
of a product of variables is equivalent to the sum of complement of each of
the variables, i.e.,
AB¯¯¯¯¯¯¯=A¯+B¯AB¯=A¯+B¯
This law can also be extended to any number of variables.
2. Transposition Theorem
The Transposition Theorem is used to infer a logical implication from another
implication.
A→BA→B is equivalent to B‾→A‾B→A
3. Redundancy Theorem
The Redundancy Theorem shows how redundant terms in Boolean
expressions can be eliminated without changing the expression’s truth value.
● A + A . B = A
● A . (A + B) = A
4. Duality Theorem
The Duality Theorem states that every Boolean algebraic expression remains
valid if the operators and identity elements are swapped (AND ↔ OR, 0 ↔ 1).
If an expression F is valid, then its dual FD is also valid, where FD is obtained
by replacing all + with . , . with +, 0 with 1, and 1 with 0.
5. Complementary Theorem
The Complementary Theorem deals with the behavior of Boolean expressions
involving variables and their complements.
● A . A‾A = 0
● A + A‾A = 1
Applications of Boolean Algebra
1. Digital Circuit Design: Boolean algebra is used to simplify logic circuits in
digital electronics. By applying Boolean theorems, complex logic
expressions can be minimized, resulting in more efficient circuit designs.
2. Computer Programming: In programming, Boolean algebra is used for
conditional statements and controlling the flow of programs. Logical
operations are fundamental in algorithms and data structures.
3. Network Security: Boolean logic is applied in designing and analyzing
security protocols, such as encryption algorithms and access control
mechanisms.
4. Database Query Optimization: Boolean algebra is used in query
optimization in databases to efficiently retrieve and manipulate data.
A+B¯¯¯¯¯¯¯¯¯¯¯¯¯=A¯⋅B¯A+B¯=A¯⋅B¯
Or, it may also be represented as,
⟮A+B⟯′=A′⋅B′⟮A+B⟯′=A′⋅B′
The logic implementation of left side and right side of this law is shown in
Figure 1.
Thus, DeMorgan's first law proves that the NOR gate is equivalent to a
bubbled AND gate. The following truth table shows the proof of this law.
0 0 1 1 1
0 1 0 1 0
1 0 0 0 1
1 1 0 0 0
This truth table proves that the Boolean expression on the left is equivalent
to that on the right side of the expression of DeMorgan's first law.
Also, the first law of DeMorgan's theorem can be extended to any number of
variables, or a combination of variables.
For example,
A+B+C+D+E+…¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
¯¯=A¯B¯C¯D¯E¯…A+B+C+D+E+…¯=A¯B¯C¯D¯E¯…
Also,
ABC+DE+FGH+…¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
=⟮ABC⟯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯.⟮DE⟯¯¯¯¯¯¯¯¯¯¯¯.⟮FGH⟯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯.…ABC+DE+FG
H+…¯=⟮ABC⟯¯.⟮DE⟯¯.⟮FGH⟯¯.…
From the above discussion, we may conclude that the DeMorgan's First Law
converts an expression from a sum form under a NOT sign to a product
form.
Explore our latest online courses and learn new skills at your own pace. Enroll
and become a certified expert to boost your career.
AB¯¯¯¯¯¯¯=A¯¯¯¯+B¯¯¯¯AB¯=A¯+B¯
It may also be represented as,
⟮AB⟯′=A′+B′⟮AB⟯′=A′+B′
The logic implementation of left and right sides of this expression is shown in
Figure 2.
Hence, DeMorgan's second law proves that the NAND gate is equivalent to a
bubbled OR gate. The following truth table shows the proof of this law.
A B AB A' B'
0 0 0 1 1
0 1 1 1 0
1 0 1 0 1
1 1 1 0 0
This truth table proves that the Boolean expression on the left side is
equivalent to that on the right side of the expression of DeMorgan's second
law.
Similar to the first law, we may extend the DeMorgan's second law for any
number of variables or combination of variables.
For example,
ABCDE…¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯=A¯¯¯¯+B¯¯¯¯+C¯¯¯¯+D¯¯¯¯+E¯¯¯¯+…ABC
DE…¯=A¯+B¯+C¯+D¯+E¯+…
And, for a combination of variables,
⟮ABC⟯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯⟮DE⟯¯¯¯¯¯¯¯¯¯¯¯⟮FG⟯…¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯=ABC¯¯¯¯¯¯¯¯¯
¯¯+DE¯¯¯¯¯¯¯+FG¯¯¯¯¯¯¯⟮ABC⟯¯⟮DE⟯¯⟮FG⟯…¯=ABC¯+DE¯+FG¯
Hence, from the above discussion, we can conclude that DeMorgan's second
law transforms a product form of variables or combination of variables under
a NOT sign into a sum form.
Example 1
Apply DeMorgan's theorem to the following Boolean expression,
F=AB⟮C+D⟯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯EF¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯F=AB⟮C+D⟯
¯EF¯
Solution
Given expression is,
F=AB⟮C+D⟯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯EF¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯F=AB⟮C+D⟯
¯EF¯
As the given expression has AND operation under a NOT sign, thus on
applying DeMorgan's second law, we get,
F=AB¯¯¯¯¯¯¯+⟮C+D⟯+EF¯¯¯¯¯¯¯F=AB¯+⟮C+D⟯+EF¯
This is the equivalent or the dual of the given expression.
Example 2
Apply DeMorgan's theorem to the following Boolean expression,
F=AB+CD¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯F=AB+CD¯¯
Solution
Given expression is,
F=AB+CD¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯F=AB+CD¯¯
The given expression is in the form of a sum of variables under a NOT sign,
thus on applying DeMorgan's first law, we get the dual of this expression.
F=AB¯¯¯¯¯¯¯⋅CD¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯=AB¯¯¯¯¯¯¯⋅CDF=AB¯⋅CD¯¯=AB¯⋅CD
In this chapter, we explained the two laws of DeMorgan's Theorem and
showed how they are helpful in performing different operations in digital
logic circuits.
Tri-State Buffer
Truth table for a tri-state buffer
Input
Enable Input Output
A
Tri-state buffers are often connected to a bus which allows multiple signals to travel
along the same connection.
Symbols
The symbol below can be used to represent a tri-state buffer.
Tri-State Buffer
Live Example
Try the following interactive example to see for yourself how a tri-state buffer behaves.
Enable IN OUT
0 0 Hi-Z
0 1 Hi-Z
1 0 0
Tri-state Buffer
1 1 1
Enable IN OUT
0 0 Hi-Z
0 1 Hi-Z
1 0 1
0 0 0
0 1 1
1 0 Hi-Z
Tri-state Buffer
1 1 Hi-Z