I\'m trying to send a series of binary bytes across a socket, to meet a particular standard my company uses. No one in my company has used Ruby for this before, but in other lan
Don't know if this helps enough, but you can index the bits in an integer in ruby.
n = 0b010101 n # => 21 n = 21 n[0] # => 1 n[1] # => 0 n[2] # => 1 n[3] # => 0 n[4] # => 1 n[5] # => 0