Output N in base -10
JavaScript (ES6), 51 45 37 bytes

f=n=&gt;n&amp;&amp;n%10+((k=n&lt;0)+f(k-n/10|0))*10


Test cases



f=n=&gt;n&amp;&amp;n%10+((k=n&lt;0)+f(k-n/10|0))*10

console.log("12 -&gt; " + f(12))
console.log("2048 -&gt; " + f(2048))