def dec_to_bin(decimal_number, bit_depth=0):
    """
    Accepts a decimal integer.
    Returns a binary number in a string.
    Optional parameter takes the bit depth: up to how many bits need to add the number
    """
    if decimal_number == 0:
        return '0' if bit_depth == 0 else '0' * bit_depth
    binary_number = ''
    while decimal_number > 0:
        bit = decimal_number % 2
        binary_number = str(bit) + binary_number
        decimal_number = (decimal_number - bit) // 2
    if bit_depth != 0:
        amount_bits_fill = bit_depth - len(binary_number)
        bits_fill = '0' * amount_bits_fill
        return bits_fill + binary_number
    return binary_number
