c++webassembly

How 0061 736d represents \0asm?


I just started to learn web assembly . I found this text

"In binary format The first four bytes represent the Wasm binary magic number \0asm; the next four bytes represent the Wasm binary version in a 32-bit format"

I am not able to understand this . Can anyone explain me this


Solution

  • \0 is a character with code 0 (the first 00 in 0061736d), the remaining three are literal characters a, s and m. With codes 97, 115 and 109 respectively, or 61, 73 and 6d in hex.