def convert_dest(code):
    """Convert any give destination code into it's corresponding binary code"""
    binary = '000'
    if code is None:
        return binary
    elif code == 'M':
        binary = '001'
    elif code == 'D':
        binary = '010'
    elif code == 'MD':
        binary = '011'
    elif code == 'A':
        binary = '100'
    elif code == 'AM':
        binary = '101'
    elif code == 'AD':
        binary = '110'
    elif code == 'AMD':
        binary = '111'
    else:
        raise ValueError(f"Syntax error, {code} is wrong destination code!")
    return binary