1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

1/3を2進数で表せますか?

Posted at

1. はじめに

 **1/3 (10)を2進数で表せますか?**2進数とは0と1で数を表す方法です。そして自然数を2進数で表す方法は多くの方が知っていると思います。小数はどのように表すのでしょうか?例えば1/4、つまり10進数の0.25は2進数で0.01 (2)と表わせます。では1/3はどうすれば表せるでしょうか?

2. 答え

正解は0.0101010・・・ (2)です。0と1を交互に繰り返します。

3. 解説その1

 直感的に分かる説明をします。まず1/3は0と1/2の間ですよね。そのため次のように表せることがわかります。

0 < 1/3 < 2/2 ⇔ 0 (2) < 1/3 < 0.1 (2)

次に1/3は1/4と1/2の間にあることが分かります。そのため次のように表せます。

1/4 < 1/3 < 2/4 ⇔ 0.01 (2) < 1/3 < 0.10 (2)

以下、これを繰り返していきます。

2/8 < 1/3 < 3/8 ⇔ 0.010 (2) < 1/3 < 0.101 (2)
5/16 < 1/3 < 6/16 ⇔ 0.0101 (2) < 1/3 < 0.1010 (2)
・・・

したがって1/3を2進数で表すとおそらく0.01010・・・(2)のようになると予測できます。

4. 解説その2

やっていることは同じなのですが、こっちの方が自分は好きです。

1/3 = 1/4 + 1/12
= 1/4 + 1/4 ・ 1/3
= 1/4 + 1/4 ・ (1/4 + 1/12)
・・・

したがって1/3 = 0.01010・・・(2)

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?