def bcd2dec(bcd):
    """Binary Coded Decimal to Decimal conversion

    Parameters
    ----------
    bcd : int, binary coded decimal

    Returns
    -------
    decimal number
    """
    return ((bcd & 0b11110000) >> 4) * 10 + (bcd & 0b00001111)