Skip to content

平成24年度 秋期 ITパスポート試験 問82

This question's explanation and your answers so far.

問82
頻出度★★☆

真理値表に対応する論理演算はどれか。

入力A入力B出力
000
010
100
111
出典 平成24年度 秋期 ITパスポート試験 問82
解説

問 82

  • ア

    正解 The correct answer is “ア AND”. Reading the truth table from top to bottom, the only row whose output is 1 is (Input A, Input B) = (1, 1); the other three rows (0,0) / (0,1) / (1,0) all output 0. This behavior — “output 1 only when both inputs are 1, and 0 in every other case” — matches exactly the definition of the logical product (the AND operation). In everyday language AND corresponds to “A and also B”, an operation that holds only when both conditions are satisfied. Remember it that way and the shape of this table (three rows of 0, just one row of 1, and that row at the very bottom) becomes the fingerprint of AND itself.

  • Incorrectイ

    NOT (logical negation) is a unary operation that takes only one input, flipping 0 to 1 and 1 to 0. The truth table in this question takes two inputs, Input A and Input B, so it cannot be expressed by NOT in the first place. Even if you looked at only one of the inputs and negated it, the (0,0) row would come out as 1, contradicting the output of 0 shown in the table.

  • Incorrectウ

    OR (logical sum) is the operation that outputs 1 “if at least one input is 1”. The (0,1) row and the (1,0) row should therefore both output 1, yet in this question's table both of those rows output 0. In the truth table for OR, three rows output 1 and only one row outputs 0 (it is 0 only for (0,0)), so the counts of 1s and 0s are the reverse of the table in this question.

  • Incorrectエ

    XOR (exclusive OR) is the operation that outputs 1 “only when the two inputs differ” and 0 when they are the same. Hence (0,1) and (1,0) would be 1 and (1,1) would be 0, the exact opposite of this question's table, where those three rows are 0, 0, and 1 respectively. In particular, giving 0 when both inputs are 1 is the decisive difference from AND; since the bottom row of the table is 1, it cannot be XOR.

ここがポイント
  • Memorize the truth tables of the basic logical operations. AND (logical product) is “1 only when both are 1”, OR (logical sum) is “1 if even one of them is 1”, XOR (exclusive OR) is “1 only when the inputs differ”, and NOT (logical negation) “inverts a single input”.
  • When working backwards from a truth table to the operation, focus on how many rows output 1 and where they are. Among the four rows of a two-input table: if only one row is 1 and it is the bottom row (1,1), it is AND; if three rows are 1, it is OR; if the two middle rows (0,1) and (1,0) are the 1s, it is XOR — you can decide on the spot.
用語

Your answers