Re: [Tutor] How to convert a decimal integer into binary

2006-09-20 Thread wesley chun
> I came across some code, which uses bit operator. I could not understand how > the logic of that code. If anyone knows to convert the decimal into binary > using BIT OPERATOR, then please help me. please reply to the list, not just me. since this is your homework assignment, i cannot give you

Re: [Tutor] How to convert a decimal integer into binary

2006-09-19 Thread wesley chun
> Can anyone help me with teh problem of "converting a decimal number into its > binary equivalent"?? this sounds like a homework problem, so no code here. however, the answer is trivial once you realize that all integers are natively available in any base, whether it be 2, 8, 10, 16, etc. sinc

Re: [Tutor] How to convert a decimal integer into binary

2006-09-19 Thread Alan Gauld
> You should be able to find a tutorial on this on-line somewhere. > > you know that > decimal: 1 = binary: 0001 > decimal: 2 = binary: 0010 > decimal: 4 = binary: 0100 > decimal: 8 = binary: 1000 > > Do you see the pattern here? > It's powers of 2. You can use the math approach or a slightly s

Re: [Tutor] How to convert a decimal integer into binary

2006-09-18 Thread Luke Paireepinart
Asrarahmed Kadri wrote: > Can anyone help me with teh problem of "converting a decimal number > into its binary equivalent"?? > Ah, sorry, I didn't read the subject line, just the e-mail. You said a decimal integer into binary. I thought you meant any random decimal value. My bad :) You should

Re: [Tutor] How to convert a decimal integer into binary

2006-09-18 Thread Luke Paireepinart
Asrarahmed Kadri wrote: > Can anyone help me with teh problem of "converting a decimal number > into its binary equivalent"?? > How is your decimal number stored? > Thanks in anticipation. > > Regards, > Asrar Kadri > >

[Tutor] How to convert a decimal integer into binary

2006-09-18 Thread Asrarahmed Kadri
Can anyone help me with teh problem of "converting a decimal number into its binary equivalent"??   Thanks in anticipation.   Regards, Asrar Kadri   --   Winners are willing to do things that losers wont do. ___