On Monday, February 17, 2003, 10:23:48 AM, Michael wrote:

> Hello, 
> I read some data from, for example, Tcp.
> These data are read into a String.
> Somewhere in these String are 4 bytes, which are the binary 
> representation of an Integer.


Does this help?

  str = "100101"
  Integer("0b" + str)           # -> 37

I'm sure there's some other way to do it, and you might find it in the
pickaxe.  (See www.ruby-doc.org if you don't know what this is.)

Gavin