From: Rob Lee Date: 2006-10-19T08:29:25+09:00 Subject: Bitwise operations Hi, I have a binary packet stored in a string. I also have a packet specification and I'd like to print the first byte as a hex value to check it corresponds to the expected value from the specification ('7F'). I can't understand how to access the first byte from a string (a series of 8 bit bytes I believe). There don't seem to be any bit-shift operators in Ruby for a string - could anybody advise how I go about this ? Thanks -- Posted via http://www.ruby-forum.com/.