generating random number with same bit