Difference between Bitwise OR and Exclusive OR
Bitwise Or
Bitwise Or
- Takes 2 patterns of equal length and performs the logical inclusive OR operation
- forces a bit to be set ON in a sequence where corresponding mask bit is one
- Example
- 0101(5)
- 0011(3)
- 0111(7) // Output
- Returns XOR logical Exclusive OR outputs true when both inputs differ
- Truth Table
- 0 0 0
- 0 1 1
- 1 0 1
- 1 1 1
No comments:
Post a Comment