Question: You must run a program to multiply 2 numbers. We will test it by running a program to multiply 2 numbers;. numbers will not be
You must run a program to multiply numbers. We will test it by running a program to multiply numbers;. numbers will not be validated. you can use two integers as inputs and
The program must accept the input values in this order
inputto accumulate the result here
input top decrement variable that control the loop
input: first number to be multiplied for example,
input: second number to be multiplied for example,
Using C programming language write a program that simulates a variant of the Tiny Harvard
Architecture. In this implementation memory RAM is split into Instruction Memory IM and Data
Memory DM Your code must implement the basic instruction set architecture ISA of the Tiny
Machine Architecture:
LOAD
ADD
STORE
SUB
IN
OUT
END
JMP
SKIPZ
Each piece of the architecture must be accurately represented in your code Instruction Register, Program
Counter, Instruction Memory IM MAR MDRMAR and MDR are connected to the IM Data
Memory, MAR MDRMAR and MDR are connected to the DM and Accumulator. Instruction
Memory will be represented by an integer array and each instruction will use elements of the arrayone
for OP and the other one for address Data Memory will be represented by an integer array and each data
value uses an element of the DM array. Your Program Counter will begin pointing to the first instruction
of the program PC
For the sake of simplicity Instruction Memory IM and Data Memory DM may be implemented
as separate integer arrays.
IM size
DM size
Hint: All CPU registers and Data Memory DM are of type int.
Input Specifications
Your simulator must run from the command line with a single input file as a parameter to main. This file
will contain a sequence of instructions for your simulator to store in Instruction Memory and then run
via the fetchexecute cycle.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
