Computer Organization & Assembly Language Mid Term 2020-Resit Students
Computer Organization & Assembly Language Mid Term 2020-Resit Students
1
Question No. 2: (05 Marks)
a) Given following hex numbers write down their binary equivalent and decimal (both in
signed and unsigned). (1)
i. 0xAB903091
ii. 0XFFFFFFFF
iii. 0x00890090
iv. 0XE80989BA
b) Assume two number 0x00FF11CD in register %eax, 0XFFABCD01 in %ebx, use bitwise ^ to
complement both LSB and MSB, use bitwise & clear this whole number with appropriate
bit MASKING, write assembly code for this as well. (2)
c) What happens to a 32-bit register if we shift it arithmetic right for 31 times, explain your
answer in detail (2)
2
c) Represent the following float number into IEEE 754 standard (2)
i. float k = 99.5
ii. float r = 80.1
iii. double m = 7.9
iv. double h = 5.1
Question No. 4: (05 Marks) Explain the working of following C code and equivalent Assembly
Code, draw diagram of stack to show its initial stage
C Code Equivalent Assembly Code
ret
3
4