XOR operand distinction

  • Context: High School 
  • Thread starter Thread starter ollieha
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
5 replies · 290 views
ollieha
Messages
2
Reaction score
0
TL;DR
How do you tell which side of an XOR wins?
Hi!

I was wondering if there’s a systematic way to find out which operand of an XOR is true?
 
Physics news on Phys.org
Not directly because the operation is symmetric: it provides the same result for 0^1 and 1^0 (where the caret is the xor operator).

However, you can construct a more complicated expression that does what (I think) you're looking for. Try A&(A^B), which will be one or zero according to whether A or B was the "winner" when A and B are different.
If they're not different there is no "winner" and this expression will evaluate to zero indicating that A didn't win; and likewise B&(A^B) will indicate that B didn't win either.
 
You could just look at the truth value of each bit directly? Why pass it through a symmetric logic gate and make things harder for yourself?
 
Reply
  • Like
Likes   Reactions: pbuk
ollieha said:
I was wondering if there’s a systematic way to find out which operand of an XOR is true?
## A \overline B ## is as good as you will get IMO.
You might also have to test for ## \overline A B ## to exclude the ## \overline {AB} ## and ## AB ## states. Which binary result do you want?
You might look up Karnaugh maps for this sort of question.
 
Last edited:
ollieha said:
I was wondering if there’s a systematic way to find out which operand of an XOR is true?

You can find out if an operand is true by looking at it. If this does not answer your question you need to provide more context.
 
If A,B aren't accessible you can still know the Tac Tbc delays ( C = A XOR B )
In that case recording the transitions you can estimate which transition has caused C 0-> 1
This works only on real systems.

The system can be "observable" also if not "directly observable"