Our Services

Get 15% Discount on your First Order

[rank_math_breadcrumb]

Computer Architecture and Organization DS 243

Description

Student Details: CRN:

Name:

Name:

Name:

ID:

ID:

ID:

2

Restricted – مقيد

Pg. 01

Task 3: Modulus Operation<> “Error*” “Task 3: Modulus Operation Task 3: Modulus Operation

Learning Outcome(s):

Develop assembly language programs.

Description and Instructions

This project is designed to help you become familiar with the MARIE architecture and its assembly language instructions. By completing this project, you will develop a basic program using MARIE instructions, demonstrating your understanding of fundamental computer architecture concepts. The project includes both basic and advanced tasks to challenge your understanding of MARIE assembly programming. Please use the online tool and provide a screenshot of the result for each task.

Task 1: Addition and SubstructionOperations

For this task, you are required to write a MARIE program that performs the following operations using assembly language instructions:
1. Take two inputs from the user.
2. Perform addition and subtraction on the two input values.
3. Display the results of both operations.

Requirements:

• The program should take two inputs (numbers) from the user and store them in memory.
• It should load the numbers from memory and perform addition and subtraction using the appropriate MARIE instructions.
• The program must display the results of both the addition and subtraction.
• Ensure that the program halts after displaying the results.

Example Input/Output:

Input 1: 8
Input 2: 5
Output: Sum = 13, Difference = 3

Task 2: Multiplication and Division Operations

Building on the first task, this advanced task requires you to enhance the program by adding multiplication and division operations. You should then display the results of these operations in addition to the sum and difference.

Requirements:

• Implement multiplication using a loop (as MARIE has no direct multiplication instruction).
• Implement division using repeated subtraction.
• Display the results of all four operations: addition, subtraction, multiplication, and division.
• Ensure that the program halts after displaying all the results.

Example Input/Output:

Input 1: 6
Input 2: 2
Output: Sum = 8, Difference = 4, Product = 12, Quotient = 3

Task 3: Modulus Operation

For this bonus task, implement a modulus operation (remainder of division) as part of your program. This will further challenge your understanding of MARIE assembly instructions and loops.

Requirements:

• Implement the modulus operation using repeated subtraction.
• Display the result of the modulus in addition to the sum, difference, product, and quotient.
• Ensure that the program halts after displaying all results.

Example Input/Output:

Input 1: 7
Input 2: 3
Output: Sum = 10, Difference = 4, Product = 21, Quotient = 2, Remainder = 1

General Requirements:

Your code must be clearly commented and organized, explaining the purpose of each section and how it works.
• Make sure to name memory locations appropriately (e.g., num1, num2, result).
• You must demonstrate proper use of MARIE instructions, including loops and conditional statements.
• Ensure that the program is readable and well-structured.

MARIE Instruction Set Guide

Instruction

Operation

Use Example

Explanation

Load X

Load the value stored at memory location X into the Accumulator (AC).

Load num1

Loads the value from memory location num1 into the AC for further operations.

Store X

Store the value in the Accumulator into memory location X.

Store result

Stores the current value in the AC into memory location result.

Add X

Add the value stored at memory location X to the value in the Accumulator.

Add num2

Adds the value from memory location num2 to the value in the AC.

Subt X

Subtract the value stored at memory location X from the value in the Accumulator.

Subt num2

Subtracts the value from memory location num2 from the AC.

Input

Take a value from the user input and store it in the Accumulator.

Input

Takes an input from the user and stores it in the AC.

Output

Output the value in the Accumulator to the screen.

Output

Outputs the current value in the AC to the screen.

Halt

Stop the program execution.

Halt

Ends the program execution.

Skipcond X

Skip the next instruction based on the value in the Accumulator.

Skipcond 400

Skips the next instruction if the condition is met (e.g., Skipcond 400 skips if AC = 0).

Jump X

Unconditionally jump to the instruction located at memory location X.

Jump Loop

Redirects execution to the instruction at Loop. Useful for loops or unconditional branches.

Clear

Set the value of the Accumulator to zero.

Clear

Resets the AC to 0. Useful before performing arithmetic operations.

JNS X

Store the address of the next instruction in X, then jump to X + 1.

JNS Subroutine

Used for jumping to subroutines and returning later.

JnS X

Save the address of the next instruction in memory location X and jump to X + 1.

JnS Subroutine

Typically used for subroutines, allowing for modular programming.

Working with Loops

Loop and conditional logic using Jump, Skipcond, and arithmetic instructions.

Jump Loop

Implemented using Jump, Skipcond, and arithmetic operations for tasks like multiplication and division in a loop.

Restricted – مقيد

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

Order a Similar Paper and get 15% Discount on your First Order

Related Questions

Research about (AI & Machine Learning)

