From: Michael stepanov Date: 2006-06-22T18:37:23+09:00 Subject: Re: Convert String to BinaryString Logan Capaldo wrote: > On Jun 21, 2006, at 2:13 PM, Michael stepanov wrote: > >> Thanks in advance. >> >> >> -- >> Posted via http://www.ruby-forum.com/. >> > > % irb > irb(main):001:0> 12.to_s(2) > => "1100" > irb(main):002:0> "12".to_i.to_s(2) > => "1100" I found how to send what I need with pack: s = [1,3,144,3,50].pack("NnNNe") print s.unpack("H*")[0] => 000000010003000000720000000342480000 pack is cool, but Template characters I found here - http://www.rubycentral.com/ref/ref_c_array.html#include_qm -- Posted via http://www.ruby-forum.com/.