There's a lot of room in there:
Math.pow(2,l=a.length)
1<<(l=a.length)
are the same, as are these: if(b[--j]==1)
~-b[--j]||