Custom blocks to convert integers represented as hexadecimal bytes to and from Scratch-usable numbers (which are technically double floats). Useful for reading and writing to binary file formats.
Supports both signed and unsigned integers between 1 and 6 whole bytes. Signed ints are two's complement. For 1 byte (8 bits), that would be numbers [−128,127]. Both little endian and big endian are supported, with a default to big.
The limitation on the maximum byte size is due to how representable they are in scratch's double floats, and there is a loss of precision in the way I make the conversions which I chose because of their simplicity and speed. Additionally, the whole byte limitation is due to this being intended for use on actual stored integers which are often 1, 2, 4, or 8 bytes in size (which is often signified as i8, i16, i32, i64 or u8, u16, u32, u64 for the unsigned and signed ints, respectively).
If you don't understand, you may want to read this:
https://en.wikipedia.org/wiki/Integer_(computer_science)