Hi,
In message "How to convert "1110" to 14, "0111" to 7, etc."
on 02/02/26, andrew queisser <andrew_queisser / hp.com> writes:
|How can I convert a string of binary digits to a number?
|I've got this but I imagine there's some kind of
|built-in method. Is there?
If you're using 1.7.2, "1110".to_i(2) works. Otherwise, try
Integer("0b"+"1110")
("0b"+"1110").oct
matz.