Wilang Documentation1.0.0+4

hex#

Format a number as hexadecimal

Available in: math cells, REPL.

Syntax#

hex(value)

Arguments and behavior#

Returns a hexadecimal string including the 0x prefix, so hex(255) is 0xff. Use the Word size display setting to add a bit-width suffix when you want one.

Example#

Edit the inputs, then use Run or Reset. Changes stay in this example.

Example
hex(240)

Expected result: "0xf0".

See also#

bin · oct

All functions · Math guides