Renesas H8S/2138 Series Manuel Page 10

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 148
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 9
Microcomputer Technical Q&A
2
Q&A No.: QAH8S-002
Category: CPU
Subject: Difference between V Flag and C Flag in CCR
Question
The V flag and C flag in CCR are both set if overflow occurs during an operation. What is the
difference between these flags?
Answer
The V flag in CCR is used to identify whether overflow occurs in a signed operation. To take the
example of a byte-size operation, this flag is set to 1 if the operation result is smaller than the
negative minimum value (H'80) larger than the positive maximum value (H'7F).
V flag
H'80
H'7FH'00
Overflow Overflow
The C flag, on the other hand, is used to identify whether overflow occurs in an unsigned
operation. To take the example of a byte-size operation, this flag is set to 1 if the operation result
is larger than the maximum value (H'FF) or smaller than the minimum value (H'00).
C flag
H'00
H'FF
Overflow Overflow
Vue de la page 9
1 2 ... 5 6 7 8 9 10 11 12 13 14 15 ... 147 148

Commentaires sur ces manuels

Pas de commentaire