2023-07-01 11:58:00 -04:00
|
|
|
import extensions;
|
|
|
|
|
|
|
|
|
|
extension testOp
|
|
|
|
|
{
|
|
|
|
|
bitwiseTest(y)
|
|
|
|
|
{
|
2023-09-01 09:35:06 -07:00
|
|
|
console.printLine(self," and ",y," = ",self & y);
|
|
|
|
|
console.printLine(self," or ",y," = ",self | y);
|
|
|
|
|
console.printLine(self," xor ",y," = ",self ^ y);
|
|
|
|
|
console.printLine("not ",self," = ",self.BInverted);
|
2023-07-01 11:58:00 -04:00
|
|
|
console.printLine(self," shr ",y," = ",self.shiftRight(y));
|
|
|
|
|
console.printLine(self," shl ",y," = ",self.shiftLeft(y));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public program()
|
|
|
|
|
{
|
|
|
|
|
console.loadLineTo(new Integer()).bitwiseTest(console.loadLineTo(new Integer()))
|
|
|
|
|
}
|