[go: up one dir, main page]

0% found this document useful (0 votes)
17 views61 pages

Chapter 2

Uploaded by

vahaneaniket
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views61 pages

Chapter 2

Uploaded by

vahaneaniket
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 61

What is a Logic Gate?

A logic gate is an electronic circuit that performs logical operations based on


the inputs provided to it and produces a logical output that can be either
"true" or "false".

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.

Types of Logic Gates


Logic gates can be broadly classified into the following three categories −

●​ Basic Logic Gates − AND Gate, OR Gate, NOT Gate


●​ Universal Logic Gates − NAND Gate and NOR Gate
●​ Derived Logic Gates − XOR Gate and XNOR Gate

All these gates are combined together to implement complex practical digital
systems to perform various computational and logical operations.

Working Principle of Logic Gates


The working of logic gates is based on the laws of Boolean algebra. In
Boolean algebra, the binary variables and logical operators are used to
perform 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.

A logic gate produces a specific output depending on the relationship


described in its truth table. Hence, Boolean algebra forms the foundation of
working of logic gates.
Major Components of Logic Gates
A logic gate consists of several electronic components, some of which are
listed here −

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.

Advantages of Logic Gates


Logic gates play an important role in the field of digital electronics. Logic
gates have numerous advantages due to which they are widely used in
various applications.

Some of the major advantages of logic gates are given below −

●​ 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.

Limitations of Logic Gates


Logic gates have several advantages, but they also have some limitations
and drawbacks.

The main limitations of logic gates are described below −

●​ 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.

Applications of Logic Gates


As we already discussed that logic gates are the primary building blocks of
all digital circuits and systems. Hence, they are used in a wide range of
applications in digital electronics. The following are some key applications of
the logic gates −

●​ Logic gates are used in digital computers to perform arithmetic,


logical, and control functions.
●​ In memory devices, logic gates are used to implement memory cells to
store digital data in the form of bits.
●​ Logic gates are used in manufacturing microprocessors and
microcontrollers.
●​ In systems used in the digital signal processing, the logic gates play an
important role to perform various operations such as modulation,
filtering, algorithm execution, etc.
●​ Logic gates are also used in digital communication systems to perform
functions like encoding, decoding, signal processing, etc.
●​ In control systems, logic gates are used to manage and control the
operations of machinery.
●​ Logic gates are also used to implement automated operation of
security systems.

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.

Truth Table of AND Gate


The truth table of an AND gate contains inputs and outputs, and specifies
the relationship between them.

The truth table of a two-input AND gate is given below −

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.

Boolean Expression of AND Gate


Boolean expression is a logic equation or a logic function that represents the mathematical
relationship between inputs and output of the AND gate.

The Boolean expression of a two-input AND gate is given by,

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

It is read as "Y is equal to A AND B AND C".

In the same way, we can obtain the Boolean expression for an AND gate having any number of
input variables.

AND Gate using Transistor


The transistor circuit of a two-input AND gate is shown in the following figure.

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.

Working of Transistor AND Gate


The working the transistor AND gate shown in the above figure is explained below −

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.

AND Gate using Switches


We can also implement AND gate logic using a battery, switches, and a lamp or bulb. The
following figure shows the AND gate using switches.

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.

Truth Table of OR Gate


The truth table is a table that shows the relationship between different input
combinations and output.

The following is the truth table for a two-input OR gate −

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.

Boolean Expression of OR Gate


The Boolean expression is a logical function that describes the mathematical
relationship between inputs and output of the OR gate.

The Boolean expression of a two-input OR gate is given below −

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.

Similarly, the Boolean expression of a three-input OR gate is given below −

Y=A+B+C

Here, A, B, and C are the inputs and Y is the output.

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 −

●​ If A = 0 and B = 0, the output of the OR gate is Y = 0.


●​ If A = 0 and B = 1, the output of the OR gate is Y = 1.
●​ If A = 1 and B = 0, the output of the OR gate is Y = 1.
●​ If A = 1 and B = 1, the output of the OR gate is Y = 1.

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.

