Comparison Results from Signed and unsigned numbers in  Assembly

Comparison Results from Signed and unsigned numbers in Assembly

Short Notes

Table of contents

No heading

No headings in the article.

Comparison Results for Signed and Unsigned Numbers:

  • DEST = SRC:

    • ZF = 1 (Zero flags are set)
  • UDEST < USRC:

    • CF = 1 (Carry flag is set)
  • UDEST ≤ USRC:

    • ZF = 1 OR CF = 1 (Either Zero flag or Carry flag is set)
  • UDEST ≥ USRC:

    • CF = 0 (Carry flag is not set)
  • UDEST > USRC:

    • ZF = 0 AND CF = 0 (Zero flag and Carry flag are not set)
  • Signed

    • SDEST < SSRC: SF ≠ OF

    • SDEST ≤ SSRC: ZF = 1 or SF ≠ OF

    • SDEST ≥ SSRC: SF = OF

    • SDEST > SSRC: ZF = 0 and SF = OF

  • Notes

    ZF = Zero Flag and CF= Carry Flag