Pages

Tuesday, June 16, 2015

Difference between Bitwise OR and Exclusive OR

Difference between Bitwise OR and Exclusive OR

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

No comments:

Post a Comment