• 56 is the decimal representation of 0b00111000. As binary is base 2, bit 5 is 32, bit 4 is 16, bit 3 is 8 32+16+8=56.

    You can use both binary and hexadecimal notation (0b.... and 0x... ) in Espruino, as well as decimal. Usually we use whatever format makes the most sense - for example, here, the decimal value is not particularly meaningful - 56? why 56? - but if you look at the binary or hexadecimal form, you can see that it's a byte with bits 3, 4 and 5 as ones.

About

Avatar for DrAzzy @DrAzzy started