CS401 Assign 01 solution Fall 2011
Question No. 1:
a. Suppose architecture A has 14-bit address bus. What is maximum size of memory that can be accessed in this architecture? (Show the steps for
calculating maximum accessible memory) (5 marks)
Sol :
Accessible memory addresses = 2number of address bits
214 = 16384 bytes Note :ye 14 power mein hai
16384 / 8 = 2048 bytes
2048 / 1024 = 2 KB
b. An architecture B has a maximum limit of 2GB memory. How many address bits are required for this architecture? (Show the steps for calculating required number of address bits) (5 marks)
Sol :
2GB * 1024 = 2048 MB
2048MB * 1024 = 2097152KB
2097152KB * 1024 = 2147483648bytes
2147483648bytes * 8 = 17179869184 bits
Question No. 2:
What are the first and the last physical memory addresses accessible using the following segment values? (2 mark each)
a. 0000
b. FFFF
Question No. 3:
Calculate physical address using the following segment offset pairs.
(1 mark each)
a. ABCD:1234
Solution:
1)
ABCD
1 2 3 4 +
B E 0 1 = physical address
b. 1234:ABCD
Solution:
2)
1 2 3 4
ABCD +
B E 0 1 = physical address
Question No. 4:
What is effective address generated by the following instructions? Every instruction is independent of others. Initially BX = 0xFF00, SI=0x00FF
(1 mark each)
a. mov ax, [BX+SI]
Sol :
Effectice address = [bx+si]
= [FF00 + 00FF]
= [FFFF]
b. mov ax, [BX+1024] (1024 is in decimal)
a. Suppose architecture A has 14-bit address bus. What is maximum size of memory that can be accessed in this architecture? (Show the steps for
calculating maximum accessible memory) (5 marks)
Sol :
Accessible memory addresses = 2number of address bits
214 = 16384 bytes Note :ye 14 power mein hai
16384 / 8 = 2048 bytes
2048 / 1024 = 2 KB
b. An architecture B has a maximum limit of 2GB memory. How many address bits are required for this architecture? (Show the steps for calculating required number of address bits) (5 marks)
Sol :
2GB * 1024 = 2048 MB
2048MB * 1024 = 2097152KB
2097152KB * 1024 = 2147483648bytes
2147483648bytes * 8 = 17179869184 bits
Question No. 2:
What are the first and the last physical memory addresses accessible using the following segment values? (2 mark each)
a. 0000
b. FFFF
Question No. 3:
Calculate physical address using the following segment offset pairs.
(1 mark each)
a. ABCD:1234
Solution:
1)
ABCD
1 2 3 4 +
B E 0 1 = physical address
b. 1234:ABCD
Solution:
2)
1 2 3 4
ABCD +
B E 0 1 = physical address
Question No. 4:
What is effective address generated by the following instructions? Every instruction is independent of others. Initially BX = 0xFF00, SI=0x00FF
(1 mark each)
a. mov ax, [BX+SI]
Sol :
Effectice address = [bx+si]
= [FF00 + 00FF]
= [FFFF]
b. mov ax, [BX+1024] (1024 is in decimal)
Sol :
Effectice address = [bx + 1024]
After converting 1024 into hexadecimal
Effectice address = [FF00 +400 ]
= [FF00 + 400]
= [10300]
Question No. 5:
What are the contents of memory locations 720, 721, 722 and 723 if the word 4321 is stored at offset 720 and the word 8765 is stored at the offset 722 using Big Endean format? (2 marks)
Address Contents
…
0x720 4321
0x721
0x722 8765
0x723
Effectice address = [bx + 1024]
After converting 1024 into hexadecimal
Effectice address = [FF00 +400 ]
= [FF00 + 400]
= [10300]
Question No. 5:
What are the contents of memory locations 720, 721, 722 and 723 if the word 4321 is stored at offset 720 and the word 8765 is stored at the offset 722 using Big Endean format? (2 marks)
Address Contents
…
0x720 4321
0x721
0x722 8765
0x723
0 comments:
Post a Comment