The execute_op function is called whenever we need to operate on two integers (not signals). Transforming to our set of gates is limiting us to perform some operations, and is not really needed, we could operate any opcode directly.
/// Executes an operation, performing the specified arithmetic or logical computation.
pub fn execute_op(lhs: &u32, rhs: &u32, op: &ExpressionInfixOpcode) -> u32 {
match op {
...
}
}
The
execute_op
function is called whenever we need to operate on two integers (not signals). Transforming to our set of gates is limiting us to perform some operations, and is not really needed, we could operate any opcode directly.