IFN551

129 views 8:29 am 0 Comments August 29, 2023

Page 1 of 7 IFN551 COMPUTER SYSTEMS FUNDAMENTALS Assignment Weighting: 50% Due Friday 1st September 2023 by 11:59pm Individual submission via QUT Canvas only This assignment is eligible for the 48 hour extension PREAMBLE LMC is a cartoonised assembly language that mimics the instruction set of many real-world architectures, including x86, ARM and others. These are modelled on the von Neumann computer system architecture, as proposed by John von Neumann in 1945. In learning LMC, you will gain an understanding of how the software system of a computer operates at a fundamental level. See the lectures and tutorials for more information about the architecture and instructions of LMC. In this assignment, there are three questions. Be sure to answer all questions. For each, a marking scheme is provided. You are required to demonstrate your ability to interpret and solve a novel problem. You will design a solution to the problem by using natural language to explain your approach, and plan how you will test the implementation of this design. After designing your solution and test plan, you are required to implement the design using the LMC integrated development environment (IDE). Academic integrity is taken very seriously at QUT. Ensure that the work you submit is your own and that you provide sufficient evidence of how you came to your final solution. If we have queries about your solution, you must be prepared to answer these when requested otherwise a grade of zero will be awarded. You must make appropriate reference to the author(s) of works or ideas that you submit and are not your own. Do not directly copy, summarise, or claim to own any material that is not rightfully yours. This includes any works or ideas generated by artificial intelligence (AI). The use of AI in this assignment is discouraged and may hinder your ability to complete this assignment to our specifications. Any material submitted in this assignment will be the subject to intelligent algorithms that detect plagiarism. You must adhere to the QUT Manual of Policies and Procedures, and agree to the terms below. You can access the QUT MOPP by searching MOPP in the HiQ website. In submitting this work I confirm that: – This work represents my individual effort and does not contain plagiarised material. – I am aware of the University rule that a student must maintain academic integrity as stated and explained in the QUT MOPP Section C/5.3 Academic Integrity. – I am aware that my assignment may be stored in a reference database, becoming part of the bank of material that assignments will be checked against in the future. Page 2 of 7 SELECT A TASK Select the task according to the last digit of your student ID: 6, 5 ,4 Task A 3, 2, 1, 0 Task B 9, 8, 7 Task C For example: if your student ID is n98765435 then you will do Task A. Selecting the incorrect task will result in a grade of zero for the assignment. TASK A Write a LMC program that converts an Unreal number into a decimal number. The Unreal number system is like the Roman number system; however, it has some exceptions and limitations. You must display the result as output before halting the program. For example, the Unreal number CXI is 111, and XXXVI is 36. Unreal digit Natural number I 1 V 5 X 10 L 50 C 100 D 500 Your program only needs to support the Unreal digits listed in the table above. Your program will only be able to calculate a natural number up to and including 999. If the user enters an Unreal numeral which exceeds this, the output is to be 999. Six (6) input values are provided by the user, the order of input is important: The first input is the number of D’s that the Unreal number contains. The second input is the number of C’s that the Unreal number contains. The last input is the number of I’s that the Unreal number contains. For example, if the user provides the inputs 0, 0, 0, 1, 2, 2 then this will be the equivalent of XVVII Page 3 of 7 TASK B Write a LMC program that can convert an n-bit binary number into a decimal number. Display the natural number as output before halting the program. The first input determines the value for n. It is assumed this value will be equal to four, or greater. For example, if the first input is eight (8) then eight subsequent inputs are requested. If the subsequent inputs number were 1, 0, 0, 1, 0, 0, 0, 0 then the output would be 9. n input values are provided by the user, one for each bit: The first of these is the least-significant bit. The n’th input is the most-significant bit. TASK C Write a LMC program that calculates the sum of numbers provided by the user. Display the summation as output before halting the program. If the user has provided less than or equal to ten input values, then only sum even numbers. Odd numbers are ignored. If the user has provided more than ten values, then only sum any odd numbers subsequent to the tenth input. The existing summation of even numbers shall remain. If the user enters zero, at any point, then the summation is displayed. For example: Input values: 3, 3, 4, 0 Result: 4 Input values: 2, 3, 7, 0 Result: 2 Input values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 0 Result: 43 Page 4 of 7 QUESTION 1 (15 MARKS) Describe your approach to solving the problem. • Use natural language, structured like a conventional programming language to communicate your design. • When necessary, use looping and conditional constructs. • Name symbols sensibly to make their use clear. Cormen (2009) wrote an excellent introduction to the conventions of pseudocode (see Part I, chapter 2, section 1.2). You can read this by searching for the text via QUT Library. Cormen, Thomas H. Leiserson, Charles E. Rivest, Ronald L. Stein Clifford. (2009). Introduction to Algorithms (3rd Edition) – 2.1.2 Pseudocode Conventions. MIT Press. Please submit Question 1 using the template provided on Canvas. MARKING SCHEME High Distinction Distinction Credit Pass Fail Correctness (10 marks) The algorithm correctly reflects the problem described in the specification. The algorithm reflects the problem described in the specification but further refinement is needed. The algorithm reflects some components of the problem described in the specification, however, with some error. The algorithm is poorly designed or does not accurately reflect the problem described in the specification. No attempt or the algorithm differs from the specification. Notation and readability (5 marks) Using natural language, the algorithm is succinctly described. Logic constructs are appropriately used. Text-styling, such as indentation and weight, enhances readability. Variable naming is consistent making their use clear. Using natural language, the algorithm is described. Some text-styling is used. Variable naming is consistent. The description of the algorithm is difficult to follow or understand. Text-styling is used minimally. Variable naming is ambiguous. The language used to describe the algorithm is difficult to understand or does not clearly reflect the intended design. Text-styling causes readability issues. Variable names provide no meaning. No attempt. The language used to describe the algorithm provides no meaning. No text-styling is used. Variables are not declared, are incorrect or provide no meaning to the algorithm. Page 5 of 7 QUESTION 2 (15 MARKS) Draft a test plan to be used as a verification method to ensure that your LMC program is correct. • Tabularise test input value(s) and the expected output(s) • Consider uncommon cases. For example, when the calculator reaches its maximum value, when negative values are calculated, or when an input is unexpectedly large. Draft your test plan using the following template (two examples are provided): Comma-separate the input and output values. Delete the examples. Input Value(s) Expected output value(s) Notes 2,4,6 10 All even numbers 1,3,5 9 All odd numbers Please submit Question 2 using the template provided on Canvas. MARKING SCHEME High Distinction Distinction Credit Pass Fail Test cases (15 marks) An appropriate number of test cases are listed to exhaust all potential cases. Edge-cases are considered. An adequate number of test cases are listed. Some edge-cases are considered. An adequate number of test cases are listed. Consideration for edgecases is minimal. Test plan is brief. No attempt. Test plan lacks the ability to provide insight into determining whether the program will function as expected. Page 6 of 7 QUESTION 3 (20 MARKS) Implement an LMC program according to the algorithm you designed in Q1. Use the test suite you designed in Q2 to verify the implementation of your algorithm is correct. • Only symbolic addressing is to be used; numerical addressing will be disabled. • LMC program must request the correct number of input(s). • LMC program must produce the correct number of output(s). • LMC program must produce the correct output value(s) for all given test cases. • Code must be tidy (spacing, indentation) and comments are to be used to describe the algorithm. Do not describe the function of each LMC instruction. • Your LMC file should show the full history of how your solution was implemented. • Use LMC IDE v1.5.0.0 (or greater) • Enter your student ID in the LMC IDE when completing this question • Errors will not be fixed by the marker. Please submit Question 3 as Question_3.lmc contained within your zip folder. MARKING SCHEME High Distinction Distinction Credit Pass Fail Features of the LMC (4 marks) The appropriate features of LMC are used, including looping and conditional constructs. Symbolic addressing is used. The appropriate features of LMC are used. Looping or conditional constructs need improvement. Symbolic addressing is used. Looping construct(s) for vital aspects of the problem are poorly used. Symbolic addressing is used. Looping constructs are emulated using repetition of code or fundamental logical errors are present. Some numerical addressing is used. No attempt. No symbolic addressing is used. Behaviour* (10 marks) All test cases pass. The user is prompted for the correct number of input(s). The number of output(s) produced matches that described. Most test cases pass. The user is requested to enter an incorrect number of input(s). The number of outputs produced does not match that described. Some test cases pass. Issues are present with input and output. Most test cases do not pass. Some test cases cause interpreter errors or execute an excessive number of instructions, most likely due to an infinite-loop. Fundamental issues with input/output are present. No attempt. All test cases cause interpreter errors. All test cases fail. No input is requested when necessary. No output is produced. Readability (6 marks) Code commenting is used to describe the algorithm. Code is spaced using indentation and line-breaks to distinctly separate sections of the program, to separate instructions and comments, and to separate symbols, mnemonics and addressing. Code commenting is used, with some sections needing more detail to describe the algorithm. Code is spaced appropriately to separate instructions and comments, or sections of the program. Code commenting is used but provides minimal description of the algorithm. Code spacing is used minimally. Code commenting is used but provides no description of the algorithm. Code is spaced poorly. No code commenting is used. Code is not spaced. Implementation** Evidence is provided to demonstrate how the program was implemented. Minimal evidence is provided to demonstrate authenticity of the solution submitted. No evidence to demonstrate implementation of the program is present in the LMC file or plagiarism was detected. * Your program will be tested against a test suite defined by the marker. Points are awarded at the discretion of the marker. ** Plagiarism check. Penalties may apply. Submitting your original LMC file, which contains all save history, will assist the marker in verifying your work. Any save history in your LMC file that is dated after the due date (or an extended due date) will not be marked. An LMC file that contains very few historical records may result in you needing to verify your submission in an interview with the marker. Page 7 of 7 HOW TO SUBMIT 1) You must use the file names that we specify. Marks will be deducted for failing to comply with this requirement. Filename Contents Assignment.docx Questions 1 and 2 Question_3.lmc Question 3 2) Compress these three files together using .zip 3) Upload your zip file to Canvas for marking.

Tags: , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *