On Wed, Nov 24, 2004 at 12:48:22AM +0900, ruby talk wrote: > 10000010 65 01000010 66 > > the output is still wrong It's printing the LSB first. unpack("B8") would do what you expect. Alternatively num.to_s(2) or "%08b" % num . -- Hassle-free packages for Ruby? RPA is available from http://www.rubyarchive.org/