With the following code I produce the binary digits of n=13:
n=13;
Q = Quotient[n, 2];
While[Q != 0, Print[Mod[n, 2]]; Q = Quotient[n, 2]; n = Q]
n=13;
Q = Quotient[n, 2];
While[Q != 0, Print[Mod[n, 2]]; Q = Quotient[n, 2]; n = Q]
The problem is that it outputs the digits
as
1
0
1
1
1
0
1
1
but I want 'emthem to appear horizontally
1101 1101
.
What is the most direct way to produce the desired effect regardingregarding the output's style?
Thanks in advance for your help.