[Question]
  [
For an integer `n` that satisfies `n > 0`, write its value as a right-descending path based on its binary representation.
# Rules
* The first (most significant) set bit is always in the top-left corner.
* When the next bit is set (a `1`), draw a character ("filled") on the next line in the same column as the previous character drawn. Try to use spaces ("empty") to fill, but any character will do as long as it's always the same.
* When the next bit is unset (a `0`), draw a character ("filled") on the same line immediately to the the right of the previous character drawn.
* Your code must support numbers with at least 20 significant bits.
* Write a full program, a function, a lambda, etc. but no snippet.
* No leading spaces (or "empty" char) / lines allowed
* Any number of trailing spaces (or "empty" char) / lines allowed
* Any kind of 1D input is accepted: number, string, array of booleans, etc. Keep the order of bits untouched though.
* Any kind of visual 2D output is accepted: on stdout, a string (with any two distinct values representing "filled" and "empty"), you can even output a matrix if you want. A list of numbers seems hard to reconcile with the "no heading spaces" rule, but I'm open to it if you find a way to use it. Note: if you chose to print or return a string, the characters used must be ASCII characters in the codepoints range [32-126].
* [Standard loopholes](https://codegolf.meta.stackexchange.com/q/1061/16236) are banned.
* This is codegolf so the shortest code wins.
# Examples
Input: 1
```
*
```
Input: 2
```
**
```
Input: 3
```
*
*
```
Input: 4
```
***
```
Input: 5
```
**
 *
```
Input: 6
```
*
**
```
Input: 7
```
*
*
*
```
Input: 25
```
*
***
  *
```
Input: 699050
```
**
 **
  **
   **
    **
     **
      **
       **
        **
         **
```
Input: 1047552
```
*
*
*
*
*
*
*
*
*
***********
```
Input: 525311
```
**********
         *
         *
         *
         *
         *
         *
         *
         *
         *
         *
```
  
[Answer]
# [MATL](https://github.com/lmendo/MATL), 14 bytes
```
J_iB^YsJ+'o-'&XG
```
Produces graphical output as a path starting at coordinates (0,0). Try it at [**MATL Online!**](https://matl.io/?code=J_iB%5EYsJ%2B%27o-%27%26XG&inputs=699050&version=20.8.1) Or see some offline examples below:
* Input `7`:
[![enter image description here](https://i.stack.imgur.com/4rHll.png)](https://i.stack.imgur.com/4rHll.png)
Output:
[![enter image description here](https://i.stack.imgur.com/KV0Ta.png)](https://i.stack.imgur.com/KV0Ta.png)
* Input `699050`:
[![enter image description here](https://i.stack.imgur.com/VUaYg.png)](https://i.stack.imgur.com/VUaYg.png)
Output:
[![enter image description here](https://i.stack.imgur.com/bfa5b.png)](https://i.stack.imgur.com/bfa5b.png)
If you prefer, you can see the path as complex coordinates for **9 bytes**:
```
J_iB^YsJ+
```
[**Try it online!**](https://tio.run/##y00syfn/3ys@0ykusthL@/9/cwA)
###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
&XG     % Plot
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 8 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
¬¨≈ì·πó+\·π¨z0
```
A monadic link accepting a number as a list of ones and zeros (e.g. `13` is `[1,1,0,1]`) returning a list of lists of ones and zeros where the first list is the first row.
**[Try it online!](https://tio.run/##y0rNyan8///QmqOTH@6crh3zcOeaKoP///9HG@ooAJEBEoJwDWMB "Jelly ‚Äì Try It Online")** or see a formatted [test-suite](https://tio.run/##y0rNyan8///QmqOTH@6crh3zcOeaKoP/R/c4HW5XedS0JhKIgSgLRDXuszq0LQtIHdp2aNv//4Y6RjrGOiY6pjpmOuY6RkDK0tLA1EDH0MDE3NTUSMfUyNTY0BAA "Jelly ‚Äì Try It Online")
### How?
```
¬¨≈ì·πó+\·π¨z0 - Link: list L           e.g. [1,1,0,0,1,1,0,1] (i.e. 205)
¬¨        - logical NOT L               [0,0,1,1,0,0,1,0]
    \    - cumulative reduce L by:
   +     -   addition                  [1,2,2,2,3,4,4,5]
 ≈ì·πó      - partition @ truthy indices  [[1,2],[2],[2,3,4],[4,5]]
     ·π¨   - un-truth (vectorises)       [[1,1],[0,1],[0,1,1,1],[0,0,0,1,1]]
      z0 - transpose with filler 0     [[1,0,0,0],[1,1,1,0],[0,0,1,0],[0,0,1,1],[0,0,0,1]]
         -                        i.e.  1000
                                        1110
                                        0010
                                        0011
                                        0001
```
[Answer]
# [MATL](https://github.com/lmendo/MATL), 10 bytes
```
YsG~YsQ1Z?
```
Inputs an array of binary digits. Outputs a matrix.
[Try it online!](https://tio.run/##y00syfn/P7LYvS6yONAwyv7//2hDBUMFAyA0jAUA "MATL ‚Äì Try It Online")
### Explanation
```
Ys    % Implicit input: array of binary digits. Cumulative sum. This gives the
      % row coordinates
G     % Push input again
~     % Negate: change 0 to 1 and 1 to 0
Ys    % Cumulative sum
Q     % Add 1. This gives the column coordinates
1Z?   % Matrix containing 1 at those row and column coordinates and 0 otherwise.
      % Implicit display
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), ~~18~~ ~~17~~ 14 bytes
```
Œ≥‚Ç¨gƒá¬∏s>¬´1I√î¬∑√åŒõ
```
[Try it online!](https://tio.run/##MzBNTDJM/f//3OZHTWvSj7Qf2lFsd2i1oefhKYe2H@45N/v//2hDHQUgMgAjw1gA "05AB1E ‚Äì Try It Online")
**Explanation**
```
Œ≥‚Ç¨g             # Push the input as the array as chuncks of consecutive elements, map with length
   ƒá¬∏s>¬´        # Increment each value except the first one
        1I      # Push 1 and the input       
          √î     # Push connected uniquified input (first elements of each chunck of consecutive elements in the input)
           ¬∑√å   # Map each with 2 * a + 2
             Œõ  # Draw canvas :-)
```
* 3 bytes thanks to @Emigna
[05AB1E canvas's explanation](https://codegolf.stackexchange.com/a/160031/76822)
[Answer]
# [Python 2](https://docs.python.org/2/), ~~100~~ ~~99~~ ~~81~~ ~~78~~ ~~73~~ 66 bytes
```
a='';x=0
for c in input():a+=('\n'+' '*x)*c+'*';x+=1-c
print a[1:]
```
[Try it online!](https://tio.run/##K6gsycjPM/r/P9FWXd26wtaAKy2/SCFZITMPiApKSzQ0rRK1bTXUY/LUtdUV1LUqNLWStdW1gEq1bQ11k7kKijLzShQSow2tYv//jzbUUTDQUSCHjAUA "Python 2 ‚Äì Try It Online")
Recursive version:
# [Python 2](https://docs.python.org/2/), ~~71~~ ~~69~~ 67 bytes
```
f=lambda n,x=0:n and('\n'[:x]+' '*x)*n[0]+'*'+f(n[1:],x+1-n[0])or''
```
[Try it online!](https://tio.run/##VclBCoMwEEDRvaeY3WQ0haitxYAnSV0kaKigo6QppKdP7bK7z/vHJz53bnL2w2o3N1lgmQalGSxPAh@MRqexQsAyUclGnV1i5QWbWo8yVfXlh7QHxDzNHpxg0gWEOb4Dw7q8otjsIRaO0i18TtPokagojnAaeOFE1/fqpv6tvd67lih/AQ "Python 2 ‚Äì Try It Online")
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), ~~22~~ ~~20~~ ~~19~~ ~~11~~ 10 [bytes](https://github.com/somebody1234/Charcoal/wiki/Code-page)
```
Ôº¶‚ÆåÔº≥¬øÔº©Œπ‚Üë*‚Üê*
```
Only my second Charcoal answer thus far.
Takes the input as binary-String (i.e. `699050` as `10101010101010101010`).
-9 bytes thanks to *@Neil* suggesting to loop backwards.
[Try it online.](https://tio.run/##S85ILErOT8z5/98tv0gjKLUstag4VcMzr6C0JLikKDMvXUNTU5NLQcEzTcM5sbhEI1NTUyEAKF6iYRVaoKOkpaRpreCaU5wKE/RJTSuBCP//b2iACf/rluUAAA)
**Explanation:**
Read STDIN as string in reversed order:
```
Reverse(InputString())
‚ÆåÔº≥
```
Loop over its binary digits as strings `Œπ`:
```
For(Reverse(InputString()))
Ôº¶‚ÆåÔº≥
```
If `Œπ` casted back to a number is 1, print the `*` upwards, else print the `*` towards the left.
```
If(Cast(i)) Print(:Up,"*"); Else Print(:Left,"*");
¬øÔº©Œπ‚Üë*‚Üê*
```
[Answer]
# [C# (.NET Core)](https://www.microsoft.com/net/core/platform), ~~155~~ ~~123~~ ~~120~~ ~~113~~ 101 bytes
Saved 32 bytes due to input being able to be received as an array of bits.  
Saved 7 bytes thanks to @auhmaan.  
Saved 10 bytes thanks to @KevinCruijssen.
```
n=>{var m="";for(int i=0,c=1;i<n.Length;)m+=n[i++]<1?c++%1+"":(i>1?"\n":"")+"0".PadLeft(c);return m;}
```
[Try it online!](https://tio.run/##RZBNawIxEIbP7q8YAoWE2GW30ILGrJRCTxYECx62HmLMbgNuQidZQcTfvo0ftMcZnvdjRodH7dEMfbCuhdUxRNPlC@t@RJbpvQoBluhbVB2cslGIKloNB2938KGsoyFiktUbUNgGlpDs7vDeOz2zLtabMdygChqQg5PV6aAQOkmIaDzSxICVxVjLUtiZyxfGtfFbsI5LV1vON7Nyrjl/KDkhU2qrck6@HJkSwjgpSL5Uu4VpItVMoIk9OujEeUjdL76u77YGQcLLZFI8FyK7FoKtjSEt703fvDsYjPmnX1170ptqDE8sX5m90clcVkmZsjAYqv9JxlgaXhHVkTLxd3tyDH5v8jXaaNIrDW3oJZNdmNE5Ow@/ "C# (.NET Core) ‚Äì Try It Online")
[Answer]
# [Haskell](https://www.haskell.org/), 65 bytes
```
f(a:b)|a="*":f b|(x:y)<-f b=('*':x):map(' ':)y
f[]=["*"]
f.tail
```
[Try it online!](https://tio.run/##y0gszk7Nyfn/P00j0SpJsybRVklLySpNIalGo8KqUtNGF8i01VDXUreq0LTKTSzQUFdQt9Ks5EqLjrWNBiqN5Uq3TdMrSczM@Z@bmJlnW1BaElxSpFKal5OZl1qskh4dUlSaquOWmFOcqgNmIgiwYOx/AA "Haskell ‚Äì Try It Online")
Takes input as a list of booleans.
# Curry PAKCS, 70 bytes
```
u(a:b)=('*':a):map(' ':)b
f(a:b)|a="*":f b|1>0=u$f b
f[]=["*"]
f .tail
```
Port of the Haskell answer, but because `<-` doesn't work in Curry we need to make a helper function `u`. We also need to add a space between `f` and `.` so that Curry parses it as a compose rather than a dot.
This also works in MCC Curry, but doesn't work in Sloth Curry (which is the only one supported by TIO).
[Answer]
# [Python 2](https://docs.python.org/2/), 59 bytes
```
s=p='\n'
for x in input():s+=p*x+'*';p+=' '[x:]
print s[2:]
```
[Try it online!](https://tio.run/##PcZBCoAgEEDRfaeY3ZS2UJeGJzG3kRsd1MBOP0lQ8Ph8utuZk2GujhzuCacjF@gQ00BXmxdbpSPRJQrcSDoE9N2GiUpMDao3NjB7vcKg3v6jPjo8 "Python 2 ‚Äì Try It Online")
Based off [TFeld's solution](https://codegolf.stackexchange.com/a/161449/20260).
[Answer]
# [Haskell](https://www.haskell.org/), ~~74~~ ~~70~~ ~~67~~ 62 bytes
```
tail.("\n"%)
s%(x:r)=([1..x]>>s)++'*':(s++[' '|x<1])%r
s%[]=""
```
[Try it online!](https://tio.run/##FY4xC8IwFIT3/opHoCQxGGzdiuniqlBwEdIM0WoNprE0VTr4243J8Ljv4Lh3D@2fN2vDxTjYgACpsoQuYlLSmU80JQXGQA6vLhmVZb1ow6yN5QS1DuU08zlZqokKIgvOF1XXnjKGV7ginjGJAX@XXaFoPsWkVAKhMGiTvgx6PAIZ3/Npng4OOBDGUieN2MdLKyik1m2pwu96t7r3YX3eN80f "Haskell ‚Äì Try It Online") Takes a list of zeros and ones as input and returns a newline separated string.
Inspired by [xnor's answer](https://codegolf.stackexchange.com/a/161507/56433).
[Answer]
# [Emojicode](http://www.emojicode.org/), 251 bytes
```
üêñüéÖüèøüçáüç¶büî°üêï2üç¶cüî§*üî§üçÆeüî§üî§üçÆyüî§üî§üç¶küç°büîÇi küçáüçäüòõüî°iüî§1üî§üçáüçäüòõy eüçáüçâüçìüçáüòÄyüçâüçÆyüî§üî§üçÆyüç™e cüç™üçâüçìüçáüçÆyüç™y cüç™üçÆeüç™üî§ üî§ eüç™üçâüçâüòÄyüçâ
```
[Try it online!](https://tio.run/##S83Nz8pMzk9J/f9h/oRuhQ/zZzUBid52EHfah/l9rR/m9@8HCQDxsqQP86csBEpMNQLxkoG8JVogAshblwphQDiVSJxl2UBiIUhrU6ZCNtSorg/zZ8wGmZYJUmUIVQqXqVRIhXI7gXgyhD2joRIqgGI@iNO7KlUhGUSh6oDKVcLlQK4EMaYsUQATqUh6OuE2/AcRXECPN4KM4VKABYOCmaWlgakBkoChgYm5qakRF1gXAA "Emojicode ‚Äì Try It Online")
This is definitly not a golfed solution, but there isn't a person alive that would consider Emoji-code a golfing language. However, in the process of subjecting myself to the horrors that are emoji-code's syntax in an effore to teach myself this monstrosity of a language, I've been pleasantly surprised by just how powerful and efficient it can be üòÄ 
**Explaination:**
```
üêã üöÇ üçá    üë¥ Define Class
üêñüéÖüèøüçá    üë¥ Define Method
üç¶büî°üêï2    üë¥Convert Input integer to binary string
üç¶cüî§*üî§    üë¥ asterisk string
üçÆeüî§üî§    üë¥ Spacing string
üçÆyüî§üî§    üë¥ output string
üç¶küç°b    üë¥ translate to iteratable
üîÇi küçá    üë¥ for-in loop to iterate over each digit 
üçäüòõüî°iüî§1üî§üçá    üë¥ if digit is 1:
üçäüòõy eüçáüçâ    üë¥ don't print initial newline
üçìüçáüòÄyüçâ    üë¥ print spaces + asterisks
üçÆyüî§üî§    üë¥ reset output string
üçÆyüç™e cüç™üçâ    üë¥ add correct number of spaces and one asterisk
üçìüçá    üë¥ if digit is 0:
üçÆyüç™y cüç™    üë¥ add an asterisk to the output string
üçÆeüç™üî§ üî§ eüç™    üë¥ add another space to the space string
üçâüçâ
üòÄy    üë¥ print one last output string
üçâüçâ
üèÅüçá    üë¥ Start Program
 üéÖüèø 699050    üë¥ Call Method
üçâ
```
[Answer]
# JavaScript (ES6), 48 bytes
Same I/O format and same logic as the recursive version below.
```
a=>a.map((n,i)=>n?i&&p+0:+(p+=' '),p=`
`).join``
```
[Try it online!](https://tio.run/##HY69DoIwFEZ3n@JOtA3Xhh8rUVOcXF0ckYSKoDVy2wD6@ggOX3Ly5QznZb5mqHvrxzW5ezO1ejI6N7IznnNCK3RORxsEPoz2IfehZsAEel2tKiFfzlJVTYciRkgQUoQNgkLYImTzs9BuF6kIIY42mVKzoxKVxnG5kq3rT6Z@cgKdQ@1ocO9Gvt2Ds4JBCDSPlVdauOWFlJLk6C5jb@nBE1H@A8@f7tb0QizurAox/QA "JavaScript (Node.js) ‚Äì Try It Online")
Or **42 bytes** if [this format](https://tio.run/##HY6xDoIwFEV3v@JNtg3PhqKVoClOri6OSGJFQAy8NoD@PoLDTU5uznDe9muHom/8uCH3LKfKTNakVnbWc07YCJPSqVmvfRAeAu4DwwCYQG/uq7uYjplCiBC2CDsEjbBHiOdnoSQJdYigwl2s9ezoSG@Vyleycv3ZFi9OYFIoHA2uLWXras4yBgHQPJbfaOGKZ1JKkqO7jn1DNY9E/k@7fLpH2QuxuLMqxPQD) is acceptable.
---
# Recursive version, 56 bytes
Takes input as an array of integers (0 or 1). Uses `0` for filled and space for empty.
```
f=([n,...a],p=`
`,x=0)=>1/n?(n?x+0:+(p+=' '))+f(a,p,p):a
```
[Try it online!](https://tio.run/##FY4xb8IwEEZ3fsVtvpOvrh1wESDD1LVLxzQSJk0oCM5WSCv@feoMn/T06Q3vGv/iox0ueXyR9N1NUx@wFjbGxIZzOC6O/AyWwt69ygHl8NR2qzHroEAR6R4jZ860jdOudgwVw5JhxeAZ3hjW5Zlps7HeMji7WntfHF/5pXPNwvRpeI/tDwqEPbRJHunWmVs6o6oVaJAy1XzJzD3WpUrMmD7H4SJnrKgx95jx4/d@6gai2S0q0fQP "JavaScript (Node.js) ‚Äì Try It Online")
### Commented
```
f = (               // f = recursive function taking:
  [n, ...a],        //   n = current bit; a[] = remaining bits
  p = `\n`,         //   p = padding string, initialized to a linefeed
  x = 0             //   x = 0 on the 1st iteration / equal to p after that
) =>                //
  1 / n ?           // if n is defined:
    ( n ?           //   if n = 1:
        x + 0       //     append x + 0 --> either the integer 0 on the first iteration
                    //                      or the padding string followed by a '0'
      :             //   else:
        +(          //     append the integer 0 (whitespace coerced to a number)
          p += ' '  //     and append a space to the padding string
        )           //
    ) + f(a, p, p)  //   append the result of a recursive call with x = p
  :                 // else:
    a               //   append the empty array a[], forcing coercion to a string
```
[Answer]
# Bash + GNU utilities, 38
```
dc -e?2op|sed 's/\B1/^K^H*/g;s/[10]/*/g'
```
Here `^K` and `^H` are literal vertical-tab and backspace control characters. These don't render well on browsers, so this script may be recreated as follows:
```
base64 -d <<< ZGMgLWU/Mm9wfHNlZCAncy9cQjEvCwgqL2c7cy9bMTBdLyovZyc= > binpath.sh
```
Run in a terminal. Input is via STDIN.
This answer may stretch the specifications too far - there are in fact no leading characters on each line of output - all positioning is done with control characters. If this is too much of a stretch, then the output may be piped to `|col -x|tac` for an extra 11 bytes.
[Answer]
## Batch, 113 bytes
```
@set s=
:l
@shift
@if %1.==0. set s=%s%+&goto l
@echo %s%+
@if not %s%.==. set s=%s:+= %
@if %1.==1. goto l
```
Takes a list of bits as command-line arguments. Uses `+` instead of `*` because `*` has a special meaning inside `%s:...=...%` expansions.
[Answer]
# Java 10, ~~100~~ 106 bytes
```
b->{var s="";int i=0,j;for(var c:b){if(c)for(s+="\n",j=i;j-->0;)s+=0;else++i;s+=1;}return s.substring(1);}
```
Takes an array of booleans and returns a String (`0`s are empty, `1`s are filled). Try it online [here](https://tio.run/##lVLLboMwEDw7X2FxCRYBQVoapS6R2lsPPeWY5mCIQ0yJiWxDFUV8O10eeSin5rRivTM77EzGKuZmm5/mUMa5SHCSM63xFxMSn0ZISMPVliUcfwjJ1LHtoaVRQqb4wMzOjosi50yu1liW@5grQkeoHqGBTBtmoFSF2OA9UNo9FKaZSjXp2AbiuC8RbmJ3caqYwjqyLAoCsIj8SUa3hbLbdvIak5PY2glpO9qJrG9pTbJI0Mx1Fz4l0PIpzzV3HEHhI6C14qZUEmtPl7HuJNgBoXWDEMhFLU@3B7YHFMpbhGdQHYfAK1oeteF7ryiNdwCoyaXdi/W6C2xEKoy2BSFOq6Q9wD8h0/BxzMt87of@47jAf56F4fRxYDgNn4LgBte6q0TFDD/be83A@RZwzCEOt4G5WPwJqUq58kzRm9@/29cEoXtKAEn@e9k06My5TEEpWd@76HcuDthh7Gpo316JNUwOTMmOqXcDJuIowuNg3BIOoemnux@vmz8).
Thanks to [Olivier Gr√©goire](https://codegolf.stackexchange.com/users/16236/olivier-gr%C3%A9goire) for helping me golf it a bit more and alerting me to the fact that my output format was not up to the spec.
Ungolfed version:
```
b -> { // lambda taking an array of booleans as argument
    var s = ""; // the output String
    int i = 0,  // the number of "empty" characters to output
    j;          // iterator variable for outputting the "empty" characters
    for(var c : b) { // iterate over the boolean array (the binary digits)
        if(c) // if it's a '1'
            for(s += "\n", // output a newline
            j = i; j-- > 0;) s += 0; // output the "empty" characters
        else // if it's a '0'
            ++i; // move one to the right on the next line
        s += 1; // output the "filled" character
    }
    return s.substring(1); // output the constructed String, minus the leading newline
}
```
[Answer]
# [Java (JDK 10)](http://jdk.java.net/), 83 bytes
```
a->{int m[][]=new int[20][20],r=0,i=0;for(int b:a)m[r+=i<1?0:b][i++-r]=1;return m;}
```
[Try it online!](https://tio.run/##jZDBb4IwFMbv/BUvJktASgMoc4K47LJkh508Eg4FwdVBIW1xIYa/3RVUZrK47NA2fd/3fl9f9@RArP3280TLuuIS9uqOG0kLnDcslbRieBpoaUGEgHdCGRw1gLpJCpqCkESq41DRLZRK0zeSU7aLYiB8J4zBCvB64awok1GMhj2K15BDeCLW@qgKUPalkGVf0MuuHfcL8dBGNLSDvOJ670p8YpQRN0O6cp5tP4kjapoWj0Mn4JlsOIMy6E7BkDrEgMyEFBDC0UEumqE58tAjWiBXHcul7dnIsecLz3OR53ozx@kCbWhWgTAk9v3@mXId54pOKCO8Vew3JrNdxrGszuPrvR2Ba@D0g3ChG7gktZ5a69SaPxnK9sI5aXUjuMUpIM9EU0gFzDGp66LVzwmjb9MKmZW4aiSuVY4s2JD0lz5qlx/sU/xL0M88owxUibf139BcnzykE0Snjm3O3JEP0Gn3Wm7f0f3jrfe1vrvTutM3 "Java (JDK 10) ‚Äì Try It Online")
* Supports at most 20 bits.
* Input as `int[]`
* Output as `int[][]`
[Answer]
# [Haskell](https://www.haskell.org/), 126 bytes
```
(#)n=maximum.map(!!n)
f l|s<-scanl1(zipWith(+))$(\a->[1-a,a])<$>l=unlines[[last$' ':['#'|elem[x,y]s]|x<-[0..0#s]]|y<-[1..1#s]]
```
Input as a list of zeroes and ones. Transforms number into offset by `x‚Ü¶[1-x,x]` and calculates the partial sums. Final output is done with two nested list comprehensions.
[Try it online!](https://tio.run/##FY5BDoIwEADvvmINJLRBGmvixYCf8OCh9rBqCY3bldhi0PB3lNtM5jIdxocjmq@egRvfAtcaUucYjAVH0cFSxN2/gWEny9KE531BO4tMchNw9GEIKmAv1muWqxZoinUVb8ikxdf3Z586UUqZiwtWR6Mr3KCVdX6kZmDy7KIxhDHlBRQHU2TF5MgFM24@NtpprCuzVWqbRWunz1@0UnqROaDnRvRDOqWXatV/U8JuP/8A "Haskell ‚Äì Try It Online")
[Answer]
# [R](https://www.r-project.org/), 59 bytes
```
function(n,x=sum(n|1))matrix(1:x^2%in%cumsum((n-1)%%x+1),x)
```
[Try it online!](https://tio.run/##XY3RCoIwGIXvfQoZDP4/J7WRBFKv4AtEgonWwP3C2mhRPfvSbqTuDt/hO8dG8kadNTX2ke7ztPfUOj0SED6Jr7mqAWAYL2oCmcSJSCxlPiWu3kk/K3FxRDjcvAF6SUTTOKsDyDLUimvirTdzB/SVwzQmAsYeln8oEJNqnpSb7a4oVHK32nXQAkuZYCuGR5k5@FEqRDwJKYaOLu761wjBGMYP "R ‚Äì Try It Online")
Takes input as an array of bits.
Returns a boolean matrix of `TRUE` and `FALSE` representing a `*` and a , respectively.
Also has some stuff in the footer to print a matrix corresponding to the specs above, for ease of testing.
[Answer]
# APL+WIN, 65 or 46 bytes
Prompts for input of the integer
```
n‚Üê+/i‚Üê((1+‚åä2‚çün)‚ç¥2)‚ä§n‚Üê‚éï‚ãÑm‚Üê(n,n)‚ç¥' '‚ãÑm[‚äÇ[2](+\i),[1.1]1++\~i]‚Üê'*'‚ãÑm
```
or for numerical vector of the binary representation of the integer
```
m‚Üê(2‚ç¥+/n‚Üê‚éï)‚ç¥' '‚ãÑm[‚äÇ[2](+\i),[1.1]1++\~i]‚Üê'*'‚ãÑm
```
assuming I have read the comments to certain answers correctly and the latter input is allowed.
[Answer]
# Pyth, 23 bytes
```
p\*VtQINp+b*Zd.?=hZ)p\*
```
[Try it here](http://pyth.herokuapp.com/?code=p%5C%2AVtQINp%2Bb%2AZd.%3F%3DhZ%29p%5C%2A&input=%5B1%2C0%2C1%2C0%2C1%2C0%2C1%2C0%2C1%2C0%2C1%2C0%2C1%2C0%2C1%2C0%2C1%2C0%2C1%2C0%5D&debug=0)
### Explanation
```
p\*VtQINp+b*Zd.?=hZ)p\*
p\*                       Print the leading *.
   VtQ                    For each bit (excluding the leading 1)...
      IN      .?   )      ... If the bit is set...
        p+b*Zd            ... Print a newline and a bunch of spaces...
                =hZ       ... Otherwise, increase the count of spaces...
                    p\*   ... Then print the next *.
```
[Answer]
# [Perl 5](https://www.perl.org/) `-p`, ~~54~~ 36 bytes
```
s/./$&?"
".$"x$i.1:++$i&&1/ge;s/.//s
```
[Try it online!](https://tio.run/##K0gtyjH9/79YX09fRc1eiUtJT0WpQiVTz9BKW1slU03NUD891Rokq1/8/7@hoYGB4b/8gpLM/Lzi/7q@pnoGhgb/dQsA "Perl 5 ‚Äì Try It Online")
Cut it way down after I realized that the input could be a bit string.
[Answer]
# SmileBASIC, ~~64~~ ~~59~~ 57 bytes
```
INPUT N@L
GPSET X,Y
B=N<0X=X+B
Y=Y+(X>B)N=N<<1ON!N GOTO@L
```
The highest bit (sign bit) is checked, and if it's 1, the X position increases. If the sign bit is less than the X position (that is, the sign bit is 0 and X is not 0) the Y position increases.
The first movement will always be horizontally, so Y movement is blocked until after the first X movement. This ensures that the Y position doesn't increase during the leading 0 bits.
Then N is shifted left, and this repeats until N reaches 0.
[Answer]
# [Ruby](https://www.ruby-lang.org/), 63 bytes
```
->n{s=""
n.to_s(2).gsub(/./){$&==?1?"
"+s+?*:(s+=" ";?*)}[1,n]}
```
[Try it online!](https://tio.run/##FYpBDoIwEADvvGKzGEOhFgpUAqb2IUCMGNFTNbYcTOnbK55mMpnPMn3DLMPhrJ2RiJFm9nUxSUnYwyxTkrOcuN1eSsUVRpiZTKVdYjKJgCeVEt9zqkcfNkBJoaJQUxAUjhSarfytbQtRUOBF3QixPaIUFecju19vT3CrXeG9WAMYO@u7Qcdu7u3oB40@/AA "Ruby ‚Äì Try It Online")
[Answer]
# [Japt](https://github.com/ETHproductions/japt), ~~19~~ 17 bytes
```
√ã?R+T√Æ +Q:¬∞T¬©Q√É¬¨x
√ã?                 // Map over the input and if the current value is 1:
  R+               // Return a new line and
    T√Æ +           // a space repeated T (with initial value 0) times and
        Q          // a \".
         :         // If the current value is 0:
          ¬∞T       // Increment T
            ¬©Q     // and return \".
              √É    // When all of that is done,
               ¬¨   // turn the array into a string
                x  // and trim it, removing the excess new line at the start.
```
Takes input as an array of bits, for example `[1,0,1]`, outputs `"` instead of `*`.  
Shaved two bytes off thanks to [Oliver](https://codegolf.stackexchange.com/users/61613/oliver).
[Try it online!](https://tio.run/##y0osKPn//3C3fZB2yOF1CtqBVoc2hBxaGXi4@dCaiv//ow11DHUMgBBCAulYAA)
[Answer]
# Python 2, 113 Bytes
```
def f(a):
 o='*';r=[o]
 for i in bin(a)[3:]:
  if'0'<i:r+=[' '*len(r[-1][1:])]
  r[-1]+=o
 print'\n'.join(r)
```
Not sure if this one counts (it outputs an array of each of the lines), but if so then I'll change my byte count to 103:
```
def f(a):
 o='*';r=[o]
 for i in bin(a)[3:]:
  if'0'<i:r+=[' '*len(r[-1][1:])]
  r[-1]+=o
 print r
```
[Answer]
# TI-Basic (TI-84 Plus CE), 85 bytes
```
Prompt L
1→X
1→Y
DelVar [A]
sum(LL
{Ans,1-Ans+dim(LL→dim([A]
1→[A](Y,X
For(I,2,dim(LL
Y+LL(I→Y
X+not(LL(I→X
1→[A](Y,X
End
[A]
```
Prompts for a boolean list, returns a matrix of 0 and 1.
Goes through the list, incrementing X if the next 'bit' is 0, changing Y otherwise, then adding a 1 to the matrix at that location, and returns the matrix at the end.
TI-Basic is a [tokenized lanugage](http://tibasicdev.wikidot.com/one-byte-tokens).
* 1 byte: `Prompt` , `L`\*6, (newline)\*12, `1`\*5, `‚Üí`\*7, `X`\*5, `Y`\*5, `sum(`, `L`\*5, `{`, `Ans`\*2, `,`\*5, `-`, `+`\*3, `dim(`\*3, `(`\*4, `For(`, `I`\*3, `2`, `not(`, `End` = 73 bytes
* 2 bytes: `Delvar` , `[A]`\*5 = 12 bytes
* Total: 85 bytes
---
# TI-Basic (TI-84 Plus CE), 56 bytes
```
Prompt L
1→X
1→Y
Output(Y,X,"*
For(I,2,dim(LL
Y+LL(I→Y
X+not(LL(I→X
Output(Y,X,"*
End
```
Same processs as above, but using graphical output (limited by screen size: 10 rows, 26 columns, so max 10 1s and 25 0s) as it goes, instead of adding to a matrix.
[Answer]
## Pyth, 30 bytes
```
JZFG.BQIsGIJk)p+*ZdN.?pN=hZ)=J
```
[Try it online!](https://tio.run/##K6gsyfj/3yvKzV3PKdCz2N3TK1uzQFsrKsVPz77AzzYjStPW6/9/M0tLA1MDAA)
Uses `"` instead of `*`.
Python 3 translation:
```
Q=eval(input())
Z=0
J=Z
for G in "{0:b}".format(Q):
    if int(G):
        if J:
            print()
        print(Z*' '+'"',end='')
    else:
        print('"',end='')
        Z+=1
    J=Q
```
[Answer]
# x86 .COM, 32 bytes
```
00h: 66 D1 E6 66 0F BD CE BF 24 AD 8E DF 41 66 0F A3 
10h: CE 19 DB 81 E3 9E 00 8D 79 02 C6 05 2A E2 EE C3 
fun:
shl esi, 1
bsr ecx, esi
mov di, $ad24
mov ds, di
inc cx
lab2:
bt esi, ecx
sbb bx,bx
and bx,158
lea di,[di+2+bx]
mov [di],byte '*'
lab1:loop lab2
ret  
```
[Answer]
# [APL (Dyalog Classic)](https://www.dyalog.com/), 18 bytes
```
+‚åø‚Üë1‚Üë¬®‚ç®-+\,¬®‚àò~‚ç®0,‚éï
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT9dNzkksLs5M/v@ob2pm/qO2CQZcjzra0/5rP@rZ/6htoiEQH1rxqHeFrnaMDpDRMaMOyDHQAar@D1T3Pwmow@hR19JHvYsPrTd81LWIiyuNK0nBkEtdHcwwgjGMYQwTGMMUxjCDMczhuhBylpYGpgYwnqGBibmpKdxMUyNTY0NDAA "APL (Dyalog Classic) ‚Äì Try It Online")
]