ID 39625.
XOR
Темы:
Number systems
Different number systems
Exclusive "or" (XOR) is a Boolean function, as well as a logical and bitwise operation on two arguments, the result of which is true if and only if one of the arguments is true and the second is false.
Circular bit shift to the right - an operation in which the least significant digit is transferred to the beginning of the number and becomes the most significant, and all the rest are shifted to the right by one position.
To two 16-bit numbers A and B, written in hexadecimal notation, the exclusive "or" operation was applied, and then to the result - the operation of a bitwise circular shift to the right by K bits. One of the two original numbers has been forgotten and needs to be restored.
Input
the numbers A, K and the result X are written into the string, separated by a space. The numbers A and X are given in the hexadecimal number system, K - in decimal.
Imprint
B number.
Examples
# |
Input |
Output |
1 |
1A2B 4 4E5D |
FFFF |
2 |
AB00 1 5C9A |
1234 |
|