In python 4 type of number system

Number System Name Range Base Start
Binary Number System 0-1 2 0B or 0b
Decimal Number System 0-9 10
Octal Number System 0-7 8 0O or 0o
Hexa-decimal Number System 0-15 0-9 a-f 0X or 0x

In Python Binary Number System

Binary Number System use for digital Signal

def getBinaryValue():
	a=0b101010
	b=0B111111
	print(a," ",b)
getBinaryValue()
42   63

In Python Decimal Number System

def getDecimalValue():
	a=1234
	b=4321
	print(a," ",b)
getDecimalValue()
1234   4321

In Python Octal Number System

def getOctalValue():
	a=0o123
	b=0O321
	print(a," ",b)
getOctalValue()
83   209

In Python Hexa-decimal Number System

def getHexadecimalValue():
	a=0x1a2b3f
	b=0X3a2d1e
	print(a," ",b)
getHexadecimalValue()	
1715007   3812638

In python Get ASCII Value using ord() function

def getAnyASCIIValue():
	value=input("Enter any value and get ASCII value : ")
	print(ord(value))
getAnyASCIIValue()
Enter any value and get ASCII value : ~
126
Enter any value and get ASCII value : @
64
Enter any value and get ASCII value : a
97
Enter any value and get ASCII value : A
65

In python Get Binary Value using bin() function

def getInBinaryFrom():
	value=int(input("Enter any value and get Binary value : "))
	print(bin(value))
getInBinaryFrom()
Enter any value and get Binary value : 12345
0b11000000111001

In python Get Octal Value using oct() function

def getInOctalFrom():
	value=int(input("Enter any value and get Binary value : "))
	print(oct(value))
getInOctalFrom()
Enter any value and get Binary value : 123456
0o361100

In python Get Hexadecimal Value using oct() function

def getInHexadecimalFrom():
	value=int(input("Enter any value and get Hexadecimal value : "))
	print(hex(value))
getInHexadecimalFrom()	
Enter any value and get Hexadecimal value : 123
0x7b