Question: For this problem we will focus on a hypothetical 1 6 - bit machine ( instead of 3 2 or 6 4 as we are

For this problem we will focus on a hypothetical 16-bit machine (instead of 32 or 64
as we are accustomed to). This means that, for this problem, an int is 2-bytes, a long is 4-bytes,
while a char still is 1-byte. Also assume that signed values are encoded using a twos-complement
encoding. Recall that the printf options relevant to this question are as follows:
%p - print pointer/address (in hex)
%c - print byte as ascii character
%x - print int/unsigned in hex
%u - print unsigned int in decimal
%d - print (signed) int in decimal
%lx - print long/unsigned long in hex
Note: If the variable passed into printf is not the same as what the format string expects, the
input will be converted to the correct type before printing out. As an example, if I try to print a
char using %d (which is expecting an int), the char will be converted to an int first, and then
the value of that int will be printed out in decimal.
Consider the following portion of memory, displayed as a table as in class and in previous labs.
Each table cell is a memory location, which contains a single byte, with values shown in hex, and
the address of the rightmost byte on each row is shown to the right of the row. Addresses increase
as we move to the left and up in the table.
Address
d49c 0x7d4e
4e 880x7d4c
ff 8d 0x7d4a
1a 3c 0x7d48

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 Databases Questions!