Similarly, the working of a three-input OR gate is described below −

●​ If A = 0, B = 0, and C = 0, the output of the OR gate is Y = 0.


●​ If A = 0, B = 0, and C = 1, the output of the OR gate is Y = 1.
●​ If A = 0, B = 1, and C = 0, the output of the OR gate is Y = 1.
●​ If A = 0, B = 1, and C = 1, the output of the OR gate is Y = 1.
●​ If A = 1, B = 0, and C = 0, the output of the OR gate is Y = 1.
●​ If A = 1, B = 0, and C = 1, the output of the OR gate is Y = 1.
●​ If A = 1, B = 1, and C = 0, the output of the OR gate is Y = 1.
●​ If A = 1, B = 1, and C = 1, the output of the OR gate is Y = 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.

OR Gate using Transistors


We can implement the OR gate logic circuit using transistors. The
implementation of a two-input OR gate using BJT transistors is shown in the
following figure.
This OR gate circuit is also referred to as transistor-transistor logic (TTL) OR
gate.

Working of Transistor OR Gate


The operation of the above shown transistor OR gate circuit is explained
below −

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.

We can add more transistors to the circuit to implement a higher order OR


gate.

OR Gate using Switches


We can also use electrical switches, a battery, and a lamp to implement the
OR logic operation. The following figure depicts the switching circuit diagram
of a two-input OR gate.

The working of this circuit is explained below −

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.

The OR gate IC 7432 has 14 pins and it is a transistor-transistor logic (TTL)


OR gate IC.

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.

What is a NOT Gate?


The NOT gate is a type of basic logic gate used in digital electronics to
implement the inversion function. Since it performs the inversion operation,
it is also known as inverter.

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.

Truth Table of NOT Gate


The truth table of NOT gate is a table of input and output that represent the
relationship between them. Here is the truth table of the NOT gate −

Input (A) Output (Y)

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.

Boolean Expression of NOT Gate


The Boolean expression of the NOT gate is a logical function that explains
the relationship between input and output of the NOT gate mathematically.

The Boolean expression of the NOT gate is given below −

Y=A¯=A′Y=A¯=A′
Here, the symbols "(-) overbar" and "(') prime" represents the inversion or
complement operation.

This expression is read as "Y is equal to A bar or A prime or NOTed A".

Working of NOT Gate


The NOT gate performs the inversion operation of the input applied. The
complete working of the NOT gate for possible input combinations is
explained below −

●​ 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.

NOT Gate using Transistor


We can implement the NOT gate logic by using a BJT transistor. When the
NOT gate is implemented using a transistor, it is called a transistor inverter.

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.

NOT Gate using Switches


We can also implement the NOT gate operation using a battery, a switch,
and a lamp. The circuit diagram for the NOT gate using switches is shown in
the following figure.
In this circuit, when the switch A is open, i.e., logic 0, the current follows the
path through the lamp making it glow. This represents a high or logic 1
output.

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.

Applications of NOT Gate


The NOT gate is an essential building block of various digital systems and
circuits. Some key applications of NOT gate are described below −

●​ NOT gate is used in inverters to convert a high signal to a low signal


and a low signal to a high signal.
●​ NOT gate is used in communication systems and storage devices.
●​ NOT gate is also employed as interfacing device between different logic
families.
●​ NOT gate is also used in various digital circuits like timers, oscillators,
multivibrators, modulators, etc.

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.

What is a NAND Gate?


The NAND gate is a universal gate that basically a combination of two basic
logic gates namely, AND gate and NOT gate. It is designed by connecting a
NOT gate to the output line of the AND gate, as shown in the following
figure.

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.

Truth Table of NAND Gate


Truth table is a table of inputs and outputs of a NAND gate showing the
relationship between them. Here is the truth table of a two-input NAND
gate −

Input Output

A B Y

0 0 1

0 1 1

1 0 1

1 1 0

The truth table for a three-input NAND gate is given below −


