ASSIGNMENT 2 2024
UNIQUE NO.
DUE DATE: 22 JULY 2024
, COS2621
Assignment 2 2024
UNIQUE NO:
DUE DATE: 22 July 2024
Computer Organisation
UNISA@2024
COS2621 Assignment 2 (COMPLETE ANSWERS) 2024 - DUE 22 July 2024 ;100 % TRUSTED workings, explanations and solutions. For assistance call or W.h.a.t.s.a.p.p us on ...(.+.2.5.4.7.7.9.5.4.0.1.3.2)........... ASSIGNMENT 02 DUE DATE: 22 July 2024 SUBMISSION PROCEDURE: Written answers and a written program UNIQUE NUMBER: 791452 WEIGHT: 40 STUDY MATERIAL: Guide 102: Units 7, 8 & 9 Appendices A - F (Use as references) Stallings: Chapters 4, 5 & 13 Submit written answers for questions 1 to 4. All the questions will not necessarily be marked. Question 1 [10] (a) The following table reflects the memory contents of a part of memory in a one-address machine with an accumulator: 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 COS2621/103/0/2024 3 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 09. 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 (3) Changing the cursor position (2) Displaying the user prompt (2) Reading the number (ASCII character) (2) Converting the number to a numeric value (2) Testing the range and displaying an error message if the number is invalid (4) Calculation (4) COS2621/103/0/2024 4 A program listing submitted (6) Three screen shots of test cases submitted (3 × 5) (15) The program structure (5) The program documentation (comments) (5) Note: The first line in your program should be a comment line in which your student number and name are stated. 1 FREQUENTLY ASKED QUESTIONS How do I obtain a print-out of the text on the screen within a DOS window? There are various ways to obtain a print-out of the DEBUG output in the DOS window. You might find the following method handy for various applications: To print text from a DOS screen - Windows XP, 7: To get your DOS window from full-screen mode to window mode, you can do the following: • Click on Start, then on Programs, then on Accessories. • Now move to Command prompt and RIGHT-click. Click on Properties, then click on Options. • At Edit Options, mark Quick edit mode, and at Display options, mark Window. Click on OK. Exit. When you want to print text from the DOS window: • Move to the blue bar at the top of the screen and RIGHT-click. A drop-down menu appears. Move to Edit, and another menu appears. Click on Mark. Select the output with the mouse, i.e. highlight it. • Again move to the blue bar at the top of the screen and RIGHT-click. A drop-down menu appears. Move to Edit, and another menu appears. Click on Copy. By doing this the selected text is copied to the clipboard. Exit. • Now open a document in the text processor you are using. Click on Edit and then on Paste. The output that was copied to the clipboard will be pasted into your document and can be printed from there. How do I obtain a screen shot? The easiest way: Open a blank MS Word document. Run the program for which you want to obtain a screen dump. Press Shift + PrtScn. Go back to your Word document and press Ctrl + V. The relevant screen will be copied to the Word document. You can copy and paste it from this document to your assignment. 12 SOURCES CONSULTED Prescribed book and items selected from the list of recommended books. © Unisa 2024
All reviews are made by real Stuvia users after verified purchases.
On this page, you find all documents, Package Deals, and Flashcards offered by seller LIBRARYpro (LIBRARY). Knowledge is Power. #You already got my attention!
Quality you can trust: written by students who passed their exams and reviewed by others who've used these notes.
No worries! You can immediately select a different document that better matches what you need.
No subscription, no commitments. Pay the way you're used to via credit card or EFT and download your PDF document instantly.
“Bought, downloaded, and aced it. It really can be that simple.”