|
@ -281,7 +281,7 @@ int isLessOrEqual(int x, int y) { |
|
|
* Rating: 4 |
|
|
* Rating: 4 |
|
|
*/ |
|
|
*/ |
|
|
int logicalNeg(int x) { |
|
|
int logicalNeg(int x) { |
|
|
return 2; |
|
|
|
|
|
|
|
|
return ((x|(~x+1))>>31)+1; |
|
|
} |
|
|
} |
|
|
/* howManyBits - return the minimum number of bits required to represent x in |
|
|
/* howManyBits - return the minimum number of bits required to represent x in |
|
|
* two's complement |
|
|
* two's complement |
|
|