Input Outpu

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.

Boolean Expression of NAND Gate


The Boolean expression is a logical function that describes the logical
relationship between inputs and output of a NAND gate.

The Boolean expression for a two-input NAND gate is give below −

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.

Working of NAND Gate


The working of a two-input NAND gate for different input combinations is
described below −
●​ If A = 0 and B = 0, the output of the NAND gate is Y = 1.
●​ If A = 0 and B = 1, the output of the NAND gate is Y = 1.
●​ If A = 1 and B = 0, the output of the NAND gate is Y = 1.
●​ If A = 1 and B = 1, the output of the NAND gate is Y = 0.

Similarly, the working of a three-input NAND gate can be explained as below


●​ If A = 0, B = 0, and C = 0 the output of the NAND gate is Y = 1.


●​ If A = 0, B = 0, and C = 1 the output of the NAND gate is Y = 1.
●​ If A = 0, B = 1, and C = 0 the output of the NAND gate is Y = 1.
●​ If A = 0, B = 1, and C = 1 the output of the NAND gate is Y = 1.
●​ If A = 1, B = 0, and C = 0 the output of the NAND gate is Y = 1.
●​ If A = 1, B = 0, and C = 1 the output of the NAND gate is Y = 1.
●​ If A = 1, B = 1, and C = 0 the output of the NAND gate is Y = 1.
●​ If A = 1, B = 1, and C = 1 the output of the NAND gate is Y = 0.

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.

NAND Gate using Transistor


We can implement the NAND gate logic by using BJT transistors. Such a
NAND gate is referred to as a transistor NAND gate.

The transistor circuit diagram of a two-input NAND gate is shown in the


following figure.
Working of Transistor NAND Gate
The working of this transistor NAND gate for different input combinations is
explained below −

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.

NAND Gate using Switches


We can also realize the NAND gate using electric switches, a battery, and a
lamp. The circuit diagram of a two-input NAND gate using switches is shown
in the following figure.

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.

For any other switching arrangement, such as A is closed and B is open, A is


open and B is closed, or A and B are open. There is no short-circuited path
and the entire current will flow through the lamp, making it turn on. This
represents the high or logic 1 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.

We can add more switches in series with A and B to implement a higher


order NAND gate.

NAND Gate as an Inverter


The NAND gate can also be used as an inverter gate. For this, all its inputs
are joined together and the input signal to be inverted is applied to the
common terminal as shown in the following figure.

Applications of NAND Gate


The NAND gate is used in a variety of digital and automated systems. Some
of them are listed below −

●​ 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.

What is a NOR Gate?


The NOR gate is another universal gate used in digital electronics to
implement Boolean functions. It is a combination of two basic logic gates
namely, OR gate and NOT gate. The NOR gate is designed by connecting a
NOT gate to the output line and the final output is taken from the output line
of the NOT gate as shown in the following figure.

Being a universal logic gate, it can be used to implement any possible


Boolean function or the other logic gates single-handedly.
The NOR gate can have two or more input lines and one output line. The
output of the NOR gate is high or logic 1 only when all its inputs are low or
logic 0. For all other input combinations, the output of the NOR gate is low
or logic 0.

Logic Symbol of NOR Gate


The logic symbols of a two-input and three-input NOR gates are shown in
the following figure.

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.

Truth Table of NOR Gate


The truth table of the NOR gate specifies the output for different input
combinations. The truth table of a two-input NOR gate is given below −

Input Output

A B Y

0 0 1

0 1 0

1 0 0

1 1 0

The following is the truth table of a three-input NOR gate −

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.

Working of NOR Gate


The operation of a two-input NOR gate for all possible input combinations is
explained below −

●​ If A = 0 and B = 0, the output of the NOR gate is Y = 1.


●​ If A = 0 and B = 1, the output of the NOR gate is Y = 0.
●​ If A = 1 and B = 0, the output of the NOR gate is Y = 0.
●​ If A = 1 and B = 1, the output of the NOR gate is Y = 0.

