0% found this document useful (0 votes)
17 views

Xor Gate

Uploaded by

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

Xor Gate

Uploaded by

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

FACULTY OF NATURAL, APPLIED AND HEALTH SCIENCES

DEPARTMENT: COMPUTING

COURSE TITLE: DIGITAL LOGIC DESIGN

COURSE CODE: CMP 223

COURSE LECTURER: Dr. ABIODUN MUSTAPHA


XOR Gate

Group 1

Group Members

MATTHEW ESTHER – AUL/CMP/22/125


FENIBO SOPIRIBI – AUL/CMP/22/040

RAJI AMOTO – AUL/CMP/22/042

AKPAN NNAMNSO – AUL/CMP/22/112

ADAH ELIJAH – AUL/CMP/22/002

OLUBUSORO JUDE - AUL/CMP/22/070

TANIMOJO ALBERT - AUL/CMP/22/084

CHIGOZIE THOMAS - AUL/CMP/22/086

OLAPEGBA ENIOLUWA - AUL/CMP/22/067

DAVID OJO - AUL/CMP/22/059

AUSTIN JERRY - AUL/CMP/22/023

EZIRIM KINGDOM - AUL/CMP/22/093

GIDEON AYODEJI - AUL/CMP/22/105

AKINTOLA NINIOLA - AUL/CMP/22/017

BALOGUN TOLUWANIMI - AUL/CMP/22/025

EZEAMAMAH JOSHUA - AUL/CMP/22/037

XOR Gate: An XOR gate also referred to as exclusive OR gate is a


digital logic gate that outputs true or high only when the inputs differ
from one another. In simpler terms;

 If both inputs are “False” (same inputs), the output is “False”.


 When one input is “True” and the other is “False” (different inputs),
the output is “True”.
 When both inputs are “True” (same inputs), the output is “False”.
it gives a true output, or 1, if either, but not both, of its two inputs are
true. If both inputs are the same, whether 0 or 1, the output is false, or
0

In Boolean algebra, the XOR operation is also known as the exclusive


disjunction. The symbol for XOR gate is represented by a plus sign
enclosed within a circle (⊕) which visually indicates the exclusive OR
operation.

The boolean algebra expression for XOR gate is;

F = A BI + A I B = A ⊕ B

Where;

F is the ouput,

A and B are the inputs

CHARACTERISTICS OF AN XOR GATE

 XOR Gate takes two binary inputs (0 or 1).

 Outputs 1 only if exactly one of the inputs is 1.

 Outputs 0 (FALSE) if both inputs are 0 or both are 1.

 Represented by a barred plus symbol (⊕).

 Can be built from other logic gates like NAND or NOR gates
(considered "universal gates" as any logic function can be built
from them).

TYPES OF AN XOR GATE

1. 2- Input XOR Gate: This is the simplest XOR gate. It is a two-input

The Boolean expression for a two input XOR gate is, F = A ⊕ B.


digital circuit that outputs a logical “1” if the two input values differs.
TWO INPUT TRUTH TABLE OF AN XOR GATE

A B F
0 0 0
0 1 1
1 0 1
1 1 0

2. 3-input XOR Gate: A 3-input XOR gate takes three binary inputs
and produces a single output. The XOR operation evaluates to true (1)
when an odd number of inputs are true (1), and false (0) otherwise.
The 3-input XOR gate follows the same logic as a two input XOR gate
but with three input signals.
The Boolean expression for a three input XOR gate is, F = A ⊕ B ⊕ C.
THREE INPUT TRUTH TABLE OF AN XOR GATE

A B C F
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1

3. 4-input XOR Gate: This type of XOR gate has four inputs and one
output. The output is high if an odd number of inputs are high, and low

three input XOR gate is, F = A ⊕ B ⊕ C ⊕ D.


if an even number of inputs are high. The Boolean expression for a
FOUR INPUT TRUTH TABLE OF AN XOR GATE
A B C D F
0 0 0 0 0
0 0 0 1 1
0 0 1 0 1
0 0 1 1 0
0 1 0 0 1
0 1 0 1 0
0 1 1 0 0
0 1 1 1 1
1 0 0 0 1
1 0 0 1 0
1 0 1 0 0
1 0 1 1 1
1 1 0 0 0
1 1 0 1 1
1 1 1 0 1
1 1 1 1 0

ADVANTAGES OF AN XOR GATE

 Simple design: XOR gates have a relatively simple internal


structure compared to some other logic gates. This makes them
easier to manufacture and can lead to lower power consumption.
 Versatility: XOR gates have a wide range of applications beyond
just basic comparison. They are used in error detection, data
encryption, arithmetic operations, signal generation, and various
logic functions.
 Fundamental building block: XOR gates are considered
