# The function binary_to_decimal("1101") is called. # It converts 1101 from binary to decimal. # The binary number 1101 can be expanded as: # 1^2 * 2^2 + 1^2 * 2^2 + 0^2 * 2^2 + 1^2 * 2^2 =8+4+0+1=13 ...
print("The decimal value of", dec, "is:") print(bin(dec), "in binary.") print(oct(dec), "in octal.") print(hex(dec), "in hexadecimal.") ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results