Output a binary path from a number
MATL, 14 bytes

J_iB^YsJ+'o-'&amp;XG


Produces graphical output as a path starting at coordinates (0,0). Try it at MATL Online! Or see some offline examples below:


Input 7:



Output:


Input 699050:



Output:




If you prefer, you can see the path as complex coordinates for 9 bytes:

J_iB^YsJ+


Try it online!

Explanation

J_      % Push -1j (minus imaginary unit)
i       % Push input number
B       % Convert to binary. Gives an array of 0 and 1 digits
^       % Power, element-wise. A 0 digit gives 1, a 1 digit gives -1j
Ys      % Cumulative sum. Produces the path in the complex plane
J+      % Add 1j, element-wise. This makes the complex path start at 0
'o-'    % Push this string, which defines plot makers
&amp;XG     % Plot