def dec_to_bcd_8421(num):
    bcd, binary, decimals = '', '', ''
    for digit in str(num):
        binval = encoders.dec_to_bin(int(digit))
        binary += '{}{}'.format(binval, ' ' * (4 - len(binval) + 1))
        if len(binval) < 4:
            binval = binval.zfill(4)
        bcd += '{} '.format(binval)
        decimals += digit + (' ' * 4)
    _show_bcd(num, decimals, binary, bcd)
    return bcd
Connect to an instant messaging server.
dataset/ETHPy150Open christabor/MoAL/MOAL/computer_organization/bcd.py/dec_to_bcd_8421--crossover with--dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/sub_collab/negotiator/irc.py/IRCNegotiator.connect