Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

convert int to hex binary in python

# Convert to Other Number Systems : Binary, Hex, Oct

#input >>
i = 12 

# convertion

print("Binary: " + str(bin(i)))
print("Octal: " + str(oct(i)))
print("Hex: " + str(hex(i)))
# output >>
# Binary: 0b1100
# Octal: 0o14
# Hex: 0xc
 
PREVIOUS NEXT
Tagged: #convert #int #hex #binary #python
ADD COMMENT
Topic
Name
2+2 =