Similarly, the operation of the three-input NOR gate can be described, as


below −

●​ If A = 0, B = 0, and C = 0 the output of the NOR gate is Y = 1.


●​ If A = 0, B = 0, and C = 1 the output of the NOR gate is Y = 0.
●​ If A = 0, B = 1, and C = 0 the output of the NOR gate is Y = 0.
●​ If A = 0, B = 1, and C = 1 the output of the NOR gate is Y = 0.
●​ If A = 1, B = 0, and C = 0 the output of the NOR gate is Y = 0.
●​ If A = 1, B = 0, and C = 1 the output of the NOR gate is Y = 0.
●​ If A = 1, B = 1, and C = 0 the output of the NOR gate is Y = 0.
●​ If A = 1, B = 1, and C = 1 the output of the NOR gate is Y = 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.

NOR Gate using Transistor


We can implement the NOR gate using transistors. The circuit diagram of a
two-input NOR gate using transistors is shown in the following figure. This
circuit is known as transistor NOR gate.

Working of Transistor NOR Gate


The working of the transistor NOR gate is explained below −

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.

NOR Gate using Switches


We can also realize the NOR gate using electrical switches. A circuit diagram
for a two-input NOR gate using switches is shown in the following figure.

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.

NOR Gate as an Inverter


The NOR gate also be operated as an inverter gate. To use the NOR gate as
an inverter, all its inputs are connected together and the input signal is
applied to the common terminal as shown in the following figure.

Applications of NOR Gate


The NOR gate is used in numerous digital systems. Some common
applications of NOR gate are listed below −

●​ Various digital systems


●​ Industrial automation and control systems
●​ Traffic control systems
●​ Alarm circuits
●​ Digital arithmetic circuits like adders and subtractors, etc.

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.

What is an XOR Gate?


The XOR gate is a type of logic gate in digital electronics which has two
inputs and one output. The output of the XOR gate is high or logic 1, only
when both the inputs are different. For the same inputs, the output of the
XOR gate is low or logic 0.

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.

Logic Symbol of XOR Gate


The logic symbol of an XOR gate is shown in the following figure.

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.

Truth Table of XOR Gate


The truth table of XOR gate is a table that represents the relationship
between its inputs and output.

The truth table of an XOR gate is given below −

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.

Boolean Expression of XOR Gate


The Boolean expression is a logical function that represents the relationship
between inputs and output of an XOR gate mathematically.

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

Here, the symbol "⊕⊕" denotes the XOR operation.

Working of XOR Gate


The detailed working of XOR gate for different input combinations is
explained below −

●​ If A = 0 and B = 0, the output of the XOR gate is Y = 0.


●​ If A = 0 and B = 1, the output of the XOR gate is Y = 1.
●​ If A = 1 and B = 0, the output of the XOR gate is Y = 1.
●​ If A = 1 and B = 1, the output of the XOR gate is Y = 0.

From this explanation, we can see the output of XOR gate is high or logic 1
only when inputs are dissimilar.

XOR Gate as an Inverter


The XOR gate can also be used as an inverter. There is a property of XOR
operation that is,

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.

The following figure shows the operation of XOR gate as an inverter.

XOR Gate as a Buffer


A buffer gate is a logic gate that produces the same output as the input. It is
used to provide some delay in the input and output.

There is a property of XOR logic that is,

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.

XOR Gate using Switches


We can also implement the XOR gate logic using a battery, two simple
switches, and a lamp.

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.

If the switches A and B are at different levels, i.e., A is at 0 and B is at 1 or


A is at 1 and B is at 0. Then, we can see there is a closed path for current to
flow through the lamp, making the lamp turn on. This represents the high or
logic 1 output.

Hence, the above shown electrical circuit implements the XOR logic function.

Applications of XOR Gate


The following are some key applications of the XOR gate −

●​ XOR gate is used in computational and arithmetic circuits like adders,


