<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>xibbar</author_name>
  <author_url>https://blog.hatena.ne.jp/xibbar/</author_url>
  <blog_title>福島餃子Ruby親方</blog_title>
  <blog_url>https://xibbar.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>何年やっても次々と新しい発見があるという Rubyですが、ほんとにいろいろ発見があります。 最近は組み込み系のマシンにRubyのプログラムを のっける関係でビット処理をしていたのですが、 いろいろ発見がありましたね。 特定のビットが立っているかを調べる 最初、こんなコードを書いていました。 def flag_b (@flag &amp; 0b0010) == 0b0010 ? true : false end なんとかならんのか？と思っていたら、 def flag_b @flag[1] == 1 ? true : false end これでよかった。 trueとかfalseでなくて、1か0を返すなら、…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fxibbar.hatenablog.com%2Fentry%2F20130312%2F1363046676&quot; title=&quot; ビット処理ノウハウ - 福島餃子Ruby親方&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2013-03-12 09:04:36</published>
  <title> ビット処理ノウハウ</title>
  <type>rich</type>
  <url>https://xibbar.hatenablog.com/entry/20130312/1363046676</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
