0% found this document useful (0 votes)
42 views2 pages

1.) What Are The Different Flags Used by Intel Processors?

The document discusses the different flags used by Intel processors and the conditions to set or reset them. It describes the Carry Flag, Parity Flag, Auxiliary Flag, Zero Flag, Sign Flag, Overflow Flag, Interrupt Flag, Trap Flag, and Direction Flag. The Carry Flag is set on borrow or carry after operations. The Parity Flag is set for even or odd parity. The Auxiliary Flag holds carry between bits 3-4. The Zero Flag is set if the result is zero. The Sign Flag shows negative numbers. The Trap Flag enables single-step mode. The Interrupt Flag controls interrupt requests.

Uploaded by

christian sbs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views2 pages

1.) What Are The Different Flags Used by Intel Processors?

The document discusses the different flags used by Intel processors and the conditions to set or reset them. It describes the Carry Flag, Parity Flag, Auxiliary Flag, Zero Flag, Sign Flag, Overflow Flag, Interrupt Flag, Trap Flag, and Direction Flag. The Carry Flag is set on borrow or carry after operations. The Parity Flag is set for even or odd parity. The Auxiliary Flag holds carry between bits 3-4. The Zero Flag is set if the result is zero. The Sign Flag shows negative numbers. The Trap Flag enables single-step mode. The Interrupt Flag controls interrupt requests.

Uploaded by

christian sbs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Sabas, Christian O.

CPE103 /HW#2 B14

1.) What are the different flags used by Intel processors?


Carry Flag (Bit 0) -holds the borrow after subtraction or the carry after addition

Parity Flag (Bit 2) -designate the uniformity of result. If lower order 8-bits of the result contains even
number of 1’s the parity flag is set on the other hand for the odd number of 1’s, the parity flag will be
reset.

Auxiliary Flag (Bit 4) -holds the carry (half-carry) after addition or the borrow after subtraction between
bits positions 3 and 4 of the result.

Zero Flag (Bit 6) -displays that the result of an arithmetic or logic operation is zero

Sign Flag (Bit 7) -In sign magnitude format the sign of number is indicated by MSB bit. I the result of
operation is negative sign flag is set.

Overflow Flag -occurs when signed numbers are added or subtracted

Interrupt Flag -controls the operation of the INTR (interrupt request) input pin.

Trap Flag -allows trapping through an on-chip-debugging feature

Direction Flag -selects either the increment or decrement mode for the DI and/or SI registers during
string instructions

2.) What are the conditions to set or reset the flags?

Carry Flag (Bit 0) - the kind of flag will set (1) if after the operation the MSB or the most significant bit
has a carry out, or if after the operation such as subtraction, if there is an borrow on the MSB. Otherwise
the flag resets (0). holds the carry after addition or the borrow after subtraction.

Parity Flag (Bit 2) - used to specify the parity of result. If lower order 8-bits of the result contains even
number of 1’s the parity flag is set and for odd number of 1’s, the parity flag is reset.

Auxiliary Flag (Bit 4) -holds the carry (half-carry) after addition or the borrow after subtraction between
bits positions 3 and 4 of the result. After any operation whether it’s arithmetic or logical operation, this
flag will set (1) if ever there is an unsigned overflow in the low nibble part of the result. Otherwise its
reset (0).

Zero Flag (Bit 6) -shows that the result of an arithmetic or logic operation is zero. If the result of the
operation is a non-zero value then the zero flag will reset (0). However, if the result of the operation has
a value of zero then the zero flag will set (1). To simply put the zero flag, detect whether or not the
result is a zero or not.
Sign Flag (Bit 7) -In sign magnitude format the sign of number is showed by MSB bit. I the result of
operation is negative sign flag is set. If the MSB is determined to have a value of 1 then the sign flag will
set (1), and if the MSB is determined to have a value of 0 then the sign flag will reset (0). The pattern for
the condition for the sign flag is simple, the value of the MSB will be the same value the sign flag will
produce.

Directional Flag -selects either the increment or decrement mode for the DI and/or SI registers during
string instructions. if this flag is set (1) then the access of the string data is from a higher memory
location to the lower memory location and if the flag is in reset (0) then the access of the string data is
from lower memory location to higher memory location.

Trap Flag -allows trapping on an on-chip-debugging feature. When the trap flag is set (1) then the
microprocessor turns into single step mode. Else if it’s in reset (0) then it will not run in single step
mode.

Interrupt Flag -controls the operation of the INTR (interrupt request) input pin. If the interrupt flag is in
set (1), the microprocessor will recognize any interrupt request from the user. If then the interrupt flag
is in reset (0) any interrupt put by the user will be ignored.

You might also like