Write a program that accepts two unsigned 32-bit integers, start
and end
. Your program should calculate a sequence of specific bitwise operations that, when applied to start, result in end.
- Left shift (
<<
): Shift the current value one bit to the left. - Bitwise AND (
&
): Perform the bitwise AND of the current value and end. - Custom bitwise OR (
|
): Perform the bitwise OR of the current value and the number 2. - Custom bitwise XOR (
^
): Perform the bitwise XOR of the current value and the result ofend % <CURRENT_VALUE>
. - Bitwise NOT (
~
): Perform the bitwise NOT of the current value.