Tells if the value is a power of 2.
Returns:
44 45 46
# File 'lib/HDLRuby/hruby_tools.rb', line 44 def pow2? return self > 0 && (self & (self - 1) == 0) end