Why we are multiplying it with 2? Because:
ex: $1010=10$. Eveyone knows
How to get this:
$\underbrace{1}010:1\times 2+0=2$. Take the first bit, $\times$ it with 2 and add the next bit i.e., $0$
$\underbrace{10}10:2\times 2+1=5$. Take the previous computed value, $\times$ it with 2 and add the next bit i.e., $1$
$\underbrace{101}0:5\times 2+0=10$. Take the previous computed value, $\times$ it with 2 and add the next bit i.e., $0$
$L.val= L_{1}.val\times 2+B.val$
$1010=101\times 2+0$