lzcnt

Count Leading Zeros

LZCNT r, r/m

Counts number of leading zeros.

Details

The Count Leading Zeros instruction counts number of leading zeros.

Pseudocode Operation

DEST <- count of leading zero bits in SRC

Example

LZCNT rax, rbx

Encoding

Binary Layout
F3
+0
0F
+1
BD
+2
 
Format VEX
Opcode F3 0F BD
Extension ABM/BMI

Operands

  • dest
    General-purpose register
  • src
    Register or memory operand