1 / 17

COMPSCI 210 Semester 1 - 2014

COMPSCI 210 Semester 1 - 2014. Tutorial 4: Exercises from CH 6 and 7. Exercise 6.14 - Solution. Solution Exercise 6.15. Exercise 7.2 - Solution.

rance
Download Presentation

COMPSCI 210 Semester 1 - 2014

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. COMPSCI 210Semester 1 - 2014 Tutorial 4: Exercises from CH 6 and 7

  2. Exercise 6.14 - Solution

  3. Solution Exercise 6.15

  4. Exercise 7.2 - Solution The instruction loads R1 with the value of ASCII which is the location of the instruction itself. Remember that the offset (the bottom 9 bits of the instruction) is added to the PC but the PC will already have moved on. So ASCII is x4F08, PC is x4F09 so the offset is -1. Which as a 9 bit value is 1 1111 1111. Therefore the instruction is LD R1, #-1 and machine code is 0010 001 1 1111 1111

  5. Exercise 7.3 - Solution

  6. Exercise 7.5 Solution

  7. Exercise 7.10 - Solution

  8. Exercise 7.11 - Solution

  9. Exercise 7.11 - Solution (continue)

  10. Exercise 7.11 - Solution (continue)

More Related