subtractors, etc.
●​ XOR gate is used to detect errors, similarities and dissimilarities
between two logic levels or signals.
●​ XOR gate is used as a controlled inverter or buffer logic.

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.

The XNOR gate is also known as Exclusive-NOR or Ex-NOR gate.

Actually, the XNOR gate is a combination of two logic gates namely, XOR
gate and NOT gate. Therefore,

XNOR Gate = XOR Gate + NOT Gate

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.

Logic Symbol of XNOR Gate


The logic symbol for a two input XNOR gate is shown in the following figure.

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.

Truth Table of XNOR Gate


The truth table of an XNOR gate provides information about the operation
and relationship between inputs and output of it.

The truth table of a two-input XNOR gate is given below −

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.

Boolean Expression of XNOR Gate


The Boolean expression is a logical function that describes the relationship
between inputs and output of an XNOR gate mathematically.

The Boolean expression of a two-input XNOR gate is given below −

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.

Working of XNOR Gate


The operation of a two-input XNOR gate for different input combinations is
explained below −

●​ If A = 0 and B = 0, the output of the XNOR gate is Y = 1.


●​ If A = 0 and B = 1, the output of the XNOR gate is Y = 0.
●​ If A = 1 and B = 0, the output of the XNOR gate is Y = 0.
●​ If A = 1 and B = 1, the output of the XNOR gate is Y = 1.

Hence, we can see that the output is high or logic 1 for similar inputs. It is
low or logic 0 for dissimilar inputs.

XNOR Gate using Switches


We can realize the XNOR gate logic with the help of two switches, a battery,
and a lamp.

Here is the electrical circuit representing the XNOR logic gate.

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.

XNOR Gate as an Inverter


The XNOR gate can operate as an inverter. If we connect one of the input
lines of the XNOR gate at low or logic 0 signal and we apply the input signal
to another input line. Then, the output of the XNOR gate will be the
complement of the input applied.

The logic circuit of an XNOR gate working as an inverter is depicted in the


following figure.
We can also explain this operation with the help of its Boolean expression as
below.

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.

XNOR Gate as a Buffer


The XNOR gate can also operate as a buffer. If we connect of one of the
inputs of the XNOR gate to logic 1 and the input signal is applied to another
input line. The output of the XNOR gate will be same as the input applied,
i.e., the XNOR gate will work as a buffer.

The XNOR gate working as a buffer is shown in the following figure.

Logically, we can prove this operation through its Boolean expression as


below.

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.

Applications of XNOR Gate


The XNOR gate is widely used in numerous digital circuits and systems.
Some of the key applications of XNOR gate are given below −

●​ XNOR gate is used in digital communication systems to detect errors


that occurred during data transmission.
●​ XNOR gate acts as an equality detector. Thus, it is also used to
compare binary data or signals.
●​ XNOR gate is also used to design digital gaming systems and logic
puzzles.

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.

The unique functionality of the XNOR gate of equality detection is widely


used in digital signal comparison and data transmission error checking.

What is Boolean Algebra?


Boolean algebra is a mathematics that provides various operators and rules
to perform arithmetic and algebraic operations on binary variables and
numbers. The Boolean algebra is based on the binary number system and
logical arithmetic. Thus, it is also referred to as logical algebra.

Boolean algebra was developed by a mathematician and logician George


Boole in the year of 1847.

Today, Boolean algebra is being used as the fundamental of digital


electronics, computer systems, and information technology.

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.

The operations in Boolean algebra are based on the three fundamental


logical operations namely, AND, OR, and NOT.

Let us discuss about each of these three logical operations in detail.

Logical Operations in Boolean Algebra


The following are the fundamental logical operations that form the basis of
Boolean algebra −

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).

Boolean Function or Expression


It is a logical expression that consists of Boolean variables and values, and
logical operators like AND, OR, or NOT. It represents a logical relationship
between all the elements.

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.

Significance of Boolean Algebra in Digital Electronics


Boolean algebra plays a crucial role in building the foundation of the digital
electronics and computer science.

