Docx
Docx
CIS 2107
1. Please answer the True/False questions below:
1.2. [2 pts] If a machine has a 32-bit virtual address format, then it allows upto 4 GB of
virtual address space.
(A) True
(B) False
1.3. [2 pts] Two’s complement of a binary number is 1 added to the one’s complement of the
binary number.
(A) True
(B) False
1.4. [2 pts] In the memory hierarchy, as the speed of operation increases the memory size
also increases.
(A)True
(B)False
1.5. [2 pts] If the data “ABCD” is to be stored in a little endian machine, it will be stored as
“ABCD”.
(A)True
(B)False
This study source was downloaded by 100000853483252 from CourseHero.com on 05-03-2023 16:01:46 GMT -05:00
https://www.coursehero.com/file/61053890/Final-exam-2docx/
2. [10 pts] What is the output of following program?
#include<stdio.h>
void f(int *p, int *q)
{
p = q;
*p = 20;
}
int main()
{
f(&i, &j);
printf("%d %d \n", i, j);
}
(A) 20 20
(B) 20 10
(C) 10 10
(D) 10 20
This study source was downloaded by 100000853483252 from CourseHero.com on 05-03-2023 16:01:46 GMT -05:00
https://www.coursehero.com/file/61053890/Final-exam-2docx/
3. [10 pts] Convert -1313.3125 to IEEE 32-bit floating point format.
This study source was downloaded by 100000853483252 from CourseHero.com on 05-03-2023 16:01:46 GMT -05:00
https://www.coursehero.com/file/61053890/Final-exam-2docx/
4. [10 pts] If the data held in memory (%rdi) and (%rsi) are 10 and 20 respectively, then what
will be the value of (%rdi) and (%rsi) after the following code is executed?
This study source was downloaded by 100000853483252 from CourseHero.com on 05-03-2023 16:01:46 GMT -05:00
https://www.coursehero.com/file/61053890/Final-exam-2docx/
5. [10 pts] If the data held in registers %rdi and %rsi are 20 and 30 respectively, then what will
be the return value after the following code is executed?
(A) -10
(B) 20
(C) 10
(D) 30
This study source was downloaded by 100000853483252 from CourseHero.com on 05-03-2023 16:01:46 GMT -05:00
https://www.coursehero.com/file/61053890/Final-exam-2docx/
Powered by TCPDF (www.tcpdf.org)