星期六, 1月 03, 2009

EE3120 (B) MP & ASSEMBLY LANGUAGE PROG (02EE3120) - Quiz 1 solution

Quiz 1 Solution (total 60 marks)
1. If a given computer has a total of 16 megabytes of memory, how many bytes (in decimal) is this? How many kilobytes is this? [10 marks]

Ans:
Let 2^n = 16M=16x10^6 [2 marks]
n log 2 = log 16 +6 log 10
n = (log 16 +6 )/log 2
= 23.93 [2 marks]
Round n to the nearest integer = 24 [2 marks]
In decimal 2^24 = 16,777,216 bytes [2 marks]
In kilobyte 2^24 = 16,777,216 /1024 =16,384 kilobytes [2 marks]

2. A given mass storage device such as a hard disk can store 1 gigabytes of information. Assuming that each page of text has 50 rows and each row has 40 columns of ASCII characters (each character = 1 byte), approximately how many pages of information can this disk store? [20 marks]

Ans:
Let 2^n = 1G=1x10^9 [2 marks]
n log 1 = log 1 +9 log 10
n = (log 1 +9 )/log 2
= 29.897 [2 marks]
Round n to the nearest integer = 30 [2 marks]
In decimal 2^30 = 1,073,741,824 bytes [2 marks]
Page no. m = = 1,073,741,824 /50x40x1 byte = 536,870.912 [6 marks]
Truncate m = 536,870 pages [6 marks]

3. In a given byte-addressable computer, memory locations 20000H to 7FFFFH are available for user programs. The first location is 20000H and the last location is 7FFFFH. Calculate the following:(a) The total number of bytes available (in decimal)(b) The total number of kilobytes (in decimal) [20 marks]

Ans:
Start address is 20000H and end address 7FFFFH. [5 marks] Total locations available = (7FFFF-20000 +1)H =(5FFFF +1)H =60000H [5 marks]

a) Total number of byte in decimal 60000H= 393216 [5 marks]

b) Total number of kilobyte in decimal (393216/1024) = 384K [5 marks]

4. What EA stands for? What does it mean when it is inputting a ground signal? [10 marks]

Ans: EA stands for External Access. [5 marks]
When EA is 0, it will access the external memory. [5 marks]

沒有留言:

推薦此文