def float_to_bin(num, length):
    """
    Convert float number to binary systems

    :param num: Number to change
    :type num: float

    :param length: The maximum length of the number in binary system
    :type length: int

    :return: Returns a number converted to the binary system
    :rtype: string
    """
    temp_2 = ''
    temp = float(num)
    for x in range(length):
        temp = temp * 2
        if temp < 1:
            temp_2 += "0"
        else:
            temp_2 += "1"
            temp -= 1
    return temp_2