Skip to content

平成29年度 春期 ITパスポート試験 問72

This question's explanation and your answers so far.

問72
頻出度★★☆

二つの2進数01011010と01101011を加算して得られる2進数はどれか。ここで,2進数は値が正の8ビットで表現するものとする。

出典 平成29年度 春期 ITパスポート試験 問72
解説

問 72

  • Incorrectア

    00110001 (49 in decimal) is the result of adding each bit separately while ignoring carries (that is, taking the exclusive OR, XOR). Binary addition must carry over into the next higher bit, and that was not done here, so it is wrong.

  • Incorrectイ

    01111011 (123 in decimal) is the result of taking the logical OR of the two numbers (each bit is 1 if either bit is 1), not addition. Addition produces carries, so it does not yield this value.

  • Incorrectウ

    10000100 (132 in decimal) does not match the correct sum 197 (11000101); it is an incorrect value. It is the kind of value that arises when the carry is mishandled partway through, and it is not the result of a correct hand calculation.

  • エ

    正解 Perform the binary addition by hand. Starting from the rightmost bit, add the bits one by one while carrying (carry) into the next bit. Adding 01011010 and 01101011 bit by bit: bit0 is 0+1=1; bit1 is 1+1=10, giving 0 with a carry of 1; bit2 is 0+0+1=1; bit3 is 1+1=10, giving 0 with a carry of 1; bit4 is 1+0+1=10, giving 0 with a carry of 1; bit5 is 0+1+1=10, giving 0 with a carry of 1; bit6 is 1+1+1=11, giving 1 with a carry of 1; bit7 is 0+0+1=1, so the result is 11000101. Checking in decimal: 01011010=90 and 01101011=107, their sum is 197, which converts back to binary as 11000101, so the correct answer is エ.

ここがポイント
  • Binary addition adds each bit starting from the right, carrying (carry) into the higher bit as in 1+1=10.
  • As a check, you can convert the binary numbers to decimal to find the sum (90+107=197), then convert back to binary (11000101) to confirm the result reliably.
用語

Your answers