Hex is a representation of a number. In order to do math, one must first convert it to something the computer considers a number. «hex» can do that.
You want to do 8 bit arithmetic while ignoring overflows. No problem, just filter out all but the lower 8-bits using «&».
You will need to convert the result back to hex. «sprintf "%02x"» will do that.
In reply to Re: Perl hex substraction
by ikegami
in thread Perl hex substraction
by inkubus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |