Description:
Calculate bitwise XOR and get the number of 1s in complement of the result in binary.
Syntax:
bit1(x,y)
Note:
The function calculates bitwise XOR on x and y, returns the result, and then gets the number of 1s in complement of the result in binary.
When both x and y are sequences, calculate bitwise XOR on them, return result as a sequence, and then find the total number of 1’s in complements of the result sequence’s all members in binary.
Parameter:
x |
A long integer or a sequence of long integers. |
y |
A long integer or a sequence of long integers. |
Return value:
Integer
Example:
|
A |
|
1 |
=bit1(6,11) |
Return 3. |
2 |
=[3,5,4] |
|
3 |
=[8,6,7] |
|
4 |
=bit1(A2,A3) |
Return 7. |