Clarivate interview question

Write program to convert binary to decimal