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

{{WebAssemblySidebar}}

The extend instructions, are used to convert (extend) numbers of type i32 to type i64. There are signed and unsigned versions of this instruction.

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

Syntax

;; push an i32 onto the stack i32.const 10 ;; sign-extend from i32 to i64 i64.extend_i32_s ;; the top item on the stack will now be the value 10 of type i64
InstructionBinary opcode
i64.extend_i32_s0xac
i64.extend_i32_u0xad