1. Homepage
  2. Exam
  3. [2021] COMP1411 Introduction to Computer Systems - Q2 Assemble Language

[2021] COMP1411 Introduction to Computer Systems - Q2 Assemble Language

This question has been solved
Engage in a Conversation

Question 2. [14 marks]

  CourseNana.COM

Your student ID contains 8 digits before the last letter “D”, consider each digit as a hex-decimal digit, then the 8 digits of your student ID forms a 32-bit binary number, let’s call it SID. For example, for student ID “12345678D”, SID = 0001 0010 0011 0100 0101 0110 0111 10002. CourseNana.COM

  CourseNana.COM

Assume that SID is already stored in the register %eax. After the following X86-64 assembly instructions are executed, a new number will be resulted in register %eax. CourseNana.COM

sarl $21, %eax CourseNana.COM

sall $21, %eax CourseNana.COM

movl $0xC1E00000, %ebx CourseNana.COM

andl %ebx, %eax CourseNana.COM

movl $0x40000000, %ecx CourseNana.COM

orl %ecx, %eax CourseNana.COM

  CourseNana.COM

Convert the number resulted in %eax into a decimal number according to IEEE single-precision floating point representation. CourseNana.COM

  CourseNana.COM

Requirements: CourseNana.COM

A. Do NOT write the decimal number in the “multiplication of power of 2”, such as “x.xx * 2N”; instead, write the decimal number in normal decimal format. CourseNana.COM

B. Show your steps in explaining both the computation done by the assembly instructions and the process of data format conversion. CourseNana.COM

C. If you do not use your own student ID for this question, you receive 0 marks for this question CourseNana.COM

CourseNana.COM

Get the Solution to This Question

WeChat WeChat
Whatsapp WhatsApp
The Hong Kong Polytechnic University代写,COMP1411代写,Introduction to Computer Systems代写,The Hong Kong Polytechnic University代编,COMP1411代编,Introduction to Computer Systems代编,The Hong Kong Polytechnic University代考,COMP1411代考,Introduction to Computer Systems代考,The Hong Kong Polytechnic Universityhelp,COMP1411help,Introduction to Computer Systemshelp,The Hong Kong Polytechnic University作业代写,COMP1411作业代写,Introduction to Computer Systems作业代写,The Hong Kong Polytechnic University编程代写,COMP1411编程代写,Introduction to Computer Systems编程代写,The Hong Kong Polytechnic Universityprogramming help,COMP1411programming help,Introduction to Computer Systemsprogramming help,The Hong Kong Polytechnic Universityassignment help,COMP1411assignment help,Introduction to Computer Systemsassignment help,The Hong Kong Polytechnic Universitysolution,COMP1411solution,Introduction to Computer Systemssolution,