essential components for building more complex circuits. They
play a crucial role in half-adders and full-adders, which are the
foundation for binary addition.
 Non-inverting: Unlike some gates like NOT, XOR gates don't
simply invert the input. This allows them to perform a wider
range of operations without additional logic.
 Commutative and associative: The order of inputs doesn't
affect the output (commutative), and multiple XOR gates can be
chained together while maintaining the same result (associative).
These properties simplify circuit design.

DISADVANTAGES OF AN XOR GATE

 Limited functionality as a single gate: While versatile, on its


own, an XOR gate only performs a specific comparison operation.
More complex logic might require combining them with other
gates.
 Potential for higher fan-out (depending on
implementation): Fan-out refers to the number of outputs a
gate can drive without affecting its performance. In some
implementations, XOR gates might have lower fan-out compared
to simpler gates like AND or OR.
 Increased complexity in larger circuits: While fundamental,
using many XOR gates in a complex circuit can lead to increased
design complexity and potentially require more chip space or
resources.

SIMULATION OF A THREE INPUT XOR GATE USING PROTEUS


Here the inputs are x=0, y =0, z = 0;

Using an XOR truth table,

0+0=0

0+1=1

∴F=1

Therefore the led- blue will turn on indicating the output is 1.


Here the inputs are x=0, y =0, z = 1;

Using an XOR truth table,

0+0=0

0+1=1

∴F=1

Therefore the led- blue will turn on indicating the output is 1.


Here the inputs are x=0, y =1, z = 0;

Using an XOR truth table,

0+1=1

1 + 0 = 1,

∴F=1

Therefore the led- blue will turn on indicating the output is 1.


Here the inputs are x=0, y =1, z = 1;

Using an XOR truth table,

0+1=1

1 + 1 = 0,

∴F=0

Therefore the led- blue will turn off indicating the output is 0.
Here the inputs are x=1, y =0, z = 0;

Using an XOR truth table,

1+0=1

1 + 0 = 1,

∴F=1

Therefore the led- blue will turn on indicating the output is 1.


Here the inputs are x=1, y =0, z = 1;

Using an XOR truth table,

1+0=1

1 + 1 = 1,

∴F=0

Therefore the led- blue will turn off indicating the output is 0.
Here the inputs are x=1, y =1, z = 0;

Using an XOR truth table,

1+1=0

0 + 0 = 0,

∴F=0

Therefore the led- blue will turn off indicating the output is 0.
Here the inputs are x=1, y =1, z = 1;

Using an XOR truth table,

1+1=0

0 + 1 = 1,

∴F=1

Therefore the led- blue is on indicating the output is 1.

Applications of an XOR Gate


There are numerous applications of the XOR gate. A few of them
outlined below:

 An XOR gate can be used as a one-bit adder that adds any of the
two bits together to produce one bit as output. For instance, if we
add 1 plus 1 in binary, we can expect a two-bit answer, as 10 (it
means 2 in decimal).
 In computer memory systems, XOR gates can be used for
address decoding. By combining address lines using XOR
operations, specific memory locations can be selected, enabling
efficient memory access in systems with multiple memory
modules.
 In digital communication systems, XOR gates are used for error
detection and correction. By comparing corresponding bits in
transmitted and received data streams using XOR operations,
errors can be identified and corrected.

 Since an XOR gate can generate a logic '1' output (when its 2
input bytes are unequal). In this case, it can be used in dealing
with a basic logic comparator. A Basic logic comparator is
a combinational logic circuit that compares the magnitudes of
two binary quantities to determine which one has the greater
magnitude. In other word, a comparator determines the
relationship of two binary quantities.
 XOR logic acts as a simple system for encrypting and decrypting
data, i.e., performing an XOR of a digitized message with a binary
key produces encrypted ciphertex (encrypted text transformed
from plaintext using an encryption algorithms). Hence, XOR gates
are a fundamental building block of cryptographic circuit.
 XOR gate is mainly used in the operation of half and full adders.
 The concept of XOR gate is also used in the implementation of
microprocessors and circuits for digital signal processing.
 XOR gates are essential components in the design of various
digital circuits, such as adders, subtractors, multiplexers, and flip-
flops. They are used to perform arithmetic operations, implement
control logic, and realize sequential circuits in digital systems.
 In digital systems with multiple clock domains, XOR gates are
used for clock domain crossing synchronization. By XORing the
clocks from different domains and feeding the result to
synchronization elements, such as flip-flops, data transfers
between the domains can be synchronized to prevent timing
violations.

 XOR gates can be used to create simple phase inverters in audio


circuits. By XORing the original audio signal with a copy inverted
by 180 degrees (phase shift), the output cancels out common
components and can create interesting audio effects.

 In computer memory systems, XOR gates can be used for


address decoding. By combining address lines using XOR
operations, specific memory locations can be selected, enabling
efficient memory access in systems with multiple memory
modules.

You might also like