x86 - about assembly CF(Carry) and OF(Overflow) flag -
It is known that the CF indicates that an unsigned out carrying and o signed overflow so between an assembly and a signed data What does the assembly program differentiate because it is a sequence of bits only? (For information type through extra memory storage, or through positional information or other?) And can these two flags be used for each other?
The difference is that what instructions are used to manipulate data, the data itself No. Modern computers (since about 1970) use the representation of integer data, called complementary of two, in which both the signed and unsigned numbers have the same and subtraction functions.
-
The difference in representation is the meaning given to the most important bit (also called sine bit ) for unsigned numbers too big means Positive number is; For signed numbers it means that very large negative numbers (negative numbers with a big full value)
-
Different instructions can use different interpretations of the same bit. For example, there are two signed and unsigned multi-directional instructions on large machines. With 'at least' instructions machines can have both taste and signed sign.
-
The off (overflow flag) indicates whether the most important bit result in carrying one is to separate it from the most important bits of the argument. If the numbers are defined as unsigned, the overflow flag is irrelevant, but if they are interpreted as signature, it means, for example, two big positive numbers were added and the result was negative.
-
The CF (carry flag) states that a little word was completely done (like in bit 33 or bit 65) if the numbers are defined as unsigned , Then the flag means that the excess overflow occurs, and the result is too big to fit the machine word. Overflow flag is irrelevant.
The answer to your question is that there are several ways to sign the data signed in the assembly code:
- < Li> It can either select signed or unsigned multiplication and split instructions.
- This can select a signed or unsigned correct change (signed copies high bit, unsigned poly in zero).
Comments
Post a Comment