{"title":"\u3010Ruby\u30112\u9032\u6570/8\u9032\u6570/16\u9032\u6570\u306e\u8868\u793a","url":"https://ml-rand-note.hatenablog.com/entry/ruby/binary-octal-hexadecimal","width":"100%","provider_url":"https://hatena.blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fml-rand-note.hatenablog.com%2Fentry%2Fruby%2Fbinary-octal-hexadecimal\" title=\"\u3010Ruby\u30112\u9032\u6570/8\u9032\u6570/16\u9032\u6570\u306e\u8868\u793a - \u30e9\u30f3\u30c9ML\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","type":"rich","author_url":"https://blog.hatena.ne.jp/round-rand/","height":"190","description":"2\u9032\u6570\u306e\u8868\u8a18 8\u9032\u6570\u306e\u8868\u8a18 16\u9032\u6570\u306e\u8868\u8a18 \u6587\u5b57\u5217\u3092\u6570\u5024\u306b\u5909\u63db to_i\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u65b9\u6cd5 oct\uff1a8\u9032\u6570\u5909\u63db hex\uff1a16\u9032\u6570\u5909\u63db \u53c2\u8003 2\u9032\u6570\u306e\u8868\u8a18 \u63a5\u982d\u8f9e\u306b0b\u3092\u4ed8\u3051\u307e\u3059\u3002 b\u306f2\u9032\u6570\u3092\u793a\u3059binary\u306e\u982d\u6587\u5b57\u3067\u3059\u3002 p 0b110 #=> 6 p 0b1111_1111 #=> 255 8\u9032\u6570\u306e\u8868\u8a18 \u63a5\u982d\u8f9e\u306b0o\u3092\u4ed8\u3051\u307e\u3059\u3002 o\u306f8\u9032\u6570\u3092\u793a\u3059octal\u306e\u982d\u6587\u5b57\u3067\u3059\u3002 p 0o013 #=> 11 p 0o120 #=> 80 16\u9032\u6570\u306e\u8868\u8a18 16\u9032\u6570\u306f\u63a5\u982d\u8f9e\u306b0x\u3092\u4ed8\u3051\u307e\u3059\u3002 x\u306f16\u9032\u6570\u306e\u82f1\u8a9e\u306ehexadecimal\u306e\u7565\u3067\u3059\u3002 p 0x011 #=> 17 p 0x0FF #=> 2\u2026","blog_title":"\u30e9\u30f3\u30c9ML","author_name":"round-rand","version":"1.0","published":"2026-06-27 00:00:00","categories":["Ruby"],"image_url":null,"provider_name":"Hatena Blog","blog_url":"https://ml-rand-note.hatenablog.com/"}