convert bin-dec and dec-bin numbers