# `movzxw`

[x86-64 Documentation](https://asm-editor.specy.app/documentation/x86.md) › [Instructions](https://asm-editor.specy.app/documentation/x86/instruction.md)

Web page: https://asm-editor.specy.app/documentation/x86/instruction/movzxw

**Move word with zero extension**

Category: Arithmetic

Copies a word source into a register, filling added high bits with zeros when the destination is wider.

386 and later

[Intel's reference: MOVZX](https://intel.github.io/SDM/instruction/MOVZX.html)

## Flags

| Flag | Effect |
| --- | --- |
| CF | not changed |
| PF | not changed |
| AF | not changed |
| ZF | not changed |
| SF | not changed |
| DF | not changed |
| OF | not changed |

## Forms

- `movzxw reg, r/m16` (16, 32, 64)
  - `movzxw reg16, r/m16`
  - `movzxw reg32, r/m16`
  - `movzxw reg64, r/m16`

## Operands

- `reg`: The destination register, usually wider than the source, as in `movzxw eax, bx`.
- `r/m16`: A 16-bit general-purpose register or word in memory, for example `ax` or `word [rsi]`.

## Description

It reads 16 bits and zero-extends them into a 32- or 64-bit destination. NASM also accepts a 16-bit destination; that copies the word without widening and preserves the remaining bits of the 64-bit register.

## Example

```x86
global _start

section .text
_start:
        mov rax, 12
        mov rbx, 5
        mov rcx, 3
        mov rsi, 9

        movzxw rax, bx

        mov rax, 60         ; syscall 60: exit
        xor rdi, rdi
        syscall
```
