CEG3136DGD1Solution.pdf - CEG 3136 Computer Architecture II...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CEG 3136 Computer Architecture II Tutorial 1 Basic Programming - Solution Fall 2017 Questions: 1. What is the meaning of the sign bit = 1 when unsigned binary coded numbers are added? It indicates that the most significant bit is set to 1, which does not have any real meaning for unsigned numbers. 2. What is the meaning of the carry bit = 1 when two unsigned binary coded numbers are subtracted ? When two’s complement binary coded numbers are subtracted? When two unsigned numbers used in a subtraction, C=1 indicates that an overflow (or underflow) has occurred, i.e. the result of the subtraction is too large to be stored in the register containing the data operand (i.e. 8 or 16-bits discuss when 8-bit subtraction occurs or 16-bit addition occurs, adding to the D register). What does it mean to large the result is negative, i.e. a borrow was required to complete the subtraction. When two signed numbers are subtracted, C=1 has no significance. Remind the students that from the point of the ALU operation, the codes being subtracted are neither signed nor unsigned. It is the logic of the program (or the programmer’s mind) that treats the numbers as either being signed or unsigned.
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern