RGB の各色の階調を, それぞれ3桁の2進数で表す場合, 混色によって表すことができる色は何通りか。
令和3年度 ITパスポート試験 問66
This question's explanation and your answers so far.
問 66
Incorrectア
8 is merely the number of tone levels for a single color (2 cubed). Because the three channels R, G, and B are not multiplied together, it is not the total number of colors produced by color mixing.
Incorrectイ
24 is 8×3, obtained by tripling the per-channel tone count of 8 in an additive way. Since color mixing combines the channels independently, multiplication (8×8×8) is correct; addition or a simple tripling cannot yield the answer.
Incorrectウ
256 is 2 to the 8th power, the value obtained by counting the whole as a single 8-bit (1-byte) unit. In reality each color has 3 digits, for a total of 3×3 = 9 bits, so 2 to the 9th power = 512 is correct. This is a mistake in the number of bits.
- エ
正解 When the tone of each RGB color is represented by a 3-digit binary number, a single color (R, G, or B) can take 2 to the power of 3 = 8 values. Color mixing chooses and combines the three channels R, G, and B independently, so the total is 8×8×8 = 512 (= 8 cubed = 2 to the 9th power). Therefore 512 in choice エ is correct.
- The number of states an n-bit binary number can represent is 2 to the n-th power. For 3 digits, each channel has 2 cubed = 8 possibilities.
- The number of RGB mixed colors is found by the product of the tone counts (8×8×8 = 2 to the 9th power = 512) because the channels are combined independently. Beware of using addition (8×3) or miscounting the total number of bits.