From: khaines@... Date: 2007-01-15T02:54:08+09:00 Subject: Re: how to translate base 10 number into base 2 number On Mon, 15 Jan 2007, chen li wrote: >> a = 125 >> puts a.to_s(2) >> 1111101 >> >> >> Kirk Haines > > Thanks. But is is possible do the opposite, from > 111101 to 125 change? puts '1111101'.to_i(2) 125 Kirk Haines