Tumblr Interview Question

Convert a binary number to decimal