update the ith bit to be v