We read your photo as:

b) Using two's complement, work out 3710 - 1710, giving your answer in decimal notation. (4 marks)

Mathematics

ScanSolve AI Answer

Answer

361036_{10}

Step-by-step solution

5 steps

Here is the solution to your question:

b) Using two's complement, work out 3710−171037_{10} - 17_{10}, giving your answer in decimal notation. (4 marks)

This is equivalent to 3710+(−1710)37_{10} + (-17_{10}). We will use an 8-bit representation.

  1. Convert 371037_{10} to 8-bit binary.

    3710=00100101237_{10} = 00100101_2
  2. Convert 171017_{10} to 8-bit binary.

    1710=00010001217_{10} = 00010001_2
  3. Find the two's complement of 171017_{10} to represent −1710-17_{10}.

    • Original binary for 171017_{10}: 00010001200010001_2
    • One's complement (invert all bits): 11101110211101110_2
    • Two's complement (add 1 to one's complement): \quad 11101110_2 \\ + \quad 00000001_2 \\ \hline \quad 11101111_2 \end{array}$$ So, $-17_{10}$ in 8-bit two's complement is $11101111_2$.
  4. Add 371037_{10} and the two's complement of −1710-17_{10}.

    001001012(3710)+111011112(−1710 in two’s complement)1 001001002\begin{array}{c} \quad 00100101_2 \quad (37_{10}) \\ + \quad 11101111_2 \quad (-17_{10} \text{ in two's complement}) \\ \hline 1 \ 00100100_2 \end{array}
    The leftmost '1' is a carry-out. In two's complement arithmetic, a carry-out from the most significant bit is discarded.
    
  5. The result is 00100100200100100_2.

    Convert this binary number back to decimal.

    0×27+0×26+1×25+0×24+0×23+1×22+0×21+0×200 \times 2^7 + 0 \times 2^6 + 1 \times 2^5 + 0 \times 2^4 + 0 \times 2^3 + 1 \times 2^2 + 0 \times 2^1 + 0 \times 2^0 =0+0+32+0+0+4+0+0= 0 + 0 + 32 + 0 + 0 + 4 + 0 + 0 =3610= 36_{10}

    The final answer is 361036_{10}.

Was this helpful?

Try one yourself

A new problem that tests the same skill.

Still stuck on this one?

Ask a follow-up, and the answer starts from this question.

Got a different question?Ask your own question
Handwritten step-by-step solution preview

Handwritten Step-by-Step Solution

Get this as a handwritten image on WhatsApp — like a tutor wrote it for you.

Try on WhatsApp