Tumblr interview question

Convert a binary number to decimal