logic, arithmetic shift, rounding and optimization