Download presentation
Presentation is loading. Please wait.
Published byJasper Dickerson Modified over 9 years ago
1
CS151 Introduction to Digital Design Chapter 2: Combinational Logic Circuits 2-9 Exclusive-OR Operator and Gates 1Created by: Ms.Amany AlSaleh
2
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
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
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
5 Exclusive-OR Circuit XOR function can also be implemented with AND/OR gates (also NANDs). Created by: Ms.Amany AlSaleh
6
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
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
8 XOR/XNOR (Cont.) 3-input exclusive-OR (XOR) logic gate: F= X Y Z F x y z x F z y XYZF 0000 0011 0101 0110 1001 1010 1100 1111 Created by: Ms.Amany AlSaleh
9
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 2 n /2 minterms whose binary index have an odd number of 1’s. 100 010 001111 Created by: Ms.Amany AlSaleh
10
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
11 Odd and Even Functions (Cont.) Map for 3- and 4- variable XOR functions. Created by: Ms.Amany AlSaleh
12
12 Example: Odd Function Implementation Design a 3-input odd function F = X Y Z with 2-input XOR gates Factoring, F = (X Y) Z The circuit: X Y Z F Created by: Ms.Amany AlSaleh
13
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: W X Y F Z Created by: Ms.Amany AlSaleh
14
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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.