1 / 5

COMPSCI 210 Semester 1 - 2014

COMPSCI 210 Semester 1 - 2014. Tutorial 9 – Assignment 3. How to approach Assignment3. ( i ) read an instruction from the file ( ii) check the operation of the instruction ( iii) convert the operation to opcode and fill the corresponding bits in the instruction

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 9 – Assignment 3

  2. How to approach Assignment3 (i) read an instruction from the file (ii) check the operation of the instruction (iii) convert the operation to opcode and fill the corresponding bits in the instruction (iv) find out each of the operands(v) convert each of the operands to a binary number and fill the corresponding bits in the instruction (vi) display the instruction as a hexadecimal number

  3. Exercise 9.1Ex9-1.c • Assume that there is a mapping table that maps the following letters to a 4-bit binary number, a is 0000, b is 0001, c is 0010, d is 0011, e is 0100, f is 0101, g is 0110, and h is 0111. For a given string consisting less than 9 letters, convert the string to a number and print out the string as an 8-digit hexadecimal number. For example, for string "bc", the number should be 00010010 (the first 4 bits are the number for b and the last 4 bits are the number for c, there should be some leading 0s if you represent it as a 32-bit number). The output should be 00000012.

  4. Exercise 9.1Ex9-1.c

  5. Exercise 9.1Ex9-1.c

More Related