change bit to int