IPA FE Subject A 2024 Question 1

A question IPA Japan published in 令和6年度 基本情報技術者試験 科目A 公開問題 問1, translated into English. ITPEC is based on the same exams.

X and Y are variables that each take the value 0 or 1. When X □ Y is a logical operation of X and Y, the following truth table was obtained. Which of the following is the truth table of X □ Y?

XYX AND (X □ Y)X OR (X □ Y)
0001
0101
1001
1111

Explanation

X □ Y is 0 only for X = 1, Y = 0 — read each half of the given table where it pins down X □ Y: the AND column where X = 1, the OR column where X = 0.

  • •X = 1: with Z = X □ Y, 1 AND Z equals Z, so the AND column gives X □ Y directly: 1 □ 0 = 0 and 1 □ 1 = 1
  • •X = 0: 0 OR Z equals Z, so the OR column gives X □ Y directly: 0 □ 0 = 1 and 0 □ 1 = 1
  • •The remaining rows say nothing: with X = 0 the AND is always 0, and with X = 1 the OR is always 1

So X □ Y is 1, 1, 0, 1 for the inputs 00, 01, 10, 11. This is (NOT X) OR Y, the implication “if X then Y”.

Answer (c)

Why not others:

  • •(a) — this is X AND Y: it gives 0 for 0 □ 0, so X OR (X □ Y) would be 0 in the first row, not 1
  • •(b) — this is just Y: it gives 0 for 0 □ 0, which again makes the first row’s OR 0
  • •(d) — this is NAND: it gives 0 for 1 □ 1, so X AND (X □ Y) would be 0 in the last row, not 1

Key rule: 1 AND Z = Z and 0 OR Z = Z, while 0 AND Z = 0 and 1 OR Z = 1 hide Z; use the rows where the known operand passes the unknown one through.

Basic Theory · AI-written, may contain errors

This question comes from the past questions IPA Japan publishes, translated into English by ITPEC Practice. ITPEC Practice is an independent study tool and is not affiliated with IPA or ITPEC. See the original paper (PDF) or Report an issue.