I am trying to convert a number to binary without using BaseForm. Can anyone please tell me why this code isn't working?
binarize =
a = Input["Enter No."];
convert = {}
While[a > 0, AppendTo[convert, Mod[a, 2]]],
a = Floor[Divide[a, 2]]
If[a == 0, True],
Break[]
Print[Reverse[convert]]