Von neuman loves binary

Couldnt understand the above problem’s solution. Please help.

Hey Divyam, in this problem you are supposed to simply convert the binary representation of a number to its decimal representation. And If you don’t know how to convert binary to decimal I would recommend you to watch this.

We can solve it without arrays?

Hey Divyam, Yes there is no need to use arrays in this problem.

can you please provide solution to this problem?