CBW/CWDE/CDQE--Convert Byte to Word/Convert Word to Doubleword/Convert Doubleword to Quadword

Opcode Instruction 64-Bit
Mode
Compat/
Leg Mode
Description
98 CBW Valid Valid AX <-- sign-extend of AL.
98 CWDE Valid Valid EAX <-- sign-extend of AX.
REX.W + 98 CDQE Valid N.E. RAX <-- sign-extend of EAX.

Description

Double the size of the source operand by means of sign extension (see Figure 7-6 in the IA-32 Intel Architecture Software Developer's Manual, Volume 1). The CBW (convert byte to word) instruction copies the sign (bit 7) in the source operand into every bit in the AH register. The CWDE (convert word to doubleword) instruction copies the sign (bit 15) of the word in the AX register into the high 16 bits of the EAX register.

[...]

Flags Affected

None.

Exceptions (All Operating Modes)

None.


IA-32 Intel Architecture Software Developer's Manual, Volume 2A: Instruction Set Reference, A-M
Intel Corporation, Denver, CO, Order Number: 253666-017
This site is not affiliated with Intel Corporation in any way. Please don't sue. Email webmaster.