Quiz Entry - updated: 2026.07.14
What is the difference between je/jne and jz/jnz?
They are the same instruction — je/jz are two names for one opcode (jump if ZF=1), and jne/jnz for another (jump if ZF=0).
| Name | Alias | Meaning | Flag checked |
|---|---|---|---|
je |
jz |
Jump if equal / zero | ZF = 1 |
jne |
jnz |
Jump if not equal / not zero | ZF = 0 |
Use je/jne after cmp (comparing two values). Use jz/jnz after test or arithmetic (checking if result is zero). The assembler doesn't care — it's purely a readability convention.
Go deeper:
Jcc reference (JE/JZ aliases) — shows JE and JZ share one opcode (74 short / 0F 84 near) and both test ZF, confirming they are aliases.