Plant a binary forest! Inspired by A014486.

Challenge

Given an integer input in base 10, construct a representation for the binary forest corresponding to the input. Representations include, but are not limited to, nested arrays and strings.

How?

Convert the input to binary. 1s represent branches, and 0s represent leaves.

To make this easier to understand, let's use 834 (1101000010 in binary) as an example.



We start with the first digit. The first digit is a 1, so we draw branches:



\ /
 1


or as an array, {{1}}



The next digit is 1, so we draw more branches (we go from left to right):


\ /
 1
  \   /
    1


or as an array, {{1, {1}}}



The next digit is 0, so we place a leaf:


0
 \ /
  1
   \   /
     1


or as an array, {{1, {1, 0}}}



The next digit is a 1, so we place a branch:


     \ /
0     1
 \   /
   1
      \     /
         1


or as an array, {{1, {1, 0, {1}}}}



Repeating the process, we obtain the following tree after the 8th digit:


    0   0
     \ /
0     1
 \   /
   1           0
      \     /
         1


or as an array, {{1, {1, 0, {1, 0, 0}}, 0}}



For the remaining digits, we draw more trees:

The 9th digit is a 0, so we place a leaf (aww, it's a young shoot!)


    0   0
     \ /
0     1
 \   /
   1           0
      \     /
         1         0


or as an array, {{1, {1, 0, {1, 0, 0}}, 0}, 0}



When we use all the digits, we end up with this:


    0   0
     \ /
0     1
 \   /
   1           0       0
      \     /           \ /
         1         0     1


or as an array, {{1, {1, 0, {1, 0, 0}}, 0}, 0, {1, 0}}



That looks weird, so we pad a zero to complete the tree:


    0   0
     \ /
0     1
 \   /
   1           0       0   0
      \     /           \ /
         1         0     1


or as an array, {{1, {1, 0, {1, 0, 0}}, 0}, 0, {1, 0, 0}}

Note that the flattening the array yields the original number in binary, but with a padded zero.

Criteria


The output must clearly show the separation of the trees and branches (if it is not a nested array, please explain your output format).
Extracting all digits from the output must be identical to the binary representation of the input (with the padded zero(s) from the above process).


Test cases

The output may differ as long as it meets the criteria.


0    -> {0}
1    -> {{1, 0, 0}}
44   -> {{1, 0, {1, {1, 0, 0}, 0}}}
63   -> {{1, {1, {1, {1, {1, {1, 0, 0}, 0}, 0}, 0}, 0}, 0}}
404  -> {{1, {1, 0, 0}, {1, 0, {1, 0, 0}}}}
1337 -> {{1, 0, {1, 0, 0}}, {1, {1, {1, 0, 0}, {1, 0, 0}}, 0}}


Scoring

This is code-golf, so lowest bytes wins!
Befunge, 138 117 104 bytes

p&amp;1v
%2:_v#:/2p9p00+1:g00
3\9g&lt;&gt;$\:!v!:&lt;
9g!v ^,"}"_1-\1-:
"0"_2\"1{",,:|:,
`#@_\:#v_"}",&gt;$\:8
,"0":-1&lt;^


Try it online!

Explanation

Line 1 reads a number from stdin, and line 2 converts that number to a binary sequence which it stores in the playfield on line 10. Lines 3 to 5 then iterate over those binary digits, outputting the appropriate tree representation as each digit is processed. The Befunge stack is used to keep track of the depth into the tree and how much leaf space is left at each level so we know when to create a new branch. Lines 6 and 7 handle the final 0 padding to fill up any empty leaves.

In order to golf this as much as possible, I removed the commas from the output as well as the extraneous outer braces. This still hasn't beat the Mathematica solution, but it's been fun trying.

If you want to see what it looked like with the original verbose output format, I saved an earlier version of the code here (131 bytes).