Here is a list of some of key factors that make Boolean algebra an important
concept in the field of digital electronics −

●​ Boolean algebra utilizes binary number system that provides a


simplified way of representing on and off states of a digital system.
Where, 0 is used to denote the off state, while 1 is used to represent
the on state of the system.
●​ Boolean algebra provides various efficient methods like K-map, QC
method, etc. to simplify complex logical operations.
●​ Boolean algebra allows to implement various arithmetic and logical
operations using simple logic gates.
●​ Boolean algebra enables us to develop switching algorithms that are
essential components in various computer networks and
communication systems.
●​ Boolean algebra provides various rules and sets of operations used in
computer programming to perform logical and decision-making
operations.
●​ Boolean algebra simplifies the data storage and transmission
processes.
●​ Boolean algebra provides a foundation for developing artificial
intelligence and machine learning technologies.

Overall, the Boolean algebra creates a fundamental structure and framework


to develop and implement various digital electronic systems and
information-based technologies. Hence, it is an important concept in the field
of digital electronics.

Advantages of Boolean Algebra


Boolean algebra has numerous advantages in the field of digital electronics.
Some key benefits of Boolean algebra are listed below −

●​ Boolean algebra provides a rich set of laws and theorems to simplify


complex logical functions so that they can implemented using a
smaller number of digital components. This simplification makes the
digital circuits significantly cost-effective, simpler to design and
implement, and low power consuming.
●​ Boolean algebra provides various tools to analyze and verify the
functionality of digital systems to meet the desired requirements.
●​ The operations based on Boolean algebra can be analyzed and
simulated using digital tools and software.
●​ Boolean algebra provides the logical foundation for programming and
software development.
●​ Boolean algebra enables us to create, analyze, and simulate the
real-world systems.
●​ Boolean algebra helps understand the working and logical
implementation of digital circuits, systems, and software.
Hence, all these advantages of Boolean algebra make it a perfect foundation
for understanding, analyzing, and designing the digital systems.

Disadvantages of Boolean Algebra


Boolean algebra is a powerful tool in terms of design and analysis of digital
systems. But it also has some disadvantages.

Here is a list of some of the major disadvantages of Boolean algebra −

●​ Boolean algebra is based on the binary number system and is best


suited for digital systems. It cannot be used in the applications where
continuous representation of information is desired.
●​ Boolean algebra is based on the true or false statements. Hence, it is
not suitable for quantitative representation of information.
●​ Boolean algebra has a limited set of logical operations like AND, OR,
and NOT.
●​ Boolean algebra becomes complex to manage in the case of large
digital systems due to a greater number of variables.
●​ Boolean algebra does not provide any mean to directly represent the
arithmetic operations such as addition, subtraction, multiplication, and
division.
●​ Boolean algebra cannot represent the analog signals or continuous
functions.
●​ Boolean algebra does not support various advanced mathematical
concepts which are required in numerous engineering and scientific
applications.

Although it has some disadvantages, Boolean algebra still forms the


foundation of digital electronics and computer science.

Applications of Boolean Algebra


Boolean algebra is a fundamental tool used in a wide range of applications in
the field of digital electronics. Some of the key applications of Boolean
algebra are listed below −

●​ Boolean algebra is used to design digital circuits and systems.


●​ Boolean algebra is used to simplify and optimize the implementation
and operation of digital circuits.
●​ Boolean algebra is used to develop logical concepts and control
structures in computer programming and software development
environment.
●​ Boolean algebra plays a vital role in the design and operation of central
processing unit or CPU of a computing system.
●​ Boolean algebra also important in the field of internet and operations
of search engines. It helps filtering the search queries to provide
accurate results.
●​ Telecommunication systems also utilize the Boolean algebra for data
routing, data communication, error detection and correction purposes.
●​ Boolean algebra plays a crucial role in optimization of computer
networks and their operation.
●​ Boolean algebra is also used to design control systems for automate
the processes in the field of robotics and industrial automation.

These are some common examples of applications of Boolean algebra.


