You aren't giving us much to go on. Your first post indicated that "powering two numbers together" was the issue. Frankly, I have no idea what it means for two numbers to "power each other". Like Papabravo, I'm assuming that you mean that, given two numbers 'a' and 'b', you want to find 'y' such that y=a^b ('a' raised to the 'b' power). Is that correct? But when he suggested a couple of things to look at to understand how to raise one number by another, you said that that wasn't the issue and that the problem was MARIE. But when pointed to a reference for MARIE, you say that that isn't what you want.Thanks but thats just the basics of it
The best place to start with low-level stuff like this is to make sure that you know how you would do it by hand. So if asked to evaluate, say, 7^11 how would you do it? Keep in mind that the next question, at least in general, would be how to do 1453^2896 by hand.Sorry guys, im still stressing over this. You input two numbers for example into the marie simulator for example 3 and 3. The solution that would be expected would be 3 x 3 x 3 (27) which is the code i am trying to create
Okay,no constraints, numbers have to be integers, unclear on rest, sorry i'm a newb at this kinda stuff
That's what I thought. And maybe for this assignment that's good enough -- I don't know. But think about how you would extend this to 1453^2896. Would you want to tackle that using your approach? If you are SURE that repeated multiplication is acceptable for this assignment, then the next step is to write an algorithm (step-by-step procedure) to perform a^b. An option would be to write (and preferably test) an implementation in a high-level language you are familiar with. By developing the algorithm separate from the assembly language (and a particular assembler) you are able to focus on the logic first and then, once that is polished, to focus on the details of the implementation.7 x 7 x 7 x 7 x 7 x 7 x 7 x 7 x 7 x 7 x 7
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
S | Marie Accumulator Help | Homework Help | 3 | |
J | Help in MARIE language | Homework Help | 1 | |
project TMA, need marie code | Homework Help | 2 | ||
Can anyone help to write the Marie Assembly language code for the following question? | Homework Help | 14 | ||
S | Doubts when implementing a program in the MARIE simulator | Homework Help | 0 |
by Jake Hertz
by Aaron Carman
by Robert Keim
by Aaron Carman