<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>rubyco</author_name>
  <author_url>https://blog.hatena.ne.jp/rubyco/</author_url>
  <blog_title>rubyco（るびこ）の日記</blog_title>
  <blog_url>https://rubyco.hatenadiary.org/</blog_url>
  <categories>
    <anon>am</anon>
  </categories>
  <description>指定したビット数のグレイコード表を作ります。 def gray_table(n) fmt = sprintf(&quot;%%0%db\n&quot;, n) (0...(1 &lt;&lt; n)).each do |i| printf(fmt, i ^ (i &gt;&gt; 1)) end end gray_table(5)実行結果です。 00000 00001 00011 00010 00110 00111 00101 00100 01100 01101 01111 01110 01010 01011 01001 01000 11000 11001 11011 11010 11110 11111 11101 11100 1010…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Frubyco.hatenadiary.org%2Fentry%2F20060308%2Fgraycode&quot; title=&quot;グレイコード - rubyco（るびこ）の日記&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>2006-03-08 00:00:02</published>
  <title>グレイコード</title>
  <type>rich</type>
  <url>https://rubyco.hatenadiary.org/entry/20060308/graycode</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
