From: andrew_queisser@... (andrew queisser) Date: 2002-02-26T09:24:44+09:00 Subject: How to convert "1110" to 14, "0111" to 7, etc. 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? def BinStrToNum ( binStr ) sum = 0 digit = 1 binStr.reverse.each_byte { |i| sum += (i-48)*digit digit <<= 1 } return sum end Thanks, Andrew