Sha256: 377b97ccaa85e29b4bc1f9fd3b88bee80fd01df909a177c9684798681bbc7cbb

Contents?: true

Size: 121 Bytes

Versions: 13

Compression:

Stored size: 121 Bytes

Contents

Format an Integer as binary:

    "%b" % 0x41
    # => "1000001"

Or even simpler:

    0x41.to_s(2)
    # => "1000001"

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ronin-2.1.0 data/tips/ruby/integer_binary_format.txt
ronin-2.1.0.rc1 data/tips/ruby/integer_binary_format.txt
ronin-2.0.5 data/tips/ruby/integer_binary_format.txt
ronin-2.0.4 data/tips/ruby/integer_binary_format.txt
ronin-2.0.3 data/tips/ruby/integer_binary_format.txt
ronin-2.0.2 data/tips/ruby/integer_binary_format.txt
ronin-2.0.1 data/tips/ruby/integer_binary_format.txt
ronin-2.0.0 data/tips/ruby/integer_binary_format.txt
ronin-2.0.0.beta5 data/tips/ruby/integer_binary_format.txt
ronin-2.0.0.beta4 data/tips/ruby/integer_binary_format.txt
ronin-2.0.0.beta3 data/tips/ruby/integer_binary_format.txt
ronin-2.0.0.beta2 data/tips/ruby/integer_binary_format.txt
ronin-2.0.0.beta1 data/tips/ruby/integer_binary_format.txt