2進数 10110 を3倍したものはどれか。
平成21年度 春期 ITパスポート試験 問64
This question's explanation and your answers so far.
問 64
Incorrectア
111010 is 32+16+8+2 = 58 in decimal, not 66. This is the value you get when, adding 101100 (twice 22) and 10110 (the original 22), you add each digit independently without handling the carries at all. In binary addition, 1+1 must be written as 0 with a 1 carried into the next higher place, and dropping that carry makes the value too small. Also, a 6-digit binary number can represent at most 111111 = 63, which does not reach 66, so it can be eliminated just by looking at the number of digits.
Incorrectイ
111110 is 32+16+8+4+2 = 62 in decimal, not 66. It equals the result of joining each digit of 101100 and 10110 with a logical OR, that is, the value you get when you perform the bit operation “make the digit 1 if either one is 1” instead of addition. Addition and logical OR are different operations and must not be confused. This choice is also 6 digits long, so it can represent at most 63 and can never be 66.
- ウ
正解 The correct answer is ウ. First convert the binary number 10110 into decimal. The place values, counting from the right, are 1, 2, 4, 8, and 16, so 10110 = 16+0+4+2+0 = 22. Multiplying it by 3 gives 22×3 = 66. To convert 66 back into binary, subtract the largest place values in order: 66 = 64+2, so only the 64 place and the 2 place are 1, which gives 1000010. This matches choice ウ. You can also do the calculation in binary directly. In binary, shifting a number one digit to the left doubles its value, so tripling can be broken down into “the doubled number + the original number.” Shift 10110 one digit to the left to get 101100 (=44), then add the original 10110 (=22); handling the carries correctly gives 1000010 (=66), again ウ. In addition, since 22×3 = 66 is at least 64 and less than 128, the answer must be a 7-digit binary number, and this estimate of the digit count alone is enough to narrow it down to ウ.
Incorrectエ
10110000 is the original 10110 with three 0s attached on its right side, which in decimal is 128+32+16 = 176. In binary, attaching one 0 at the end doubles the value, so attaching three 0s means multiplying by 2 to the power of 3, that is by 8, giving 22×8 = 176. In other words this is 8 times, not 3 times: it is the mistake of confusing “tripling” with “shifting 3 digits (3 bits) to the left.” Keep in mind that the same reasoning by which attaching a 0 at the end in decimal multiplies by 10 makes it multiply by 2 in binary.
- For binary calculations, the surest approach is to convert to decimal, calculate there, and convert the answer back into binary. The place values double as you go from the right: 1, 2, 4, 8, 16, 32, 64, and so on (radix conversion). You can solve it with the flow 10110 = 16+4+2 = 22, 22×3 = 66, 66 = 64+2 = 1000010.
- Shifting a binary number one digit to the left doubles its value, and shifting it n digits to the left multiplies it by 2 to the power of n. Tripling can therefore be found as “the number shifted one digit to the left + the original number.” Confusing tripling with a 3-digit shift (multiplying by 8), and dropping a carry in the addition, are the typical wrong-answer patterns, so be careful.