Swift: Advanced operator – bitwise XOR operator

Swift provides XOR ( ^ ) operator which compares two numbers and returns a new number in which the bits are set to 1 when the corresponding bits in the numbers are not equal and bits are set to 0 when the bits in those numbers are same.

Leave a Reply