fbpx
Wikipedia

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 produced a value in which the most significant bit (the left most 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, or sign 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[1]):

  • 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).

References edit

  1. ^ INTEL 80386. Programmer's Reference Manual 1986

negative, flag, this, article, needs, additional, citations, verification, please, help, improve, this, article, adding, citations, reliable, sources, unsourced, material, challenged, removed, find, sources, news, newspapers, books, scholar, jstor, december, 2. This article needs additional citations for verification Please help improve this article by adding citations to reliable sources Unsourced material may be challenged and removed Find sources Negative flag news newspapers books scholar JSTOR December 2009 Learn how and when to remove this template message 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 produced a value in which the most significant bit the left most 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 or sign 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 1 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 References edit INTEL 80386 Programmer s Reference Manual 1986 Retrieved from https en wikipedia org w index php title Negative flag amp oldid 1126105058, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.