in reply to Bitwise Operators - &^
Says who? The exclusive or of two bit patterns contains a one for each mismatch pair of bits and a zero for each matched pair. Thus for 155 and 105:
The fun thing about XOR is that if you XOR the result with one of the input values, you get the other input value back:# 1001 1011 - 155 # 0110 1001 - 105 # 1111 0010 - 242
Thus various encryption schemes (and some fun graphics programming on early PCs :)# 1001 1011 - 155 # 1111 0010 - 242 # 0110 1001 - 105
|
---|