Home > Back-end >  Of new there is a problem about complement
Of new there is a problem about complement

Time:04-26

Suppose you have two complement x y
When you need to compare the x and y, if x and y are the same as number, can use the x - y=x + y + 1 ~, then to judge the result of the positive and negative, can determine the size of the x and y,
But if x and y opposite sign, so that the result of the judgment will sometimes is positive or negative,
For bosses to reassure

CodePudding user response:

You didn't mention the background and the code, so can not suit the remedy to the case,
Can only say that complement this stuff is designed for programmers to worry, so big probability is you want to much,

CodePudding user response:

Positive complement and itself, negative complement for the not add 1, so your formula is not all right
  • Related