A class for converting binary to decimal