Negative Flag

In a computer processor the negative flag or sign flag is a single bit in a system status (flag) register used to indicate whether the result of the last mathematical operation resulted in a value whose most significant bit was set. In a two's complement interpretation of the result, the negative flag is set if the result was negative.

For example, in an 8-bit signed number system, -37 will be represented as 1101 1011 in binary (the most significant bit is 1), while +37 will be represented as 0010 0101 (the most significant bit is 0).

The negative flag is set according to the result in the x86 series processors by the following instructions (referring to the Intel 80386 manual ):

  • All arithmetic operations except multiplication and division;
  • compare instructions (equivalent to subtract instructions without storing the result);
  • Logical instructions - XOR, AND, OR;
  • TEST instructions (equivalent to AND instructions without storing the result).

Famous quotes containing the words negative and/or flag:

    The working woman may be quick to see any problems with children as her fault because she isn’t as available to them. However, the fact that she is employed is rarely central to the conflict. And overall, studies show, being employed doesn’t have negative effects on children; carefully done research consistently makes this clear.
    Grace Baruch (20th century)

    What is Americanism? Every one has a different answer. Some people say it is never to submit to the dictation of a King. Others say Americanism is the pride of liberty and the defence of an insult to the flag with their gore. When some half-developed person tramples on that flag, we should be ready to pour out the blood of the nation, they say. But do we not sit in silence when that flag waves over living conditions which should be an insult to all patriotism?
    Anna Howard Shaw (1847–1919)