1/31
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Logical Shift
fills the newly created bit position with zero
Arithmetic Shift
fills newly created bit position with a copy of the number’s sign bit
SHL Instruction
shift left instruction that performs a logical left shift on the destination operand, filling the lowest bit with 0
Fast multiplication
shift left 1 bit (multiplies number by 2)
thus, shifting left n bits multiplies operand by 2^n
SHR Instruction
(shift right) instruction performs a logical right shift on destination operand. Highest bit position filled with a zero
Shifting right n bits divides the operand by 2^n
SAL
Shift arithmetic left (identical to SHL)
SAR
Shift arithmetic right (performs right arithmetic shift on the destination operand)
sign
Arithmetic shift preserves the number’s ____
ROL Instruction
Rotate shifts each bit to the left
Highest bit copied into both Carry flag and lowest bit
No bits are lost
ROR
Rotate right (shifts each bit right)
Lowest bit copied into both carry flag and highest bit
No bits are lost
RCL
Rotate carry left: shifts each bit left
Copies carry flag to least significant bit
Copies most significant bit to the carry flag
RCR
Rotate carry right: shifts each bit to the right
Copies the carry flag to the most significant bit
Copies the least significant bit to the carry flag
MUL Instruction
Unsigned multiply instruction that multiples 8-, 16-, or 32-bit operands by either AL, AX, or EAX
IMUL
Signed integer multiplies an 8-, 16-, 32-bit signed operand by either AL, AX, EAX
Preserves the sign of the product by sign extending it into the upper half of the destination register
DIV
Unsigned instruction that performs 8-, 16-, and 32-bit division on unsigned integers (A single operand is supplied and assumed to be the divisor)
IDIV
Signed integers must be sign-extended before division takes place
CBW, CWD, CDQ Instructions
Provide important sign extension operations
CBW
Convert byte to word (extends AL into AH)
CWD
Convert word to doubleword (extended AX into DX)
CDQ
convert doubleword to quadword (extends EAX into EDX)
IDIV instruction
Signed div performs signed integer divison
ADC Instruction
Add with carry: adds both a source operand and contents of the Carry flag to a destination operand
SBB Instruction
Subtract with borrow: Subtracts both a source operand and the value of the carry flag from a destination operand
BCD
Binary coded decimal integers use 4 binary bits to represent each decimal digit
AAA
ASCII adjust after addition: adjusts binary result of ADD or ADC. Makes result in AL consistent with ASCII decimal representation
AAS Instruction
ASCII adjust after subtraction. Adjusts binary result of SUB or SBB instruction. Makes result in AL consistent with ASCII decimal representation
AAM Instruction
ASCII adjust after multiplication. Adjusts the binary result of a MUL instruction. The multiplication must have been performed on unpacked BCD numbers
AAD Instruction
ACII adjust before division; instruction adjusts the unpacked BCD dvidend in AZ before a division operation
Packed Decimal Integers
store two decimal digit per byte
packed BCD
packed decimal is also known as…
DAA Instruction
Decimal adjust after addition: converts binary result of ADD or ADC operation to packed decimal format
DAS Instruction
Decimal adjust after subtraction: converts binary result of a SUB or SBB operation to packed decimal format (value must be in AL)