Home / Expert Answers / Computer Science / question-1-10-a-the-following-table-reflects-the-memory-contents-of-a-part-of-memory-in-a-one-ad-pa820

(Solved): Question 1 [10] (a) The following table reflects the memory contents of a part of memory in a one-ad ...



Question 1 [10] (a) The following table reflects the memory contents of a part of memory in a one-address machine with an accumulator: \table[[Address,Contents],[00,20],[20,30],[30,40],[40,50],[50,60],[60,70]] What values do the following instructions load into the accumulator? LOAD IMMEDIATE 20 LOAD DIRECT 20 LOAD INDIRECT 20 (b) Give examples of Intel x86 instructions in which the following addressing modes are used: Immediate addressing Direct addressing Stack addressing Indexed addressing Baseaddressing Register indirect addressing 2 COS2621/103/0/2025 Question 2 [11] (a) Briefly discuss the concepts of (i) error correcting-codes and (ii) error-detecting codes. (b) What is the distinction between spatial locality and temporal locality? (c) Briefly describe the cache organisation of the Pentium 4. Question 3 [9] (a) Explain why one type of RAM is considered to be analog and the other digital. (b) What are the key properties of semiconductor memories? (c) What is a parity bit? Question 4 [50] Design a program in assembly language to read a number entered by the user. The program should determine whether or not the number is divisible by 3 and display an appropriate message based on the results on the screen. The program should do the following: Clear the screen and change the screen colour to white on blue. Change the cursor position to row 10, column 0. Prompt the user to key in the number (1-9). Read the number from the keyboard. Convert the number to a numeric value and store in memory. Test whether the number is in the range

0?9

. Display '**' next to the number if the number is out of range and read again. Divide the number by 3 . If the remainder is equal to zero, we know that the number is divisible by 3 , otherwise it is not. If the number is divisible by 3 , display the following message: 'Number is a multiple of 3 ' otherwise display the message 'Number is not a multiple of 3 '. Terminate the program. The following is an example of what the program should do. The user input is displayed in italics, i.e. 9 below. Please enter the number you select: 8 The number is not a multiple of 3 NB: Submit three screen shots of different test runs performed. Marks will be allocated as follows: Clearing the screen and changing the screen colour Changing the cursor position (2) Displaying the user prompt Reading the number (ASCII character) (2)



We have an Answer from Expert

View Expert Answer

Expert Answer


We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe