QUIZ #1: Arithmetic and Logical Instructions (ANSWERS)

10:53 AM 10 Comments





FOR MY BSIE-COED 3J STUDENTS
Sooo.. how's our first quiz? :) For questions, clarifications, feel free to comment!

PS. I'll post the scores soon!

10 comments:

  1. YEY! Thank you, Ma'am! :D

    - Cy Fresto

    ReplyDelete
  2. thank u po maam :) pano po naging 7874H ang sagot sa letter A ??

    ReplyDelete
    Replies
    1. Hi Lorraine! Here is the solution:

      For lower 8-bits: E7 + 8D we got 74 right? since D + 7 is equal to 14. we bring down 4, then carry 1. Next, we add E and 8 we got 16 then we add the carry from the lower 4 bits addition earlier, it becomes 17. We bring down 7, then set our carry flag to 1.

      For higher 8 bit: 3C + 3B becomes 78. Why? first we add the lower 4 bits values (B and C) we got a result of 17. But remember we have a carry from the addition of the lower 8-bits earlier? We add that to 17, so we have 18 now. we bring down 8, then carry 1. 3 + 3 is equal to 6, plus our carry so it becomes 7.

      That's how we got 7874 as our final answer :) Hope this helps! for more information about Hexadecimal, read this:
      https://theassemblyproject.blogspot.com/2016/07/how-to-understand-hexadecimal.html
      https://theassemblyproject.blogspot.com/2016/07/how-to-understand-hexadecimal-part-2.html

      Delete
  3. How's the answer in a obtained maam? Thanks. <3

    ReplyDelete
    Replies
    1. Hi Johanna! Here is the solution:

      For lower 8-bits: E7 + 8D we got 74 right? since D + 7 is equal to 14. we bring down 4, then carry 1. Next, we add E and 8 we got 16 then we add the carry from the lower 4 bits addition earlier, it becomes 17. We bring down 7, then set our carry flag to 1.

      For higher 8 bits: 3C + 3B becomes 78. Why? first we add the lower 4 bits values (B and C) we got a result of 17. But remember we have a carry from the addition of the lower 8-bits earlier? We add that to 17, so we have 18 now. we bring down 8, then carry 1. 3 + 3 is equal to 6, plus our carry so it becomes 7.

      That's how we got 7874 as our final answer :) Hope this helps! for more information about Hexadecimal, read this:
      https://theassemblyproject.blogspot.com/2016/07/how-to-understand-hexadecimal.html
      https://theassemblyproject.blogspot.com/2016/07/how-to-understand-hexadecimal-part-2.html

      Delete
  4. ma'am bat po 9c ? HAHAHA 9D po kasi sagot ko :D Gusto ko lang po malaman HAHAHAHA TY .

    ReplyDelete
    Replies
    1. Hi Emman! We know that Exclusive-OR produces a true output (1/HIGH) results if one, and only one, of the values is true. If both the values are false (0/LOW) or both are true, a false output results. So, when we XRL 6A(0110 1010) and F6(1111 0110):

      0110 1010 6A
      1111 0110 F6
      = 1001 1100 9C

      As you can see, we got 9 and 12. when we convert 12 to hexa, it is C and D is 13 :) Hope this helps!

      for more information about Hexadecimal, read this:
      https://theassemblyproject.blogspot.com/2016/07/how-to-understand-hexadecimal.html
      https://theassemblyproject.blogspot.com/2016/07/how-to-understand-hexadecimal-part-2.html

      Delete
  5. Hmmmnnn.. Ganoon po pala iyon.. I see.. Thank you po Ma'am Hannah! God bless you po patuloy! <3.

    ReplyDelete