Where x and y are integer type int, request can only be used! ~ & amp; ^ | + & lt; <> These operators, the most used 24 operator,
And can only use the order structure, cannot use the if, while, for, etc., can't call any functions, cannot use casts,
CodePudding user response:
Return (((a - b) & gt;> 31) & amp; 0 x1) | (! (a ^ b))CodePudding user response:
- if not to use, look at the inside of the circuit subtracter, is an operation,CodePudding user response:
! ((y + (~ x + 1)) & gt;> 31)CodePudding user response:
Return the x & lt;=y;CodePudding user response:
DirectReturn the x & lt;=y? 1:0;
Is the most simple,
So it is not necessary to use! ~ & amp; ^ | + & lt; <> These operators
CodePudding user response:
I think the formula of 3 floor very rightConstructs the subtraction, and then constructs the expression of greater than zero
CodePudding user response:
Many people didn't notice the two questions1 int is not necessarily a 32 bit
2 is equal to return 1
CodePudding user response: