From: Marcin Tyman Date: 2008-05-06T20:29:03+09:00 Subject: Conversion mask in hex to bit mask Hi, The issue is: how to convert hex mask to bit mask? For instance: I have 0xffff0000 -> it can be represent by 255.255.0.0 or by string of bits - 16 My question is how to convert such hexes to bit mask (the 16 in above example) Thanks in advance, Have a nice day -- Posted via http://www.ruby-forum.com/.