[]

big[n] â 0, 1
Instance Public methods

Bit ReferenceâReturns the nth bit in the (assumed) binary representation of big, where big is the least significant bit.

a = 9**15
50.downto(0) do |n|
  print a[n]
end

produces:

000101110110100000111000011110010100111100010111001
doc_ruby_on_rails
2015-03-31 11:28:41
Comments
Leave a Comment

Please login to continue.