I just compiled the latest release of Ruby 1.9.0, and I'm getting 
unexpected behavior from it...

mark@imac% /usr/local/bin/ruby -e'puts sprintf("%08b",0),RUBY_VERSION'
11111110
1.9.0
mark@imac% /usr/bin/ruby -e'puts sprintf("%08b",0),RUBY_VERSION'
00000000
1.6.8

it looks like sprintf, when you ask it to pad binary values with zeros, 
is instead padding with ones! It doesn't seem t have a problem with 
hex, just binary.

-Mark