human
Binary representation of a given number | bin function.
Driver Code"
Solution in Python:

Can you provide a code to binary representation of a given number and the other steps required?
assistant
#Here is code to binary representation of a given number and the other steps required.
 def bin ( n ) :
	i = 1 << 31
	while ( i > 0 ) :
		if ( ( n & i ) != 0 ) :
			print ( "1" , end = " " )
		else :
			print ( "0" , end = " " )
		i = i // 2
bin ( 7 )
print ( )
bin ( 4 )