Professional Documents
Culture Documents
XOR gates are expensive to implement in silicon, but they are very useful for circuits like parity checkers and arithmetic circuits (e.g., adders, subtractors, and so forth). Sometimes, we can find an XOR gate hidden or buried inside of a lot of AND, OR and NOT gates. If we can find and extract the XOR gate, we can take advantage of it to get a large savings in circuit size. Recall truth tables for XOR and NXOR These gates perform the odd and even functions, respectively (with 2-inputs, they perform the difference or equivalence functions, respectively).
Page 1
Page 2
Page 3
x1x2 x3x4 00 01 11 10
00 0 1 0 1
01 1 0 1 0
11 0 1 0 1
10 1 0 1 0
x1x2 x3x4 00 01 11 10
00 1 0 1 0
01 0 1 0 1
11 1 0 1 0
10 0 1 0 1
Page 4
00 0 1 0 1
01 1 0 1 0
11 0 1 0 1
10 0 1 0 1
The first equation above is the minimum Sum-Of-Products 6 AND gates (2, 4-input, 4, 3-input) and 1 OR gate (6 inputs).
ECE124 Digital Circuits and Systems Page 5
x1x2 x3x4 00 01 11 10
00 0 1 0 1
01 1 0 1 0
11 0 1 0 1
10 0 1 0 1
Page 6
We can see what is happening with the XOR by drawing the K-Maps for x1, x2, x3, x4 and overlaying them We are taking advantage of the XOR odd property.
x1x2 x3x4 00 01 11 10 x1x2 x3x4 00 01 11 10
x1x2 x3x4 00 01 11 10
x1x2 x3x4 00 01 11 10
00 0 0 1 1
01 0 0 1 1
11 0 0 1 1
10 0 0 1 1
00 0 1 1 0
01 0 1 1 0
11 0 1 1 0
10 0 1 1 0
00 0 0 0 0
01 1 1 1 1
11 0 0 0 0
10 0 0 0 0
00 0 1 0 1
01 1 0 1 0
11 0 1 0 1
10 0 1 0 1
Page 7
XOR Summary
In general, finding and extracting XOR gates is a complicated and hard problem. When we can write a function as the XOR of a bunch of Product Terms (ANDs), we are finding not Sum-Of-Products, but rather Exclusive Sum-Of-Products (ESOP).
Page 8
The input x3 is acting like a gating signal, preventing the XOR from affecting the output when it shouldnt (we can gate signals with ANDs).
Page 9