Fixed invert bugs, added highestOneIndex to binary.py