You are here

Question on Logic | Cypress Semiconductor

Question on Logic

I was looking at the datasheet for the PSoC3/5 XOR gate and from its truth table it implements the following

        F = (A × !B × !C) + (!A × B × !C) + (!A ×!B × C) + (A × B × C)

 This is not a XOR function.  It is a Odd function and is quite popular for determining polarity.

 A true XOR is true only when one and one of the inputs is high (that's the exclusive part) and it implements as such.

       F = (A × !B × !C) + (!A × B × !C) + (!A ×!B × C)

 Now there are only two cases where they are equivalent.

1  A two input Odd gate is equivalent to a two input XOR gate.

2  A single input Odd gate, a single input XOR gate, and a digital buffer are all equivalent.

 

Now I am prepared to hear arguments on the error of my thinking if any of you have one.

Comments

hli's picture

The XOR function is associative. So A xor B xor C (the function above) is the same as (A xor B) xor C=A xor (B xor C). When all are true, this gives us (1 xor 1) xor 1 = (0) xor 1 = 1. The function you are seeking (number-of-1-bits==1) is not associative, and is not considered a core boolean function. All core boolean operations are associative.

Stub for 6132621's picture

A core boolean operation has only one or two inputs. I will agree you that the function you call is XOR is associative but it is not a XOR function. It is a parity odd function. An exclusive or means of one input high a a time. So the true XOR function is not associative.

hli's picture

Actually I checked Wikipedia (and some other sources) before my post, and they seem to agree with me :-) All core boolean operation are associative, and this property can be used to form versions with more than 2 inputs. If you take the core XOR function, and use it to derive one with 3 inputs, you get the above one. It might be that you learned it that way, but the rest of the world doesn't seem to agree with you...

ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.