import struct


def _convert_bcd_to_decimal(in_val):
    """
    Converts Binary Coded Decimal to a decimal value
    :param in_val: The value to convert
    :return: The decimal value
    """
    tens = (struct.unpack('B', in_val)[0]) >> 4
    actual = struct.unpack('B', in_val)[0]
    low_byte = tens << 4
    return (tens*10) + (actual-low_byte)