+ 5

What is difference between Bitwise exclusive 'OR' and bitwise 'OR'

20th Jun 2019, 5:22 PM
Harsha
Harsha - avatar
4 Answers
+ 11
Bitwise OR returns true if either one of the bits are 1, including the case that both of them are 1 Bitwise XOR will return true only if 1 of the bits are 1, returning false for any other condition
20th Jun 2019, 5:31 PM
Faisal
Faisal - avatar
+ 5
The difference between Bitwise OR and Bitwise XOR is : Bitwise OR returns True(1) if any one bit out of two is "1" or else it will return False(0). It is denoted by symbol "|". TRUTH TABLE OF BITWISE "OR" : ---------------------------------------------------- x y x | y ------------------------- 0 0 0 1 0 1 0 1 1 1 1 1 Bitwise XOR returns True(1) if the two bits are different or else it will return False(0). It is denoted by symbol "^". TRUTH TABLE FOR BITWISE "XOR" : -------------------------------------------------------- x y x^y ------------------------- 0 0 0 1 0 1 0 1 1 1 1 0 I hope u have got it......
1st Jul 2019, 1:32 PM
Kiran Deep Naidu
Kiran Deep Naidu - avatar
+ 4
Similar to the difference between logical XOR and logical OR except that the concept is applied to bits.
21st Jun 2019, 2:05 AM
Sonic
Sonic - avatar
+ 1
Kiran Deep Naidu thanks 😘
24th Jul 2021, 9:46 AM
Avishek Silwal
Avishek Silwal - avatar