From: Florian Gross Date: 2004-09-23T03:29:35+09:00 Subject: Re: negative numbers and binary formats Paul wrote: Moin! > Im trying to take a negative integer value, convert it to its binary > equivalent, and save its hex value > > -7 -> 1111 1001 -> F9 Does this help? irb(main):032:0> [-7].pack("c").unpack("H*").first => "f9" > Thanks > Paul Regards, Florian Gross