hex - pannous/warp GitHub Wiki

a hex is half a byte, 4 bits, 16 values 0...15 or 0... 9 A B C D E F (F=15)

hex x is the hex constructor, the same as hex(x) and x as hex: the number x, shown in hex (hex 255 is 0xFF). Hex literals are written with the 0x prefix: 0x1010 = 2^12 + 2^4 = 4112

Binary works the same way: 5 as binary (or bin) shows 0b101, and the literal 0b101 reads as 5. Arithmetic on a hex or binary value gives a plain int.

int60 is a smart pointer 0xB0000000.00000000 in which the first hex 0xB is used to denote the type and 15 of the 16 hexes are used for the numeric value (15*4 bit = 60 bit bignum)

int28 is a smart pointer 0x01234567 in which the first hex 0x0 is used to denote the type and 7 of the 8 hexes are used for the numeric value and