added xor function to misc.py as jtag.py was failing to import it