XOR - The magical bitwise operatorby@maazrk
138,324 reads

XOR - The magical bitwise operator

March 1st 2021
3 min
by @maazrk 138,324 reads
tldt arrow
EN
Read on Terminal Reader🖨️

Too Long; Didn't Read

The magical bitwise operator - XOR - provides new approaches you never knew existed to solve a particular problem. In this article, we will discuss about the magical powers of XOR bitwise. XOR returns 1 only if exactly one bit is set to 1 out of the two bits in comparison ( Exclusive OR) The only way you can totally understand how the above solution is working is by trying it out for different binary numbers on a piece of paper. The biggest hint you have is you can do it using ( ^ ) operator. To solve this problem, you need to know a property of binary subtraction.

Company Mentioned

Mention Thumbnail
featured image - XOR - The magical bitwise operator
react to story with heart

RELATED STORIES

L O A D I N G
. . . comments & more!
Hackernoon hq - po box 2206, edwards, colorado 81632, usa