adds 2-input operation types
state and op_type are shared among instances