Programming Calculator
Instacalc supports most JS syntax for hex and byte manipulation:
A few notes:
- While most JS syntax is allowed (
if/else
,? :
,"some string"
), loops/functions are not. - Data units (
GB
,MB
) are base 2 (help text explains this). UseMB_SI
for base 10. - Functions can be called in several ways:
123 as bin
123 -> bin
bin(123)
- Binary operators (
AND
,XOR
,NOT
) are usually invoked with that keyword. The operators&
,|
and^
work with binary/hex arguments:0x123 ^ 0x456
isXOR
, not an exponent (root issue: disambiguating the carat symbol^
).
Example
Explaining big-endian/little-endian and byte swapping: