find binary coded decimal bcd of integer base 10 each digit of the number is represented by a 4bit binary example binarycodeddecimal2 0b0000 binarycodeddecimal1 0b0000 binarycodeddecimal0 0b0000 binarycodeddecimal3 0b0011 binarycodeddecimal2 0b0010 binarycodeddecimal12 0b00010010 binarycodeddecimal987 0b100110000111 find binary coded decimal bcd of integer base 10 each digit of the number is represented by a 4 bit binary example binary_coded_decimal 2 0b0000 binary_coded_decimal 1 0b0000 binary_coded_decimal 0 0b0000 binary_coded_decimal 3 0b0011 binary_coded_decimal 2 0b0010 binary_coded_decimal 12 0b00010010 binary_coded_decimal 987 0b100110000111
def binary_coded_decimal(number: int) -> str:
    
    return "0b" + "".join(
        str(bin(int(digit)))[2:].zfill(4) for digit in str(max(0, number))
    )


if __name__ == "__main__":
    import doctest

    doctest.testmod()