WorksheetsThe FLAGS Register Quiz W1
Total questions: 15
Worksheet time: 3mins
Which set lists only status flags in the 8086 FLAGS register?
CF, PF, AF, TF, IF, DF
CF, ZF, DF, SF, OF
TF, IF, DF, ZF, SF, OF
CF, PF, AF, ZF, SF, OF
A byte addition yields a low byte with exactly four 1-bits and no carry from the most significant bit. Which flags are set to 1?
PF only is set, CF is clear
CF only is set, PF is clear
PF and CF are both set
Neither PF nor CF is set
During subtraction, a borrow occurs into bit 3 of the low byte, the result is 00h, and the most significant bit of the result is 1. Which flags are 1?
AF and ZF are 1; SF is 0
AF and ZF are 1; SF is 1
AF and SF are 1; ZF is 0
AF is 0; ZF and SF are 1
When adding two unsigned 16-bit values, which condition indicates unsigned overflow has occurred?
Carry into and out of MSB do not match
Sum is negative in two’s complement
Result’s MSB differs from operands’ MSBs
Carry out of the MSB is present
Two 16-bit numbers, both with MSB = 0, are added and the result has MSB = 1 with no carry out of the MSB. What overflow flags are set?
OF=0 and CF=0
OF=1 and CF=1
OF=0 and CF=1
OF=1 and CF=0
Which best describes how the processor determines signed overflow during addition?
Any carry happens anywhere in bits
Carry into and carry out of MSB differ
Result equals zero after masking
Result exceeds 65535 decimal
Adding 0x7FFF and 0x7FFF in 16-bit arithmetic yields 0xFFFE. Which interpretation of overflow is correct?
Signed overflow occurs, unsigned does not
Unsigned overflow occurs, signed does not
Both signed and unsigned overflow occur
Neither signed nor unsigned overflow occur
An 8086 executes ADD AX,BX with AX=FFFFh and BX=FFFFh. Which flag combination is correct after the addition?
SF=1, ZF=0, CF=1, OF=0
SF=0, ZF=1, CF=0, OF=1
SF=1, ZF=1, CF=1, OF=1
SF=0, ZF=0, CF=0, OF=0
INC AL when AL=FFh results in AL=00h. Which statement about flags is correct?
ZF cleared, CF unchanged, OF set
ZF set, CF set, OF cleared
ZF is set, CF unchanged, OF cleared
ZF cleared, CF set, OF set
NEG AX with AX=8000h is performed. Which outcome best matches the instruction behavior?
Result=8001h, CF=0, OF=1
Result=7FFFh, CF=1, OF=0
Result=0000h, CF=0, OF=0
Result=8000h, CF=1, OF=1
When tracing with DOS DEBUG, which flag pattern best supports the conclusion that ADD AX,AX changed a positive value to a negative without an unsigned carry?
OV set, NG clear, CY clear, ZR set
OV clear, NG set, CY set, ZR clear
OV clear, NG clear, CY set, ZR clear
OV set, NG set, CY clear, ZR clear
When adding two 16-bit positive numbers in AX and BX, ADD AX,BX produces a negative result in two’s complement. Which flags combination best indicates signed overflow without an unsigned carry out of the msb?
CF=0, OF=0, SF=0, ZF=1
CF=1, OF=1, SF=0, ZF=1
CF=0, OF=1, SF=1, ZF=0
CF=1, OF=0, SF=1, ZF=0
After executing SUB AX,BX on 16-bit registers where AX=0002h and BX=FF0Fh, which interpretation about overflow is correct?
Unsigned overflow occurs, signed overflow does not
Signed overflow occurs, unsigned overflow does not
Both signed and unsigned overflow occur
Neither signed nor unsigned overflow occur
Which statement correctly distinguishes CF and OF for addition and subtraction on the 8086?
CF reports zero detection; OF reports negative detection
CF reports parity of result; OF reports auxiliary carry
CF reports signed overflow; OF reports unsigned overflow
CF reports msb carry/borrow; OF reports signed overflow
What condition indicates a signed overflow has occurred when adding two signed 16-bit values?
Carry out of the MSB is present
Result’s MSB differs from operands’ MSBs
Result is negative in two’s complement
Carry into and out of MSB do not match