Although, this list can extend to any number because Boolean algebra is the
foundation of digital systems and computer science.

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.

Boolean algebra is basically a tool developed to design, analyze, and


optimize the digital circuits and systems. It helps simplify the design and
implementation of digital circuits.

Boolean algebra is an important concept in the field of digital electronics,


computer programming, internet, databases, digital communication, artificial
intelligence, etc.

Laws of Boolean Algebra


All the important laws and rules of Boolean algebra are explained below −

Rules of Logical Operations


There are three basic logical operations namely, AND, OR, and NOT. The
following table highlights the rules associated with these three logical
operations −
AND Operation OR Operation NO

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

These rules of Boolean algebra can be implemented using logic gates.

AND Laws
In Boolean algebra, there are four AND laws given below −

●​ Law 1 − A · 0 = 0 (This law is called null law).


●​ Law 2 − A · 1 = A (This law is called identity law).
●​ Law 3 − A · A=A
●​ Law 4 − A · A' = 0

OR Laws
There are four OR laws described below −

●​ Law 1 − A + 0 = A (This law is called null law).


●​ Law 2 − A + 1 = 1 (This law is called identity law).
●​ Law 3 − A + A=A
●​ Law 4 − A + A' = 1

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

(ABC)D = A(BCD) = (AB)·(CD)

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

We can extend this law to any number of variables. For example,

A(BC + DE) = ABC + ADE

AB(CD + EF) = ABCD + ABEF

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)

Proof − The proof of this law is explained here,

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

Redundant Literal Rule (RLR)


Under this rule, there are two laws in Boolean algebra, which are explained
here.

Law 1 − According to this law, if we OR a variable with the AND of the


complement of the variable and another variable. Then, it is same as the OR
of the two variables, i.e.,

A + A’B = A + B

Proof − The proof of this law is explained here,

LHS = A + A’B = (A + A’)(A + B)

= 1 · (A + B) = A + B = RHS

Law 2 − According to this law, if we AND a variable with the OR of the


complement of the variable and another variable, it is equivalent to when we
AND the two variables, i.e.,

A(A’ + B) = AB

Proof − This law can be proved as follows,

LHS = A(A’ + B) = AA’ + 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

This can be proved as follows,

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

This can also be proved as follows,

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.

Advanced Boolean Theorems


1. De Morgan’s Theorem
De Morgan’s Theorems provide a way to express conjunctions and
disjunctions purely in terms of each other via negation.
●​ A.B‾A.B = A‾+B‾A+B
●​ A+B‾A+B = A‾.B‾A.B

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.

What is DeMorgan's Theorem?


DeMorgan's Theorem is a powerful theorem in Boolean algebra which has a
set of two rules or laws. These two laws were developed to show the
relationship between two variable AND, OR, and NOT operations. These two
rules enable the variables to be negated, i.e. opposite of their original form.
Therefore, DeMorgan's theorem gives the dual of a logic function.

Now, let us discuss the two laws of DeMorgan's theorem.

DeMorgan's First Theorem (Law 1)


DeMorgan's First Law states that the complement of a sum (ORing) of
variables is equal to the product (ANDing) of their individual complements.
In other words, the complement of two or more ORed variables is equivalent
to the AND of the complements of each of the individual variables, i.e.

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.

Left Side Right Side

Input Output Input

A B (A + B)' A' B'

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.

DeMorgan's Second Theorem (Law 2)


DeMorgan's second law states that the complement of the product (ANDing)
of variables is equivalent to the sum (ORing) of their individual
complements.

In other words, the complement of two or more ANDed variables is equal to


the sum of the complement of each of the individual variables, i.e.,

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.

Left Side Right Side

Input Output Input

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.

Therefore, DeMorgan's laws transforms an AND operation into an OR


operation, and an OR operation into an AND operation. This principle is
called duality.

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

false false hi-Z

false true hi-Z

true false false

true true true


