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

{{WebAssemblySidebar}}

The add instructions, are used for adding up two numbers, similar to the + operator in other languages.

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

Syntax

;; load two numbers onto the stack i32.const 10 i32.const 3 ;; add up both numbers i32.add ;; the top item on the stack will now be 13 (10 + 3 = 13)
InstructionBinary opcode
i32.add0x6a
i64.add0x7c
f32.add0x92
f64.add0xa0