Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PLEASE ANSWER ALL QUESTIONS, THANK YOU IN ADVANCE I REALLY APPRECIATE IT! 14. Given that register ebx contains a signed value, write the assembly instructions
PLEASE ANSWER ALL QUESTIONS, THANK YOU IN ADVANCE I REALLY APPRECIATE IT!
14. Given that register ebx contains a signed value, write the assembly instructions to get the 32-bit two's complement by using the xor instruction. Hint: Requires 2 instructions 15. Given a signed bit field data structure with 3 bits, what is the range of values? 16. Given 1 Terabyte of data items, approximately how many scarch steps would it take, worst case, to find a single item using a binary search? (A "step" means checking if an item is the one sought.) Code Interpretation (22 pts) Given the global character array gK, that gK is stored at address 0x1000, and that gptrK is immediately following gK in memory, answer the following questions. Assume each instruction executes sequentially char gK0x43,0x61,0x74, 0x20, 0x6F, 0x6E, 0x20, 0x74, 0x68, 0x65,0x20, 0x6D, 0x61,0x74, 0x2E, 0x00 17.lea esi, gk I/What is the value in esi 18. mov eax, dword ptr gK What is the value in eax? 19. lea edi, gptrK /! What is the value in edi? 20. xor ecx, ecx I/ What is the value in ecx? 21, mov edx, [ed?] // what is the value in edx? 22. add ecx, 3 mov bx, [gK + ecx 2] / what is the value in bx? 23. (4 pts) mov ah, [gK ec 2] mov al, [gk ecx* 2 1 /IWhat is the value in eax? BONUS: 5 pts - Given that 'A' is 0x41, 0x20 is a space, what does gK say? 2018 01-CS 3843 Computer Organization-Exam #3 Page 2 14. Given that register ebx contains a signed value, write the assembly instructions to get the 32-bit two's complement by using the xor instruction. Hint: Requires 2 instructions 15. Given a signed bit field data structure with 3 bits, what is the range of values? 16. Given 1 Terabyte of data items, approximately how many scarch steps would it take, worst case, to find a single item using a binary search? (A "step" means checking if an item is the one sought.) Code Interpretation (22 pts) Given the global character array gK, that gK is stored at address 0x1000, and that gptrK is immediately following gK in memory, answer the following questions. Assume each instruction executes sequentially char gK0x43,0x61,0x74, 0x20, 0x6F, 0x6E, 0x20, 0x74, 0x68, 0x65,0x20, 0x6D, 0x61,0x74, 0x2E, 0x00 17.lea esi, gk I/What is the value in esi 18. mov eax, dword ptr gK What is the value in eax? 19. lea edi, gptrK /! What is the value in edi? 20. xor ecx, ecx I/ What is the value in ecx? 21, mov edx, [ed?] // what is the value in edx? 22. add ecx, 3 mov bx, [gK + ecx 2] / what is the value in bx? 23. (4 pts) mov ah, [gK ec 2] mov al, [gk ecx* 2 1 /IWhat is the value in eax? BONUS: 5 pts - Given that 'A' is 0x41, 0x20 is a space, what does gK say? 2018 01-CS 3843 Computer Organization-Exam #3 Page 2Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started