def hex_to_bin(hex_value) -> str:
    """ Convert all hex digits to binary representation, with leading zeroes """
    bin_len = 4*len(hex_value)      # 4 bits per hex
    return "{0:0{width}b}".format(int(hex_value, 16), width=bin_len)