Binary to decimal converter
Jelly, 5 bytes

DḤ+¥/


Try it online!

Explanation



The cast


D is a monad (single argument function): digits, turning 1234 into [1, 2, 3, 4].
Ḥ is a monad that doubles its single argument.
+ is a dyad (two argument function) that adds its left and right arguments.


From there, it gets a little tricky.

Here’s what happens at parse time


D, Ḥ, and + are read. The chain looks like [D, Ḥ, +].
The next two characters are quicks, which act like parse-time postfix operators on the links (functions) we've read so far.
When ¥ is read, the last two links get popped and replaced by a link that acts like the dyad formed by composing them. So now the chain looks like [D, dyad(Ḥ+)].
When / is read, the last link (which ought to be a dyad) gets popped and replaced by a monad that folds using this dyad (intuitively: f/ takes a list, replaces the commas in it with f, and evaluates the result.)
The final chain looks like [D, fold(dyad(Ḥ+))], two monads.


Here's what happens at run time


Input (a number) is implicitly read into the working value (say, 101010).
D is executed, replacing the working value with its digits ([1,0,1,0,1,0]).
fold(dyad(Ḥ+)) is executed, replacing the working value with 1∗0∗1∗0∗1∗0, where ∗ is the dyad Ḥ+.


So what does x∗y evaluate to?


In a dyadic definition, the working value is initially the left argument, x.
Ḥ, the double monad, doubles this value. The working value is now 2x.
+, the plus dyad, lacks a right argument, so this is a hook: a special syntactical pattern where the right argument of this dyad gets injected into +. This yields 2x + y as the final working value, which is returned.


So the whole expression evaluates to:

1∗0∗1∗0∗1∗0 = 2×(2×(2×(2×(2×1+0)+1)+0)+1)+0
            = 32×1 + 16×0 + 8×1 + 4×0 + 2×1 + 1×0
            = 42