memo.log

技術情報の雑なメモ

【Ruby】シフト演算メモ

irb(main):001:0> 1.to_s(2)
=> "1"
irb(main):002:0> 1 << 8
=> 256
irb(main):004:0> 256.to_s(2)
=> "100000000"