Concept explainers
In the text, JUMP instructions were expressed by identifying the destination explicitly by stating the name (or step number) of the destination within the JUMP instruction (for example, “Jump to Step 6”). A drawback of this technique is that if an instruction name (number) is later changed, we must be sure to find all jumps to that instruction and change that name also. Describe another way of expressing a JUMP instruction so that the name of the destination is not explicitly stated.
Want to see the full answer?
Check out a sample textbook solutionChapter 2 Solutions
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
Additional Engineering Textbook Solutions
Concepts Of Programming Languages
Concepts of Programming Languages (11th Edition)
Starting Out with Java: From Control Structures through Objects (6th Edition)
C How to Program (8th Edition)
Starting Out with Python (3rd Edition)
Introduction to Java Programming and Data Structures, Comprehensive Version (11th Edition)
- Orthogonality is the ability of an instruction set architecture to have a "backup" instruction for any instruction that does the same task. Tell me whether that's correct or not.arrow_forwardConsider a computer that does not have a TSL instruction, but doeshave an instruction to swap the contents of a register and a memorylocation in a single indivisible action. Can that be used to write a routine enter-region such as that used with TSL? Give pseudocodefor this routine if it can be made, or explain why it can not be done.arrow_forwardWhat would happen if an instruction was disobeyed, and why would that be the case? In the following scenarios, a TLB that is maintained by software is more efficient than one that is handled by hardware:arrow_forward
- a) Write a MARIE program using a loop that multiplies two non-negative numbers , X and Y, using repeated addition. For example, to multiply X=3 by Y= 6, the program would add 3 six times, or 3+3+3+3+3+3, and if X or Y is 0 then the output should be 0. (Hint: Use Skipcond instruction) N.B: You should include the MARIE code in your Answer, with an explanation of each instruction in your code beside it. Example: Add One /Add 1 to AC b) Add a screenshot of the simulation, showing the result (A screenshot of the MARIE Simulator window after running the program) using values of X and Y as shown below.arrow_forwarda) Write a MARIE program using a loop that multiplies two non-negative numbers , X and Y, using repeated addition. For example, to multiply X=3 by Y= 6, the program would add 3 six times, or 3+3+3+3+3+3, and if X or Y is 0 then the output should be 0. (Hint: Use Skipcond instruction)N.B: You should include the MARIE code in your Answer, with an explanation of each instruction in your code beside it.Example:Add One /Add 1 to AC b) Add a screenshot of the simulation, showing the result (A screenshot of the MARIESimulator window after running the program) using values of X and Y as shown below.Instructions:- Use “ORG” instruction to start your program at address 200. - Use your last university ID number to input the new values of X and Y.For example, if your ID is1915161678234, then you will use the number 3 as the value of X and 4 for Y.- Do not forget to change the representation of the Input and Output windows in the simulator to Decimal.- The following labels and directives should be…arrow_forwarda) Write a MARIE program using a loop that multiplies two non-negative numbers , X and Y, using repeated addition. For example, to multiply X=5 by Y=8, the program would add 3 six times, or 3+3+3+3+3+3, and if X or Y is 0 then the output should be 0. (Hint: Use Skipcond instruction) N.B: You should include the MARIE code in your Answer, with an explanation of each instruction in your code beside it. Example: Add One /Add 1 to AC b) Add a screenshot of the simulation, showing the result (A screenshot of the MARIE Simulator window after running the program) using values of X and Y as shown below. Instructions: - Use “ORG” instruction to start your program at address 200. - Do not forget to change the representation of the Input and Output windows in the simulator to Decimal. - The following labels and directives should be included at the end of your program: X, Dec 0 Y, Dec 0 One, DEC 1 Sum, DEC 0 Ctr, DEC 0arrow_forward
- Implement the MOV instruction using assembly language code.transfers the source from the second operand to the first operand (destination).The source operand can be a memory address, a general-purpose register, or an instantaneous value.The destination register may be a memory location or a general-purpose register.Each operand, which may be a byte or a word, must be the same size.arrow_forwardSuppose an instruction takes four cycles to execute in a nonpipelined CPU: one cycle to fetch the instruction, one cycle to decode the instruction, one cycle to perform the ALU operation, and one cycle to store the result. In a CPU with a four-stage pipeline, that instruction still takes four cycles to execute, so how can we say the pipeline speeds up the execution of the program?arrow_forwardConsider a multilevel computer in which levels are vertically stacked, with the lowest level being level 1. Each level has instructions that are m times as powerful as those of the level below it; that is, one level r instruction can do the work of m instructions at level r-1. However, n instructions at level r-1 are required to interpret each instruction at level r. Given this, answer the following questions: If a level 1 program requires k seconds to run, how long would the equivalent program take to run at levels 2, 3 and 4. Express your answer in terms of n, m, and r. What is the performance implication for the program if n > m? Conversely, what is the implication if m > n? Which case do you think more likely? Why?arrow_forward
- When we execute a program that contains a lot of if-statements or for/while-loops, the pipelineof Teletraan-2 faces a problem. The instruction fetch stage does not know which branch of theif-statement shall be fetched, until the write back stage writes the True/False value of the ifcondition to a flag register. What should we do to alleviate the problem?A. Don't wait. Let the CPU predict which branch will probably be executed, and fetch theinstruction(s) of that branch. If it is later revealed the prediction is wrong, undo theinstruction(s).B. Don't wait. Fetch-decode-execute the instructions of all branches of the if-statement.C. Nothing. We can only let the instruction fetch stage wait for the write back stage to finishwriting the value of the if-condition.D. Eliminate all if-statements during the assembly process.arrow_forwardOrthogonality means that an instruction set has a "backup" instruction that can be used instead of any other instruction that does the same thing. It's up to you to prove or disprove what I think.arrow_forwardGive an illustration of how the instruction set deals with data and operations using at least five sentences.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education