How many addresses can be accessed by the 32-bit Intel CPU? pages of physical me
ID: 3850929 • Letter: H
Question
How many addresses can be accessed by the 32-bit Intel CPU? pages of physical memory are required for the following statement: a. (2) char *ptr x = (char *) malloc (4194304): b. (1) What is the number in hexadecimal? c. (1) Express your answer to "a." in hexadecimal Suppose I have a 16-bit address bus and for each memory there are 32 bits (not 8 like normal, but 32 bits for each memory address), how many bytes of memory can I access? Express the following 32 bit hex number in Little Endian format 0x3F8C91 For the following instructions, describe each step accomplish a. push eax eip is incremented to next instruction The stack pointer (esp) is decremented by 4 The value in eax is copied to the stack (the address in esp) b. pop ebx c. call 0xCAFEBEEF d. retExplanation / Answer
1. 232=4GB,
32-bit architecture is limited to addressing a maximum of 4 GigaBytes of memory. Depending on the operating system, this number can be cut down even further due to reserved address space.
a. for the statement char *ptr x= (char *) malloc (4194304);
in the dynamic memory allocation, it allocates 41,94,304 memory locations.
b. hexadecimal notation for 4194304 is 400000h
c. hexadecimal notation for the answer in "a" is 400000h
2. As it is mentioned 16-bit address bus, maximum memory one can access is 2^16 that is 64 KB (64 KiloBytes) of memory.
3.
pop ebx;
eip is incremented to next instruction,
The stack pointer (esp) is incremented by 4,
The value in the stack is copied to ebx register (the address in esp).
call 0xCAFEBEEF
The address in PC is pushed to stack,
The stack pointer (esp) is decremented by 4,
The address in the eip is changed to CAFEBEEF,
RET
The value in the stack is copied to eip (the address in esp).
The stack pointer (esp) is incremented by 4,
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.