Chapter 6 - Conditional Processing Flashcards
(77 cards)
What flag is set when the result of an operation equals zero?
Zero flag
The Zero flag is set when the destination equals zero.
What flag is set when an instruction generates a result that is too large for the destination operand?
Carry flag
The Carry flag is set when an unsigned value is out of range.
What flag indicates that the destination operand is negative?
Sign flag
The Sign flag is set if the destination operand is negative and clear if positive.
What flag is set when an instruction generates an invalid signed result?
Overflow flag
The Overflow flag is determined by XORing bit 7 carry with bit 6 Carry.
What flag is set when an instruction generates an even number of 1 bits in the low byte of the destination operand?
Parity flag
The Parity flag reflects the evenness of 1 bits in the low byte.
What flag is set when an operation produces a carry out from bit 3 to bit 4?
Auxiliary Carry flag
This flag indicates a carry between specific bits.
What operation does the AND instruction perform?
Boolean AND operation
The AND instruction performs a bitwise AND between two operands.
What happens to the Overflow and Carry flags after an AND instruction?
Cleared
The AND instruction always clears the Overflow and Carry flags.
What operation does the OR instruction perform?
Boolean OR operation
The OR instruction performs a bitwise OR between two operands.
What does the XOR instruction do?
Boolean exclusive-OR operation
The XOR instruction performs a bitwise exclusive OR between two operands.
What is the result of the NOT instruction?
One’s complement
The NOT instruction toggles (inverts) all bits in an operand.
What type of searches utilize techniques from propositional logic?
Boolean searches
Boolean searches use AND, OR, and NOT to filter search results.
What does the AND connective do in Boolean searches?
Matches records containing both search terms
The AND connective is used to find results that include all specified terms.
What does the OR connective do in Boolean searches?
Matches one or both search terms
OR is the broadest operator and returns any results containing either term.
What does the NOT connective do in Boolean searches?
Excludes a particular search term
The NOT operator filters out unwanted terms from search results.
What instruction performs a nondestructive AND operation?
TEST instruction
TEST does not modify the destination operand but affects the Zero flag.
What does the CMP instruction do?
Compares destination and source operands
CMP performs nondestructive subtraction of source from destination.
What flags does the CMP instruction affect?
Overflow, Sign, Zero, Carry, Auxiliary Carry, Parity flags
These flags indicate the result of the comparison.
What does the JC instruction do?
Jump to a label if the Carry flag is set
JC is a conditional jump based on the Carry flag.
What does the JZ instruction do?
Jump to a label if the Zero flag is set
JZ is a conditional jump based on the Zero flag.
What does the JG instruction do?
Jump if greater (signed comparison)
JG checks if the left operand is greater than the right for signed values.
What does the JA instruction do?
Jump if above (unsigned comparison)
JA is used for unsigned comparisons to check if the first operand is greater.
What is the purpose of the JNL instruction?
Jump if not less
JNL checks if the left operand is greater than or equal to the right.
What is the purpose of the JL instruction?
Jump if less
JL checks if the left operand is less than the right.