uk.ac.man.cs.rainbow.simulator.rasm
Class Or
java.lang.Object
|
+--uk.ac.man.cs.rainbow.simulator.Instruction
|
+--uk.ac.man.cs.rainbow.simulator.RASM.BinaryLogicFunction
|
+--uk.ac.man.cs.rainbow.simulator.rasm.Or
- All Implemented Interfaces:
- Serializable
- public class Or
- extends RASM.BinaryLogicFunction
Bitwise/logical (inclusive) or. Can take any enumerable value as
input, and generates integer output, unless both inputs
were boolean values, in which case it generates boolean output.
x y
x|y
- See Also:
- Serialized Form
Method Summary |
protected boolean |
execute(boolean x,
boolean y)
Perform a logical binary operation over booleans. |
protected int |
execute(int x,
int y)
Perform a logical binary operation over integers (bit-wise). |
String |
toString()
|
Or
public Or()
Or
public Or(RASMCode code)
toString
public String toString()
- Overrides:
toString
in class Object
execute
protected int execute(int x,
int y)
- Description copied from class:
RASM.BinaryLogicFunction
- Perform a logical binary operation over integers (bit-wise).
- Overrides:
execute
in class RASM.BinaryLogicFunction
- Following copied from class:
uk.ac.man.cs.rainbow.simulator.RASM.BinaryLogicFunction
- Parameters:
x
- The first (lower on the stack) value argument.y
- The second (higher on the stack) value argument.- Returns:
- The result of the operation.
execute
protected boolean execute(boolean x,
boolean y)
- Description copied from class:
RASM.BinaryLogicFunction
- Perform a logical binary operation over booleans.
- Overrides:
execute
in class RASM.BinaryLogicFunction
- Following copied from class:
uk.ac.man.cs.rainbow.simulator.RASM.BinaryLogicFunction
- Parameters:
x
- The first (lower on the stack) value argument.y
- The second (higher on the stack) value argument.- Returns:
- The result of the operation.