From the source code below,
What does x^0x1
do?
What rules do I not know?
if( 0 != ( x ^ 0x1 ) )
encode( x, m );
0x1
means hex 1
.
If you look at the truth table of the XOR operation,
You can see that xor 1 returns true if x is 0, and false if x is 1.
In other words, (x^0x1)
checks whether x is 0 or not
In other words, (x^0x1)
= (x!=1)
.
You have to see the whole code It seems like a difficult code on purpose.
© 2024 OneMinuteCode. All rights reserved.