HP Inc. Interview Question

Write a code to convert Binary To Decimal number.