Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340
n進法と四則演算の問題の解法 | 夢を叶える塾
スポンサーリンク

n進法と四則演算の問題の解法

ホームページのリニューアルに伴い一部のページは新しいサイトにリダイレクトされます。

 

n進法で表された数の四則演算の問題です。

基本問題

次の計算をしなさい。
(1)10010_{(2)}+10011_{(2)}
(2)12310_{(4)}-3102_{(4)}
(3)310_{(5)}\times 122_{(5)}

解き方

和は位上がりに注意して計算します。
差は上の位から借りてくるときに注意して計算します。
ちなみに割り算は、積と差を求める事ができれば10進数の要領で求めることができます。

n進法の計算なのでまずn進法の数がどういう数になるのか知らなければ手が付けられません。
n進法の数についてはn進数の問題の解法をご参照ください。

解説

まずn進法の足し算の前に位上がりについて触れておきます。

一番わかりやすい10進数から始めましょう。
9+1=10
当たり前です。
これはn進法ぽく書くと
9+1=0\times 10+10\times 1=1\times 10+0\times 1
こういう事になります。
各桁を0から9までの数で表す必要があります。
1桁目の数が9を超えてしまったので、2桁目の位に1を足し、1桁目の位から10を引きました。
9+1=0 \times 10 + 10 \times 1=1\times 10+0\times 1=10
という位上がりの計算をやっているんですね。

次に2進数で考えてみましょう。
1_{(2)}+1_{(2)}を計算してみます。
1+1=(0\times 2+1\times 1)+(0\times 2+1\times 1)=(0\times 2+2\times 1)
2進数は各桁を0から1の数で表す必要があります。
1桁目の数が1を超えてしまったので、2桁目の位に1を足し、1桁目の位から2を引きました。
1+1=(0+1) \times 2 + (2-2) \times 1=1\times 2+0\times 1=10_{(2)}
という位上がりの計算をやっているんですね。

5進数でも同じです。
1_{(5)}+1_{(5)}であれば
1+1=(0\times 5+1\times 1)+(0\times 5+1\times 1)=(0\times 5+2\times 1)
こういう計算になりますが5以上の数が出てきていませんから、特に位上がりは必要ないです。
1_{(5)}+1_{(5)}=2_{(5)}になります。
3_{(5)}+4_{(5)}であれば
3+3=(0 \times 5 + 3 \times 1)+(0 \times 5 + 4 \times 1)
=0\times 5+7\times 1
これは4より大きい数が出てきたので位上がりが必要です。
2桁目に1を足し、1桁目から5を引きます。
=(0+1)\times 5+(7-5)\times 1
=1\times 5+2\times 1
=12_{(5)}

後は10進数の通常の足し算等と同じです。
位の小さいほうから計算していきます。

次にひっ算についてです。
10進数の普通のひっ算と基本的にやり方は同じです。
位上がりになる数が10ではなく、nになるという点だけ気をつけましょう。
簡単に紙芝居で説明します。

まず1_{(2)}+1_{(2)}です。
ひっ算で書けば
1+1_1

の様になります。
右端の1桁目から計算していきます。
二進数の計算では1+1=10ですね。
位上がりが起きている点に注意しましょう。
1桁目に0を、2桁目に位上がりの1を小さく書いておきます。
1+1_2

次に2桁目です。
元々の数は2桁目が0ですが位上がりが起きているので1があります。
0+0+1=1ですね。
1+1_3

ひっ算の完成です。

次に110_{(2)}+11_{(2)}で説明します。
11+110_1

1+1と同じよう、右端の1桁目から計算していきます。
1+0=1です。
位上がりは置きませんのでそのまま1を書きます。
11+110_2

続いて2桁目は1+1=10で位上がりが起きています。
2桁目に0を、3桁目に1を小さく書いておきます。
11+110_3

3桁目は2桁目で位上がりが起きていましたので、0+1+1=10です。
再び位上がりが起きていますので、3桁目に0、4桁目に小さく1を書いておきます。
11+110_4

元々の数は4桁目が0ですが位上がりが起きているので1があります。
0+0+1=1です。
11+110_5

これでひっ算の完成です。

一番基本となる足し算のみ説明しました。
引き算も位下がりの考え方が10からnに変えることで、従来のひっ算の計算をすることができます。

(1)10010_{(2)}+10011_{(2)}
桁の小さい位から和を求めていきます。
10010_{(2)}+10011_{(2)}
0+1=1
特に位上がりはありません。
10010_{(2)}+10011_{(2)}
1+1=2=10
位上がりになります。
ここまでで101となります。
10010_{(2)}+10011_{(2)}
1+0+0=1
冒頭の1は位上がりがあったので1を足しています。
この桁の計算では特に位上がりはありません。
10010_{(2)}+10011_{(2)}
ここまでで101となります。
0+0=0
特に位上がりはありません。
ここまでで0101となります。
10010_{(2)}+10011_{(2)}
1+1=2=10
位上がりになります。
ここまでで100101となります。
10010_{(2)}+10011_{(2)}010010_{(2)}+010011_{(2)}と言えます。
010010_{(2)}+010011_{(2)}
1+0+0=1
位上がりがあったので1を足しています。
特に位上がりはありません。
ここまでで100101となります。
よって100101_{(2)}となります。

また、10進数で計算して検算しておけると安心です。
10010_{(2)}+10011_{(2)}=19+18=37=100101_{(2)}

(2)12310_{(4)}-3102_{(4)}
桁の小さい位から差を求めていきます。
0-2
上の位から借りてきます。
0-2+4=2
借りるときは4進数なので4になります。
次の位に進みます。
1-0-1=0
先程4を借りていますので、1を引いています。
ここまでで02となります。
次の位に進みます。
3-1=2
ここまでで202となります。
次の位に進みます。
2-3
上の位から借りてきます。
2-3+4=3
借りるときは4進数なので4でした。
ここまでで3202となります。
次の位に進みます。
1-0-1=0
先程4を借りていますので、1を引いています。
ここまでで3202となります。
よって3202_{(4)}となります。

(3)310_{(5)}\times 122_{(5)}
10進数のときは、各位1つとの積を計算し、桁をずらして書きました。
310_{(5)}\times 122_{(5)}=(310\times 100+310\times 20+310\times 2)_{(5)}
という要領になります。

310_{(5)}\times 2_{(5)}=620_{(5)}=1120_{(5)}
ここでしっかり5進数に直しても良いですし、後でまとめてでもいいです。
ただ、後でまとめて直すと位上がりが複雑になります。
310_{(5)}\times 20_{(5)}=6200_{(5)}=11200_{(5)}
310_{(5)}\times 100_{(5)}=31000_{(5)}
これらを足します。
310_{(5)}\times 122_{(5)}=(31000+11200+1120)_{(5)}
=(43320)_{(5)}

終わりに

n進数の定義を理解していると計算もあまり難しくありません。
難しいと感じるときは定義を繰り返し確認しましょう。

シェアする

  • このエントリーをはてなブックマークに追加

フォローする

にほんブログ村 地域生活(街) 東北ブログへ にほんブログ村 地域生活(街) 東北ブログ 米沢情報へ にほんブログ村 教育ブログへ にほんブログ村 教育ブログ 塾教育へ
スポンサーリンク