Description I need tomake a research about AI & Machine Learning and what is the impact from it in the future. In the attach doc file you will find the required and how to write the research. please make it as described in the file. ‫| كلية الحوسبة والمعلوماتية‬ College

Internship FIN408

Description I want three reports for each report in a file. I want simple, brief words that do not exceed three lines 1 – First report We will talk about these tasks : Review and analysis of financial statement Financial reports and presentations Bank accounts reconciliation 2 – Second report

Reply.

Description WIJDAN BAESHN The Impact of Covid 19 on population health Collapse COVID-19 has had a profound effect on the health of populations across various communities, with two primary contributors being the rise in mental health issues and the disparities in access to healthcare. Firstly, the pandemic has resulted in

Final report

Description no coping 🙏 College of Administration and Finance Sciences Form No 4- Internship Report Cover Page Student`s name: Student`s ID #: Training Organization: Trainee Department: Field Instructor Name: Field Instructor Signature: Course Title: CRN: Internship Start Date: Internship End Date: Academic Year/Semester: For Instructor’s Use only Instructor’s Name: Total

Management Question

Description – I want original text, no plagiarism. – You can find the instructions in the file. Please read it carefully. – APA Style Thanks – Textbook: Grant, R. M. (2019). Contemporary strategy analysis (11th ed.). John Wiley & Sons. Print ISBN-13: 978-1119815235 Etext ISBN-10: 1119815231 ‫المملكة العربية السعودية‬ ‫وزارة

Management Question

Description – I want original text, no plagiarism. – You can find the instructions in the file. Please read it carefully. – APA Style Thanks – Textbook: Northouse, P. G. (2022). Leadership: Theory and practice (9th ed.). Sage Publications. Print ISBN: 9781544397566, 1544397569 eText ISBN: 9781071834473, 1071834479 ‫المملكة العربية السعودية‬

Project ECOM101

Description I want three project files, A, B, and the PowerPoint presentation NOO COPING🙏 College of Administrative and Financial Sciences ECOM101 – E-commerce E-commerce Project Second Semester/ 2024-2025 Restricted – ‫مقيد‬ Guidelines for the assignment (part A & B): The answer sheet must include the following: • Cover page •

Accounting internship final report

Description I want a final report for my internship , it does not have to be 3000 to 4000 words. if you can not find the information in any of the files you can write anything there is no wrong answer. in you have question you free to ask me.

MGT675 – Project Literature (Phase 2)

Description Hello Doc, This is phase 2 for the below project: MGT675 – Project Proposal (Phase 1) In this phase, we are going to create the project Literature.All the need files are available in the attachments. If you need any further clarifications don’t hesitate to contact me, Thanks. RegardsAbdul 1.

Senior Project 2

Description This is follow up on the project 1 that you have worked before, all the details of the website is included and described in the attached file. make sure you you build the website in a professional way that it is working 100%. below is some of the requirements,

Globalization and Decision-Making

Description How does globalization impact decision-making processes in different countries, such as Saudi Arabia? Discuss how the interconnectedness of economies, cultures, and technologies on a global scale influences the choices made by governments, businesses, and individuals in Saudi Arabia. Share your insights on how Saudi Arabia’s unique position in the

Research two electronic records management vendors.

Description Research two electronic records management vendors. Discuss the retention recommendations made by the vendors? Why do they make these recommendations? Discuss the services or solutions each vendor offers. Why are these important to a business manager? Discuss the concepts, principles, and theories from your textbook. Cite your textbooks and

Secondary research

Description Lessons from Taiwan to Implement a Good Healthcare System Aligned with Saudi Vision 2030

ct each qousion one file

Description Module 02: Critical Thinking Assignment 1 file Policy and Supply and Demand (110 Points) Various programs to increase employment in the healthcare sector have recently been introduced in the Kingdom of Saudi Arabia. As a result, an increasing number of foreigners have been provided with the opportunity work in

Marketing Question

Description the task is to write a discussion and do Quiz for module 2 from MKT640 course

Periodic Report(training) – Jaw

Description I have a college report about the training in a company that I learned from them I want the third report, after the first and second, which I did, to follow them College of Administration and Finance Sciences Form Number 3 – PERIODIC REPORT Internship Student Report | Month:

Ct.

Description Critical Thinking Assignment (110 points) One file This week we are learning about the various types of studies that can be used in researching a population for risk factors, controls versus experimental treatment, and the Framingham heart study is introduced. Please read the following study: Omer, F. M., Awadalla,

Dis and reply

Description Dis1. 2 file Decision Discussion: Globalization and Decision-Making How does globalization impact decision-making processes in different countries, such as Saudi Arabia? Discuss how the interconnectedness of economies, cultures, and technologies on a global scale influences the choices made by governments, businesses, and individuals in Saudi Arabia. Share your insights