|
-
December 13th, 2008, 02:21 PM
#1
Display an int in Binary
Hi ,
This might be simple , i just couldn't find out how i do it easily.
I have an int variable , i want to convert into string in binary format
ex.
int number1= 3;
i need the variable (a string) number_binary have the value "00000011" ( with 8 digit with leading zeros.)
where number1 <=127 so range is not a problem.
and , as you could probably guess , i need to some what modified the binary value and turn it back to an int , is there any easy way doing this?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|