Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

The GNU C Programming Tutorial - Bitwise exclusive OR (XOR/EOR)

Node:Bitwise exclusive OR (XOR/EOR), Next:, Previous:Bitwise inclusive OR, Up:Truth tables and bit masks



Bitwise exclusive OR (XOR/EOR)

Bitwise XOR operates on two values, for example 0 ^ 1. The result is 1 if the first value or the second value is 1, but not if both are 1 (hence the name "exclusive OR"). As a truth table this would be summarized as follows:

value1 value2 result
0 0 0
0 1 1
1 0 1
1 1 0

 
 
  Published under free license. Design by Interspire