Update index.js to include comments

Added comments describing the bit-wise comparison.