Hi,
I want to know how to convert a decimal integer into its binary form??
I came across a code which used BIT OPERATORS; I could not understand it.
pLEASE HELP ME WITH THIS.
Note: This is not my ASSIGNMENT PROBLEM. I know one way of converting decimal into binary and the code is as below..
binary = 0
while decimal != 0:
bit = decimal % 2
binary = bit + (10 * binary)
decimal = decimal / 2
I want to know the other way using BIT operator and thats why I have posted this query.
Thanks in advance.
Regards,
Asrar
______________
To HIM you shall return.