How to write a boolean function using only XOR and NOT gates?

Thread Starter

thermistor

Joined Mar 6, 2013
4
Can we represent the boolean function of a truth table using only XOR and NOT? And if so, how can this be done? Is there any technique or algorithm?

Thanks
 
Last edited:

WBahn

Joined Mar 31, 2012
30,058
Can we represent the boolean function of a truth table using only XOR and NOT? And if so, how can this be done? Is there any technique or algorithm?

Thanks
Is the question asking if you can represent ANY boolean function using only XOR and NOT? Or is it asking about a SPECIFIC boolean function?
 

Thread Starter

thermistor

Joined Mar 6, 2013
4
Is the question asking if you can represent ANY boolean function using only XOR and NOT? Or is it asking about a SPECIFIC boolean function?
It asks for a specific function:
Rich (BB code):
A'B'C'+A'BC+AB'C'+AB'C
Where X' means negation of X and + means OR
 

WBahn

Joined Mar 31, 2012
30,058
It asks for a specific function:
That's good, because, in general, you can't code an arbitrary boolean function using only XOR (the NOT is extraneous because you CAN make a NOT out of an XOR).

What you need to do is try to rewrite your boolean function into combinations of the form (A'B+AB') or (AB+A'B'). The former is an XOR and the latter is an XNOR, which is an XOR with any odd number of inputs/outputs inverted.

If you are familiar with Karnaugh maps, those can help you identify the XOR/XNOR relationships.
 

Thread Starter

thermistor

Joined Mar 6, 2013
4
I have tried to find a solution. I have tried to use http://www.eetimes.com/design/programmable-logic/4015081/Logic-101--Part-3--Reed-Muller-Logic/
in order to find a checkboard pattern in order to solve it but I have not found something. Can you help me find if this problem has solution in order not to try without purpose? I give the full truth table of the function that should be written using only NOT and EXOR gates.

INPUTS OUTPUT
A B C | E
--------------------
0 0 0 1
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 0

What I have found is that the upper half table is B XNOR C (1) and the other
half A XOR B (2). But I can't find a way to tell if A=0 use function (1) else function (2).
 

WBahn

Joined Mar 31, 2012
30,058
I could be wrong, but I don't think that function can be done using XOR gates. I don't think there is the necessary antisymmetry across the mid line.

If it turns out that it can be done, please post the solution once you know it.
 

Thread Starter

thermistor

Joined Mar 6, 2013
4
I could be wrong, but I don't think that function can be done using XOR gates. I don't think there is the necessary antisymmetry across the mid line.

If it turns out that it can be done, please post the solution once you know it.
This subject was given in the entry examination for the National School of Public Administration. So I do not have the answer. I asked some other contenstants and they told me that they could not find a solution. So I suspect it is wrong too. I was just trying to solve it in order to confirm this fact. After spending a day to solve it and considering your answer, I give up. Thanks for your help.
 

WBahn

Joined Mar 31, 2012
30,058
I was wondering if it shouldn't have been:

A'B'C'+A'BC+AB'C'+AB'C'

MrChips caught a typo above. I meant:

A'B'C'+A'BC+AB'C'+ABC

Which would be

A'(B'C'+BC)+A(B'C'+BC)

A XOR (B XNOR C)
 
Last edited:

WBahn

Joined Mar 31, 2012
30,058
This subject was given in the entry examination for the National School of Public Administration. So I do not have the answer. I asked some other contenstants and they told me that they could not find a solution. So I suspect it is wrong too. I was just trying to solve it in order to confirm this fact. After spending a day to solve it and considering your answer, I give up. Thanks for your help.
National School of Public Administration?

What kind of school is this? What is meant by "Public Administration"? Here, that term generally refers to government bureaucrats of one ilk or another. A foundation in logic, of any sort, is generally not high on their list of core competencies. But I'm guessing that it has a broader meaning where you are.
 
Top