Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
mohamedkhallouq
GitHub Repository: mohamedkhallouq/content
Path: blob/main/files/en-us/webassembly/reference/numeric/not_equal/index.md
6512 views
---
title: Not equal slug: WebAssembly/Reference/Numeric/Not_equal
---

{{WebAssemblySidebar}}

The ne instructions, short for not equal, check if two numbers are not equal. If the numbers are not equal 1 will be pushed on to the stack, otherwise 0 will be pushed on to the stack.

{{EmbedInteractiveExample("pages/wat/ne.html", "tabbed-taller")}}

Syntax

;; load 2 numbers on to the stack local.get $num i32.const 2 ;; check if $num is not equal to '2' i32.ne ;; if $num is not equal to `2`, `1` will be pushed on to the stack, ;; otherwise `0` will be pushed on to the stack.
InstructionBinary opcode
i32.ne0x47
i64.ne0x52
f32.ne0x5c
f64.ne0x62