def dec2bcd(dec):
    """Decimal to Binary Coded Decimal conversion

    Parameters
    ----------
    dec : decimal number

    Returns
    ----------
    bcd : int, binary coded decimal
    """
    t = dec // 10
    o = dec - t * 10
    return (t << 4) + o