0

I need to convert base 10 number say a in base 2 say b and want that, from now b must be read as a base 10 number. In general, I need to convert base 10 number say a in base n say b and want that, from now b must be read as a base 10 number. how to do this? whats the commands or programme for this?

1 Answers1

1

If I understand your question

a = RandomInteger[10^5]

(* 60550 *)

BaseForm[a, 2]

enter image description here

b = FromDigits[IntegerDigits[a, 2]]

(* 1110110010000110 *)
Bob Hanlon
  • 157,611
  • 7
  • 77
  • 198