Computer Science: An Overview (13th Edition) (What's New in Computer Science)
13th Edition
ISBN: 9780134875460
Author: Glenn Brookshear, Dennis Brylow
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 2, Problem 9CRP
Translate the following instructions from English into Vole.
- a. LOAD register 0x6 with the value 0x77.
- b. LOAD register 0x7 with the contents of memory cell 0x77.
- c. JUMP to the instruction at memory location 0x24 if the contents of register 0x0 equals the value in register 0xA.
- d. ROTATE register 0x4 three bits to the right.
- e. AND the contents of registers 0xE and 0x2 leaving the result in register 0x1.
Expert Solution & Answer
Learn your wayIncludes step-by-step video
schedule11:58
Students have asked these similar questions
1) Write an instruction sequence to decrement the contents of data memory locations 0x10, 0x1 1, and 0x12 by 5, 3, and 1, respectively
2) Write an instruction sequence to subtract the 4-byte number stored in memory locations 0x10-0x13 from the 4-byte number stored in memory locations 0x00-0x03 and store the differ[1]ence in memory locations 0x20-0x23
Assume that registers $s0 and $s1 hold the values 0x90000000 and 0xA0000000, respectively. These are integer values. Please take into account that these are 32-bit registers. a) What is the value of $t0 after the following MIPS instruction has been completed? add $t0, $s0, $s1 $s0: 0 x 9 0 0 0 0 0 0 0 $s1: 0 x A 0 0 0 0 0 0 0
For the same new ANDI instruction, how would the EXECUTE state be implemented? In the box on the answer sheet, write the one or more missing lines that would go where the blank line appears below. Hint: If needed, the names of various signals are AC (accumulator), IR (instruction register), mem_data (memory output data), PC (program counter), operand (fetched operand field), MW (memory write). when ex_andi => state <= fetch;
Chapter 2 Solutions
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
Ch. 2.1 - What sequence of events do you think would be...Ch. 2.1 - What information must the CPU supply to the main...Ch. 2.1 - Prob. 3QECh. 2.2 - Prob. 1QECh. 2.2 - In the text, JUMP instructions were expressed by...Ch. 2.2 - Is the instruction If 0 equals 0, then jump to...Ch. 2.2 - Write the example program in Figure 2.7 in actual...Ch. 2.2 - The following are instructions written in Vole...Ch. 2.2 - What is the difference between the instructions...Ch. 2.2 - Here are some instructions in English. Translate...
Ch. 2.3 - Prob. 1QECh. 2.3 - Suppose the Vole memory cells at addresses 0xB0 to...Ch. 2.3 - Suppose the Vole memory cells at addresses 0xA4 to...Ch. 2.3 - Suppose the Vole memory cells at addresses 0xF0 to...Ch. 2.4 - Prob. 1QECh. 2.4 - Prob. 2QECh. 2.4 - Prob. 3QECh. 2.4 - a. Suppose you XOR the first 2 bits of a string of...Ch. 2.4 - Prob. 5QECh. 2.4 - Prob. 6QECh. 2.4 - Prob. 7QECh. 2.4 - Prob. 8QECh. 2.4 - Prob. 9QECh. 2.4 - Prob. 10QECh. 2.4 - Using Vole machine language (Appendix C), write a...Ch. 2.4 - Prob. 12QECh. 2.5 - Prob. 1QECh. 2.5 - Prob. 2QECh. 2.5 - Prob. 3QECh. 2.6 - The hypotenuse example script truncates the sides...Ch. 2.6 - Prob. 2QECh. 2.6 - The Python built-in function str () will convert a...Ch. 2.6 - Use the Python built-in bin () to write a script...Ch. 2.6 - Prob. 6QECh. 2.7 - Referring back to Questions 3 of Section 2.3, if...Ch. 2.7 - Prob. 2QECh. 2.7 - Suppose there were two central processing units...Ch. 2 - a. In what way are general-purpose registers and...Ch. 2 - Answer the following questions in Vole machine...Ch. 2 - Prob. 3CRPCh. 2 - What is the value of the program counter in the...Ch. 2 - Prob. 5CRPCh. 2 - Prob. 6CRPCh. 2 - Prob. 7CRPCh. 2 - Suppose a machine language is designed with an...Ch. 2 - Translate the following instructions from English...Ch. 2 - Rewrite the program in Figure 2.7 assuming that...Ch. 2 - Classify each of the following Vole instructions...Ch. 2 - Prob. 12CRPCh. 2 - Prob. 13CRPCh. 2 - Suppose the memory cells at addresses 0x00 through...Ch. 2 - Suppose the memory cells at addresses 0x00 through...Ch. 2 - Suppose the memory cells at addresses 0x00 through...Ch. 2 - Suppose the memory cells at addresses 0x00 through...Ch. 2 - Prob. 18CRPCh. 2 - If the Vole executes an instruction every...Ch. 2 - Prob. 20CRPCh. 2 - Prob. 21CRPCh. 2 - Prob. 22CRPCh. 2 - Prob. 23CRPCh. 2 - Write a program in Vole to compute the sum of...Ch. 2 - Prob. 26CRPCh. 2 - Prob. 27CRPCh. 2 - Suppose the following program, written in Vole, is...Ch. 2 - Summarize the steps involved when the Vole...Ch. 2 - Summarize the steps involved when the Vole...Ch. 2 - Summarize the steps involved when the Vole...Ch. 2 - Suppose the registers 0x4 and 0x5 in the Vole...Ch. 2 - Prob. 33CRPCh. 2 - Prob. 34CRPCh. 2 - Prob. 35CRPCh. 2 - Prob. 36CRPCh. 2 - Prob. 37CRPCh. 2 - Prob. 38CRPCh. 2 - Prob. 39CRPCh. 2 - Prob. 40CRPCh. 2 - Prob. 41CRPCh. 2 - Prob. 42CRPCh. 2 - a. What single instruction in the Vole machine...Ch. 2 - Write a Vole program that reverses the contents of...Ch. 2 - Write a Vole program that subtracts the value...Ch. 2 - Prob. 46CRPCh. 2 - Suppose a person is typing forty words per minute...Ch. 2 - Prob. 48CRPCh. 2 - Suppose the Vole communicates with a printer using...Ch. 2 - Write a Vole program that places 0s in all the...Ch. 2 - Prob. 51CRPCh. 2 - Prob. 52CRPCh. 2 - Suppose you are given 32 processors, each capable...Ch. 2 - Prob. 54CRPCh. 2 - Prob. 55CRPCh. 2 - Describe how the average of a collection of...Ch. 2 - Write and test a Python script that reads in a...Ch. 2 - Write and test a Python script that reads in a...Ch. 2 - Prob. 59CRPCh. 2 - Suppose a computer manufacturer develops a new...Ch. 2 - Prob. 2SICh. 2 - Prob. 3SICh. 2 - Prob. 4SICh. 2 - Suppose a manufacturer produces a computer chip...Ch. 2 - Prob. 6SICh. 2 - Prob. 7SICh. 2 - Prob. 8SI
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
When displaying a Java applet, the browser invokes the _____ to interpret the bytecode into the appropriate mac...
Web Development and Design Foundations with HTML5 (9th Edition) (What's New in Computer Science)
Circuit Board Profit An electronics company sells circuit boards at a 40 percent profit. If you know the retail...
Starting Out with Java: From Control Structures through Data Structures (3rd Edition)
Solar System Use the Circle class to draw each of the planets of our solar system. Draw the sun first, then eac...
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
A(n) _____ is a set of well-defined steps for performing a task or solving a problem.
Starting Out With Visual Basic (8th Edition)
Using examples, illustrate the different types of adaptor needed to support sequential composition, hierarchica...
Software Engineering (10th Edition)
Array bounds checking happens. a. when the program is compiled b. when the program is saved c. when the program...
Starting Out with Java: Early Objects (6th Edition)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Below is a set of instructions for a three-address machine. Write down the equivalent set of instructions for a 1-address machine and a 0-address machine. SUB R1, B, C ADD R2, D, E MULT A, R1, R2arrow_forwardAssume the following register contents: $t0 = 0x01234567, $t1 = 0x56781234. Set back to these values back after answering each question. For the register values shown above, what is the value of registers ($t0, $t1, $t2, $t3) after executing each instruction? sll $t2, $t0, 2 and $t3, $t2, $t1arrow_forwardWhat is the Vole machine language instruction that performs the following? JUMP to the instruction at address 88 if the contents of register 2 equals that of register 0.arrow_forward
- (a) Write the Assembly language instruction to move value 1234H into register BX.(b) Write the Assembly language instructions to add the values 16H and ABH. Place the result inregister AX.(c) No value can be moved directly into which registers ?(d) What is the largest hex value that can be moved into a 16-bit register ? Into an 8-bit register ? Whatare the decimal equivalents of these hex values ?arrow_forwardAssume that the state of the 8088’s registers and memory just prior to the executionof each instruction in problem 15 is as follows: * in photos*What result is produced in the destination operand by executing instructions (a)through (k)? *only h through k* (h) MUL DX(i) IMUL BYTE PTR [BX+SI](j) DIV BYTE PTR [SI]+0030H(k) IDIV BYTE PTR [BX][SI]+0030Harrow_forwardPlease answer the question below alongside the followup; What would the next address have been if register 6 contained the value 0x0 instead? What will be the address of the next instruction if the following is executed? PC/Address A Instruction JMP 4arrow_forward
- What will be the values stored in registers r1 and r0 after the execution of the instruction mul r16, r17 if r16 and r17 originally contain the following values? (a) 0x58 and 0x37 (b) 0x29 and 0x49arrow_forwardIs there Read-After-Write (RAW) dependency between following instructions? If yes, which register. add $s0, $s1, $s2 lw $s3, 12 ($s0) Select one: a. Yes, over $s0 b. Yes, over $s2 c. No d. Yes, over $s1arrow_forwardFor sub $rd, $rs, $rtReg[rd] = Reg[rs] + Reg[rt] - Which resources (blocks) perform a useful function for the given instructions? - Use the following diagram for each instruction and trace its flow(use pen or highlighter) for the execution of that instruction. - List the units that are used for each instruction. (I mainly need help with tracing, please and thank you)arrow_forward
- 1- Perform an arithmetic shift right by two bits of the following bit pattern: 1001 1011 Select one: a. 0010 0110 b. 1100 1101 c. 0011 0111 d. 1110 0110 2- Which instruction moves the least significant bits of a product into register eight? Select one: a. mvlo $8 lo b. addu $B SO lo C. mfio $8 d. move $8 lo 3- What are the names of the two registers that hold the result of a multiply operation? Select one a. S0 and $1 b. high and low RO and R1 d. hi and lo 4- If you have two integers, each represented in 32 bits, how many bits might be needed to hold the product? Select one: a: 16 b. 64 C. 128 d. 32arrow_forwardQuestion Write an assembly code to implement the y = (x1+x2) * (x3+x4) expression on 2-address machine, and then display the value of y on the screen. Assume that the values of the variables are known. Hence, do not worry about their values in your code. The assembly instructions that are available in this machine are the following: Load b, a Load the value of a to b Add b, a Add the value of a to the value of b and place the result in b Subt b, a Subtract the value of a from the value of b and place the result in b Mult b, a Multiply the values found in a and b and place the result in b Store b, a Store the value of a in b. Output a Display the value of a on the screen Halt Stop the program Note that a or b could be either a register or a variable. Moreover, you can use the temporary registers R1 & R2 in your instructions to prevent changing the values of the variables (x1,x2,x3,x4) in the expression. In…arrow_forward2. For the following C statement, what is the corresponding MIPS assembly code? Assume that the C variables a, b, and c, have already been placed in registers $s0, $s1, $s2, respectively. Use a minimal number of MIPS assembly instructions. a = b + (c − 5); 3. For the following C statement, write the corresponding MIPS assembly code. Assume that the variables f, g, h, i, and j are assigned to registers $s0, $s1, $s2, $s3, and $s4, respectively. Assume that the base address of the arrays A and B are in registers $s6 and $s7, respectively. B[i-j] = A[8]; 4.Translate the following C code to MIPS. Assume that the variables, f,g. h, i, and j are assigned to registers $s0, $s1, $s2, $s3, $s4, and $s4, respectively. Assume that the base address of A and B are in registers $s6 and $s7, respectively. Assume that the elements of the arrays A and B are 8-byte words: B[8] = A[i] + A[j]; 5.For the MIPS assembly instructions below, what is the corresponding C statement? Assume that the…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- 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
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
Computer Fundamentals - Basics for Beginners; Author: Geek's Lesson;https://www.youtube.com/watch?v=eEo_aacpwCw;License: Standard YouTube License, CC-BY