Question: Assume that we are executing our code on a 6 4 - bit machine using two s complement arithmetic for signed integral data types. Fill

Assume that we are executing our code on a 64-bit machine using twos complement arithmetic for signed integral data types. Fill in the empty boxes in the table below for the following code segment (show work): 3.(10 pts.) Assume that we are executing our code on a 64-bit machine using two's complement arithmetic for signed integral data types. Fill in the empty boxes in the table below for the following code segment (show work):
```
char x =7;
char y =-1;
unsigned char z =0xA5;
```
4.(10 pts.) This problem tests your ability to complete an execution trace of assembly code. For the 32-bit assembly code (see fun:) shown below, complete the stack diagram showing what would happen when all statements are executed down to the return statement ret. Identify the values stored in the \%eax register, and label where x and y are stored on the stack for the call to fun(\(\mathrm{x},\mathrm{y}\)).
a. Based on the values shown on the stack, the function was called using fun(___, ;
b. What value is returned?
fun:
movl 4(8esp),8eax
sall \$3,8eax
addl 8(8esp),8eax
addl \$8,8eax
ret ); --
Assume that we are executing our code on a 6 4 -

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!