Question: Write a program that contains the following integer definitions: int1: an 8-bit unsigned integer initialized to 11h. int2: an 8-bit signed integer initialized to -20
Write a program that contains the following integer definitions:
int1: an 8-bit unsigned integer initialized to 11h.
int2: an 8-bit signed integer initialized to -20
int3: a 16-bit unsigned integer initialized to 4000h
int4: a 16-bit signed integer initialized to +1234
int5: a 32-bit unsigned integer initialized to 0ABCDEF1h
int6: a 32-bit signed integer initialized to -1234578
a) Use appropriate directives to declare your integers
b) What is the total number of bytes reserved for your data declaration?
c) The following table shows how your integers values are stored in memory, where index points to the first byte stored for the first integer. 1. Identify the storage indexes for each of the integers you declared (int1 int6) 2. Explain the content of the corresponding memory locations. RECALL that intel uses little endian architecture
.
Address index Memory content variable EC 0001 0002 0003 40 D2 0005 F1 DE BC 0A 6E 29 ED 0007 0008 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
