Upload
jasper-dickerson
View
225
Download
0
Embed Size (px)
DESCRIPTION
3 XOR and XNOR (Cont.) Uses for the XOR and XNORs gate include: Adders/subtractors/multipliers Counters/incrementers/decrementers Parity generators/checkers Definitions The XOR function is: The eXclusive NOR (XNOR) function, otherwise known as equivalence is: Strictly speaking, XOR and XNOR gates do no exist for more that two inputs. Instead, they are replaced by odd and even functions. YXYXYX YXYXYX Created by: Ms.Amany AlSaleh
Citation preview
CS151Introduction to Digital Design
Chapter 2: Combinational Logic Circuits
2-9 Exclusive-OR Operator and Gates
1Created by: Ms.Amany AlSaleh
2
Exclusive-OR and Exclusive-NOR Circuits
The eXclusive OR (XOR) function is an important Boolean function used extensively in logic circuits.
The XOR function may be;• implemented directly as an electronic circuit (truly a gate)
or• implemented by interconnecting other gate types (used
as a convenient representation) The eXclusive NOR function is the complement of
the XOR function By our definition, XOR and XNOR gates are
complex gates.
Created by: Ms.Amany AlSaleh
3
XOR and XNOR (Cont.) Uses for the XOR and XNORs gate include:
• Adders/subtractors/multipliers• Counters/incrementers/decrementers• Parity generators/checkers
Definitions• The XOR function is: • The eXclusive NOR (XNOR) function, otherwise
known as equivalence is: Strictly speaking, XOR and XNOR gates do no exist
for more that two inputs. Instead, they are replaced by odd and even functions.
YXYXYX
YXYXYX
Created by: Ms.Amany AlSaleh
4
Exclusive-OR Circuit Exclusive-OR (XOR) produces a HIGH output whenever the
two inputs are at opposite levels. The XOR function means:
X OR Y, but NOT BOTH
Created by: Ms.Amany AlSaleh
5
Exclusive-OR Circuit XOR function can also be implemented with AND/OR gates
(also NANDs).
Created by: Ms.Amany AlSaleh
6
Exclusive-NOR Circuits Exclusive-NOR (XNOR) produces a HIGH output whenever the
two inputs are at the same level. Why is the XNOR function also known as the equivalence
function?
Created by: Ms.Amany AlSaleh
7
XOR/XNOR (Cont.) The XOR function can be extended to 3 or more
variables. For more than 2 variables, it is called an odd function or modulo 2 sum (Mod 2 sum), not an XOR:
The complement of the odd function is the even function.
The XOR identities: X1XX0X 1XX0XX
XYYX ZYX)ZY(XZ)YX(
ZYXZYXZYXZYXZYX
Created by: Ms.Amany AlSaleh
8
XOR/XNOR (Cont.)• 3-input exclusive-OR (XOR) logic gate:
• F= X Y Z
Fxyz
xF
zy
X Y Z F
0 0 0 00 0 1 10 1 0 10 1 1 01 0 0 11 0 1 01 1 0 01 1 1 1
Created by: Ms.Amany AlSaleh
9
Odd and Even Functions What about the case of more than 2 variables? A B C = (AB’ + A’B) C’ + (AB + A’B’) C
= AB’C’ + A’BC’ + ABC + A’B’C
This function is equal to 1 only if one variable is equal to 1 or if all three variables are equal to 1. This implies that an odd number of variables must be one. This is defined as an odd function.
• F is the logical sum of the four minterms having an index with an odd number of 1’s F is called an odd function
• The other four minterms not included are 000, 011, 101 and 110, they have an index with even number of 1’s F’ is called an even function.
The complement of an odd function is an even function. In general, an n-variable exclusive-OR function is an odd
function defined as the logical sum of the 2n/2 minterms whose binary index have an odd number of 1’s.
100 010 001111
Created by: Ms.Amany AlSaleh
10
Odd and Even Functions (Cont.) Map for 3-variable XOR function.
Minterms are said to be distance 2 from each other.
Created by: Ms.Amany AlSaleh
11
Odd and Even Functions (Cont.) Map for 3- and 4- variable XOR functions.
Created by: Ms.Amany AlSaleh
12
Example: Odd Function Implementation
Design a 3-input odd function F = X Y Zwith 2-input XOR gates
Factoring, F = (X Y) Z The circuit:
XY
ZF
Created by: Ms.Amany AlSaleh
13
Example: Even Function Implementation
Design a 4-input even function F = (W X Y Z)’with 2-input XOR and XNOR gates
Factoring, F = ( (W X) (Y Z) )’ The circuit:
WX
YF
Z
Created by: Ms.Amany AlSaleh
14
Odd and Even Functions Why?
• Implementation feasibility and low cost• Power in implementing Boolean functions• Convenient conceptual representation
Gate classifications• Primitive gate - a gate that can be described using a single
primitive operation type (AND or OR) plus an optional inversion(s).
• Complex gate - a gate that requires more than one primitive operation type for its description
Primitive gates will be covered first
Created by: Ms.Amany AlSaleh