<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>a4lg</author_name>
  <author_url>https://blog.hatena.ne.jp/a4lg/</author_url>
  <blog_title>@a4lg のそろそろ技術的日記</blog_title>
  <blog_url>https://a4lg.hatenadiary.org/</blog_url>
  <categories>
    <anon>math</anon>
  </categories>
  <description>[twitter:@iorivur] さんがつぶやいた、グレイコードを直接出すカウンタは…できました。けど複雑な上に実質加算器なので、個人的にはこれはあまり好きになれません。 グレイコードとは グレイコードとは、1 ステップ進めると 1 ビットだけ変化するという性質を持つ n ビットの数値符号です。ここでは、3 ビットのグレイコードを見てみましょう。 v b2 b1 b0 0 0 0 0 1 0 0 1 2 0 1 1 3 0 1 0 4 1 1 0 5 1 1 1 6 1 0 1 7 1 0 0 C 言語では、次の関数でグレイコードに変換できます。 int graycode(int v) {…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fa4lg.hatenadiary.org%2Fentry%2F20120105%2F1325764810&quot; title=&quot; グレイコード→次のグレイコード的なカウンタ - @a4lg のそろそろ技術的日記&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>2012-01-05 21:00:10</published>
  <title> グレイコード→次のグレイコード的なカウンタ</title>
  <type>rich</type>
  <url>https://a4lg.hatenadiary.org/entry/20120105/1325764810</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
