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

Management Question

Description SEE THE ATTACHED FILE. FOLLOW THE INSTRUCTION. DO NOT USE CHAT GPT OR AI PLEASE! ‫المملكة العربية السعودية‬ ‫وزارة التعليم‬ ‫الجامعة السعودية اإللكترونية‬ Kingdom of Saudi Arabia Ministry of Education Saudi Electronic University College of Administrative and Financial Sciences Assignment 1 Quality Management (MGT 424) Due Date: 18/10/2025 @

to answer the aigmeent

Description please follow all requirments to get full mark ‫المملكة العربية السعودية‬ ‫وزارة التعليم‬ ‫الجامعة السعودية اإللكترونية‬ Kingdom of Saudi Arabia Ministry of Education Saudi Electronic University College of Administrative and Financial Sciences Assignment 2 Decision Making and Problem Solving (MGT 312) Due Date: End of Week 09, 01/11/2025 @

Business Question

Description The only thing required is to solve this question. Executive Summary (2.5 Marks) What does the assignment about (1), The name and field of the chosen company (0.5), and briefly explain the distinct features (1). The company is STC Saudi Electronic University College of Administrative and Financial Sciences E-commerce

Business Question

Description ASSIGNMENTS SUBMITTED THROUGH EMAIL WILL NOT BE ACCEPTED. • STUDENTS ARE ADVISED TO MAKE THEIR WORK CLEAR AND WELL PRESENTED; MARKS MAY BE REDUCED FOR POOR PRESENTATION. THIS INCLUDES FILLING IN YOUR INFORMATION ON THE COVER PAGE. • STUDENTS MUST MENTION THE QUESTION NUMBER CLEARLY IN THEIR ANSWER. •

Mgt324 & mgt401

Description TWO ASSIGNMENTS 🛑 ‫المملكة العربية السعودية‬ ‫وزارة التعليم‬ ‫الجامعة السعودية اإللكترونية‬ Kingdom of Saudi Arabia Ministry of Education Saudi Electronic University College of Administrative and Financial Sciences Assignment 1 Public Management (MGT 324) Due Date: 18th October 2025 @ 23:59 Course Name: Public Management Student’s Name: Course Code: MGT324

Accounting Question

Description Students are advised to make their work clear and well-presented. Poor presentation may result in reduced marks. This includes filling in your information on the cover page. Students must mention the question number clearly in their answers. Late submissions will NOT be accepted. Avoid plagiarism. Your work should be

212 ass 1

Description see ASSIGNMENT COVER SHEET Course name: Concepts of Health Education and Promotion Course number: PHC 212 CRN • Differentiate between Health education and Health promotion. How these two disciplines of public Assignment title or task: (You can write a question) health are different from each other. • Provide an

Management Question

Description ‫المملكة العربية السعودية‬ ‫وزارة التعليم‬ ‫الجامعة السعودية اإللكترونية‬ Kingdom of Saudi Arabia Ministry of Education Saudi Electronic University College of Administrative and Financial Sciences Assignment 1 Introduction to Operations Management (MGT 311) Due Date: 04/10/2025 @ 23:59 THE FIFTH WEEK Course Name: Introduction to Operations Management Course Code: MGT

Management Question

Description CAREFULLY • THE ASSIGNMENT MUST BE SUBMITTED ON BLACKBOARD (WORD FORMAT ONLY) VIA ALLOCATED FOLDER. • ASSIGNMENTS SUBMITTED THROUGH EMAIL WILL NOT BE ACCEPTED. • STUDENTS ARE ADVISED TO MAKE THEIR WORK CLEAR AND WELL PRESENTED, MARKS MAY BE REDUCED FOR POOR PRESENTATION. THIS INCLUDES FILLING YOUR INFORMATION ON

Management Question

Description I want the answer without similarity at all, and Conceptual and professional, they’re impor ‫المملكة العربية السعودية‬ ‫وزارة التعليم‬ ‫الجامعة السعودية اإللكترونية‬ Kingdom of Saudi Arabia Ministry of Education Saudi Electronic University College of Administrative and Financial Sciences Assignment 1 Introduction to International Business (MGT 321) Due Date: 04/10/2025

healthcare system

Description Information technology can be used to assist health care organizations in the ability to provide access to healthcare organizations. Please choose any current information technology and create a PowerPoint presentation on how the technology will improve healthcare access in KSA. Be sure to include: An overview of the information

261 ASS 7

Description SWW ASSIGNMENT COVER SHEET Course name: Occupational Health Course number: PHC 261 CRN: Choose any one of the common occupational Assignment title or task: infectious diseases and discuss the following: (You can write a question) • • • Causes, mode of transmission, and symptoms. (4 grades) Occupational group at

261 ASS 8

Description AWW ASSIGNMENT COVER SHEET Course name: Occupational Health Course number: PHC 261 CRN: Choose any one of the common occupational Assignment title or task: infectious diseases and discuss the following: (You can write a question) • • • Causes, mode of transmission, and symptoms. (4 grades) Occupational group at

352shosh..

Description I want a correct and complete solution for all paragraphs. I must adhere to the instructions. I don’t want plagiarism. I don’t want similarities. I don’t want a solution using artificial intelligence. I want a correct solution. Put the solution inside the file. Include all requirements. Errors are not

Management Question

Description I want the answer without similarity at all, and Conceptual and professional, they’re imporant. ‫المملكة العربية السعودية‬ ‫وزارة التعليم‬ ‫الجامعة السعودية اإللكترونية‬ Kingdom of Saudi Arabia Ministry of Education Saudi Electronic University College of Administrative and Financial Sciences Assignment 1 Communications Management (MGT 421) Due Date: 4/10/2025 @ 23:59

Management Question

Description I want the answer without similarity at all, and Conceptual and professional, they’re impor ‫المملكة العربية السعودية‬ ‫وزارة التعليم‬ ‫الجامعة السعودية اإللكترونية‬ Kingdom of Saudi Arabia Ministry of Education Saudi Electronic University College of Administrative and Financial Sciences Assignment-1 MGT425-Spreadsheet Decision Modelling Deadline: 04/10/2025 @ 23:59 (End of Week

MGT323 – ASS1

Description # You should not copy from any website # References must be written # The assignment must be delivered on time # The agreed number of words must be adhered to # Give examples and write a perfect answer ‫المملكة العربية السعودية‬ ‫وزارة التعليم‬ ‫الجامعة السعودية اإللكترونية‬ Kingdom of

374 act 1

Description Provide 3 different answers Discussion Topic Discussion Prompt: Follow Oral health conditions such as plaque, calculus, gingivitis, and dental caries affect many individuals, yet prevention is often possible with the right education and daily habits. Reflect on your understanding of these conditions and share strategies you think are most