Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 Theory In computer programming, instructions are broken down from higher level languages into more machine interpret-able forms. An example of such would be designing

1 Theory In computer programming, instructions are broken down from higher level languages into more machine interpret-able forms. An example of such would be designing a computer program in C and once you compile the program it will be compiled into forms the machine can understand. In simple terms this will be described as assembly. Assembly language is one step above machine code, or binary. Assembly language commands will follow the format of: operation operand1 operand2 This is the basic form of the operations that will be discussed. The result of the operation between the two operands will be returned to the machine. HINT: The return of the resulting operation may not always happen behind the scenes. 2 Implementation Details You are tasked with designing a machine language simulator. This project must be written in C or C++. If you elect to use C++ be careful with your objects. Your code should be versatile enough to be modified for future assignments with more than one operation. For part 1 you must only implement the ADD operation.You will be given a text file for input on this project; following the format discussed in the Theory section. An example operation will be in the form ADD 0x12345 0x678 When the operation to be performed is addition and it is adding the two numbers 0x12345 and 0x678. These numbers will be hexadecimal format. Recall that the prefix of hexadecimal is always 0xand this is not to be considered in any conversion process. You might find it useful to use the uint32t in C/C++ to store the number as an unsigned 32-bit number. Using the provided text file as an example input. You will be tasked with creating a program that will read the command (ADD, but future projects may have more) and it will perform the addition between the two hexadecimal numbers. HINT: You may find it helpful to store this value in a variable, should you ever need to retrieve the information or store it in a simulated register. But this is not required for part 1. The result of the addition operation must be displayed to the terminal or build environment. Your code should follow proper code commenting and indentation procedures.image text in transcribed

ADD ADD ADD ADD ADD Ox1 OxAAA5555 OxFFFFFFFF 0x1234 Ox72DF9901 0x1 0x555AAAA 0x1 0x8765 0x2E0B484A

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Upgrading Oracle Databases Oracle Database New Features

Authors: Charles Kim, Gary Gordhamer, Sean Scott

1st Edition

B0BL12WFP6, 979-8359657501

More Books

Students also viewed these Databases questions

Question

1. Which position would you take?

Answered: 1 week ago