|
-
May 21st, 2013, 05:20 AM
#7
Re: Logical XOR in C/C++?
 Originally Posted by NMTop40
your best way to do it would be
(!b1 ^ !b2)
where b1 and b2 are expressions.
This does not implement XOR. Try substituting b1<-0, b2<-0
You can also see it in the xor karnaugh map which cannot be simplified
simplest way is to use bitwise ^ or (!b1&&b2)||(b1&&!b2)
cheers!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|