Re: print as a base 10 number
- From: Ico <usenet@xxxxxxx>
- Date: 26 Sep 2006 16:44:18 GMT
mike7411@xxxxxxxxx wrote:
If you have a string of a few hundred ones and zeros that represents a
binary number, what is the best way to print this as a base 10 number?
Try ruby :
puts "00101010111010101...101111111111000000000101110101010".to_i(2)
--
:wq
^X^Cy^K^X^C^C^C^C
.
- References:
- print as a base 10 number
- From: mike7411
- print as a base 10 number
- Prev by Date: Re: print as a base 10 number
- Next by Date: Re: "It doesn't matter if you're a good programmer, it's the syntax that matters"
- Previous by thread: Re: print as a base 10 number
- Index(es):