Add bit comparison function