A tri-state buffer is similar to a buffer, but it adds an additional "enable" input that
controls whether the primary input is passed to its output or not. If the "enable" inputs
signal is true, the tri-state buffer behaves like a normal buffer. If the "enable" input
signal is false, the tri-state buffer passes a high impedance (or hi-Z) signal, which
effectively disconnects its output from the circuit.

Tri-state buffers are often connected to a bus which allows multiple signals to travel
along the same connection.

The truth table for a tri-state buffer appears to the right.

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.

The “Tri-state Buffer”


As well as the standard Digital Buffer seen above, there is another type of
digital buffer circuit whose output can be “electronically” disconnected from its
output circuitry when required. This type of Buffer is known as a 3-State
Buffer or more commonly a Tri-state Buffer.
A Tri-state Buffer can be thought of as an input controlled switch with an
output that can be electronically turned “ON” or “OFF” by means of an
external “Control” or “Enable” ( EN ) signal input. This control signal can be
either a logic “0” or a logic “1” type signal resulting in the Tri-state Buffer being
in one state allowing its output to operate normally producing the required
output or in another state were its output is blocked or disconnected.
Then a tri-state buffer requires two inputs. One being the data input and the
other being the enable or control input as shown.

Tri-state Buffer Switch Equivalent


When activated into its third state it disables or turns “OFF” its output
producing an open circuit condition that is neither at a logic “HIGH” or “LOW”,
but instead gives an output state of very high impedance, High-Z, or more
commonly Hi-Z. Then this type of device has two logic state inputs, “0” or a “1”
but can produce three different output states, “0”, “1” or ” Hi-Z ” which is why it
is called a “Tri” or “3-state” device.
Note that this third state is NOT equal to a logic level “0” or “1”, but is an high
impedance state in which the buffers output is electrically disconnected from
the rest of the circuit. As a result, no current is drawn from the supply.
There are four different types of Tri-state Buffer, one set whose output is
enabled or disabled by an “Active-HIGH” control signal producing an inverted
or non-inverted output, and another set whose buffer output is controlled by
an “Active-LOW” control signal producing an inverted or non-inverted output
as shown below.

Active “HIGH” Tri-state Buffer

Symbol Truth Table

Enable IN OUT

0 0 Hi-Z

0 1 Hi-Z

1 0 0

Tri-state Buffer
1 1 1

Read as Output = Input if Enable is equal to “1”

An Active-high Tri-state Buffer such as the 74LS241 octal buffer, is activated


when a logic level “1” is applied to its “enable” control line and the data passes
through from its input to its output. When the enable control line is at logic
level “0”, the buffer output is disabled and a high impedance condition, Hi-Z is
present on the output.
An active-high tri-state buffer can also have an inverting output as well as its
high impedance state creating an active-high tri-state inverting buffer as
shown.

Active “HIGH” Inverting Tri-state Buffer

Symbol Truth Table

Enable IN OUT

0 0 Hi-Z

0 1 Hi-Z

1 0 1

Inverting Tri-state Buffer


1 1 0

Read as Output = Inverted Input if Enable equals “1”

The output of an active-high inverting tri-state buffer, such as the 74LS240


octal buffer, is activated when a logic level “1” is applied to its “enable” control
line. The data at the input is passes through to the output but is inverted
producing a complement of the input. When the enable line is LOW at logic
level “0”, the buffer output is disabled and at a high impedance condition, Hi-Z.
The same two tri-state buffers can also be implemented with an active-low
enable input as shown.

Active “LOW” Tri-state Buffer

Symbol Truth Table


Enable IN OUT

0 0 0

0 1 1

1 0 Hi-Z

Tri-state Buffer
1 1 Hi-Z

Read as Output = Input if Enable is NOT equal to “1”

An Active-low Tri-state Buffer is the opposite to the above, and is activated


when a logic level “0” is applied to its “enable” control line. The data passes
through from its input to its output. When the enable control line is at logic
level “1”, the buffer output is disabled and a high impedance condition, Hi-Z is
present on the output.

You might also like