第4章数の表し方と計算
Errors in Converting Between Bases進法の間の変換での誤り
There are some common errors that are made when converting between bases. Often, it comes down to using an “illegal” symbol in the new base.
英語のヒント
進法の間で変換するときによくある誤りがいくつかある。たいていは、新しい進法で「使えない」記号を使ってしまうことに行き着く。
Example 4.25例題 4.25
Detecting an Illegal Symbol When Converting Between Bases進法の間の変換で使えない記号を見つける
A base 10 number is converted to base 7 and the result was 20817. Was an error committed? How do you know?
英語のヒント
10進法の数を7進法に変換したら、結果は20817だった。誤りがあったか。どうしてわかるか。
Solution解答
The result has the digit 8 in it. In base 7, 8 is an illegal symbol. Based on that, an error was committed.
英語のヒント
結果に数字8が入っている。7進法では、8は使えない記号である。それをもとに、誤りがあったといえる。
When converting from base 10 to another base, an illegal symbol will be used if a mistake was made in the division process used to find the number in the new base. Since the digits are based on the remainders, any remainder that is an illegal symbol would indicate an error.
英語のヒント
10進法からほかの進法に変換するとき、新しい進法の数を求めるのに使う割り算の手順でまちがえると、使えない記号が使われることになる。数字は余りにもとづくので、使えない記号になる余りがあれば、誤りがあることを示す。
Example 4.26例題 4.26
Detecting an Error in Division When Converting Between Bases進法の間の変換で割り算の誤りを見つける
When changing from base 10 to base 8, the division process resulted in the following remainders: 1, 0, 9, 2, 4. Was an error committed? How do you know?
英語のヒント
10進法から8進法に変えるとき、割り算の手順で次の余りが出た:1、0、9、2、4。誤りがあったか。どうしてわかるか。
Solution解答
The remainders include 9, which in base 8 is an illegal symbol.
英語のヒント
余りに9が含まれていて、これは8進法では使えない記号である。
Another possible way to detect an error in converting between bases is to count the number of digits. When converting from a higher base to a lower base, the number of digits cannot get smaller. Similarly, when converting from a lower base to a higher base, the number of digits cannot get bigger. So, if a base 10 number is converted to a base 3 number, the number of digits in the new base 3 numbers cannot be less than the number of digits in the base 10 number. Similarly, if a base 7 number is converted to base 10, the number of digits in the base 10 number cannot be more than the number of digits in the original base 7 number.
英語のヒント
進法の間の変換で誤りを見つけるもう一つのやり方は、数字の個数を数えることである。大きい進法から小さい進法に変換するとき、数字の個数が少なくなることはありえない。同じように、小さい進法から大きい進法に変換するとき、数字の個数が多くなることはありえない。だから、10進法の数を3進法の数に変換したら、新しい3進法の数の数字の個数は、10進法の数の数字の個数より少なくなることはありえない。同じように、7進法の数を10進法に変換したら、10進法の数の数字の個数は、もとの7進法の数の数字の個数より多くなることはありえない。
Example 4.27例題 4.27
Detecting an Error in Number of Digits When Converting Between Bases進法の間の変換で数字の個数の誤りを見つける
A five-digit base 10 number is converted to a base 5 number. The base 5 number has four digits. Was an error committed? How do you know?
英語のヒント
5けたの10進法の数を5進法の数に変換する。5進法の数は4けたである。誤りがあったか。どうしてわかるか。
Solution解答
Since 10 is larger than 5, the base 5 number cannot have less digits than the base 10 number. Since it did, we know an error has been made.
英語のヒント
10は5より大きいので、5進法の数が10進法の数より少ない数字をもつことはありえない。そうなったので、誤りがあったとわかる。