Substituting specified bit combinations for other prescribed bit combinations