def parse_byte(a, b):
    """
    parse byte from two hex chars
    """
    err = None
    try:
        byte = int(a, 16) * 16
    except ValueError:
        byte = 0
        err = ValueError
    try:
        byte += int(b, 16)
    except ValueError:
        err = ValueError
    return byte, err
