#include <PBASIC.bas>
FUNCTION REV (value, number of bits )
Function returning a reversed (mirrored) copy of a specified number of
bits of a value, starting with the rightmost bit (LSB).
For instance, 0xFEED REV 4 would return 0xB, a mirror image of the last
four bits of the value.(The binary representation of 0xD being 1101 and 0xB
1011)