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

Database Management

Description Questions regarding database management using MySql College of Computing and Informatics Project Deadline: Day 4/12/2024 @ 23:59 [Total Marks for this Assignment is 14] Student Details: CRN: Name: ### Name: ### Name: ### Name: ### ID: ### ID: ### ID: ### ID: ### Instructions: • You must submit two

Project Management

Description Projects are unique, one-time operations designed to accomplish a set of objectives in a limited time frame (Stevenson, 2021). Give three examples of unethical conduct involving project management as well as the ethical principle each one violates. Analyze the potential long-term consequences of unethical project management practices on an

Final report and presentation Mohammed

Description APPENDIX 4 Academic Report Guideline (Co-op) The purpose of the Internship Report is offer students to describe their accomplishments and demonstrate what they learned through participation at Saudi Electronic University. The report should be submitted within two weeks after you finish your Co-op training Program. In addition, the report

mgt430 __ final report

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

project file included about cyber forensics

Description answer should not be solved by chat gpt and no plagiarisms and make sure the answer cover all the points. word file included Restricted – ‫مقيد‬ Pg. 01 Learning Outcome(s): Describe the common processes and procedures used to conduct criminal and noncriminal investigations of activities involving evidence with digital

MGT 530 – Dis 08 – M 14

Description Directions: 1.Discuss the concepts, principles, and theories from the textbook. 2.Cite the textbooks and cite any other sources if appropriate. 3.Text Not Image. 4.Unique Answer. 5.Avoid Plagiarism. 6.500-word limit. 7.AI is not allowed. To Download Text Book Click Here >> (( TEXT BooK MGT 530 )) PPT Slides ((

MGT 521 – Dis 04 – M 14

Description Directions: 1.Discuss the concepts, principles, and theories from the textbook. 2.Cite the textbooks and cite any other sources if appropriate. 3.Text Not Image. 4.Unique Answer. 5.Avoid Plagiarism. 6.500-word limit. 7.AI is not allowed. To Download Text Book Click Here >> (( TEXT BooK MGT 521 )) PPT Slides ((

Creative activity

Description -Please do not copy from any source and avoid plagiarism. -Each question must be clearly indicated. -Answer with explanation and clarification -Please send the solution in PDF file.

Delivering success projects

Description – select a project that has been conducted in the Middle East Region. – Write a report for the selected project in such a way that a person who is not familiar with the project could obtain a clear understanding of the project in general terms of the project

Reply 1 AA to discussion (Change Agent Advice)

Description Q – Please read the discussion Attached and prepare a Reply to this discussion post with comments that further and advance the discussion topic. The reply needs to be substantial and constructive in nature. it should add to the content of the post and evaluate/analyze that post Discussion Please

Reply 2 AG Reply to discussion (Change Agent Advice)

Description Q – Please read the discussion Attached and prepare a Reply to this discussion post with comments that further and advance the discussion topic. The reply needs to be substantial and constructive in nature. it should add to the content of the post and evaluate/analyze that post Discussion Please

IT475 Decision Support Systems

Description CRN: Name: Name: Name: ID: ID: ID: Instructions: • You must submit two separate copies (one Word file and one PDF file) using the Assignment Template on Blackboard via the allocated folder. These files must not be in compressed format. • It is your responsibility to check and make

Negotiation and problem solving

Description Students are advised to make their work clear and well presented, marks may be reduced for poor presentation. Avoid plagiarism, the work should be in your own words, copying from students or other resources without proper referencing will result in ZERO marks. No exceptions. • Use APA reference style.

Negotiation and problem solving case study 2

Description Avoid plagiarism and At least 1200 word Case 2 Study: Negotiation Breakdown in a Strategic Partnership Background: A leading international retail company, GlobalRetail, is in negotiations with a fast-growing ecommerce company, E-Shop, to form a strategic partnership. The purpose of the partnership is to combine GlobalRetail’s vast distribution network

Introduction to Data Science Programming DS231

Description Student Details: CRN: Name: Name: Name: ID: ID: ID: Restricted – مقيد Pg. 01 Description and Instructions<> “Error*” “Description and Instructions Description and Instructions Description and Instructions Introduction: In this group project (max. 3 students per group), you will explore one dataset from a selection of Ten Phenomenal Resources

Dis

Description Change Agent Advice As a member of an organization, you will or have participated in organizational change. Your involvement in the change process may be mandated or you may choose to seek it out. Sometimes you will be asked to take on the role of change leader; become a