Jeremy Tregunna
1/14/2007 5:21:00 PM
On 14-Jan-07, at 12:19 PM, chen li wrote:
>
>> This doesn't answer your question, but in case you
>> were not aware, Ruby
>> will do this conversion for you:
>>
>>
>> a = 125
>> puts a.to_s(2)
>> 1111101
>>
>>
>> Kirk Haines
>
> Thanks. But is is possible do the opposite, from
> 111101 to 125 change?
"111101".to_i(2)
=> 125
--
Jeremy Tregunna
jtregunna@blurgle.ca