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
Textbook Question
Chapter 2, Problem 10CRP
Rewrite the
Encoded instructions | Translation |
0x156C | Load register 0x5 with the bit pattern found in the memory cell at address 0x6C. |
0x166D | Load register 0x6 with the bit pattern found in the memory cell at address 0x6D. |
0x5056 | Add the contents of register 0x5 and 0x6 as though they were two’s complement representation and leave the result in register 0x0. |
0x306E | Store the contents of register 0x0 in the memory cell at address 0x6E. |
0xC000 | Halt. |
Figure 2.7
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
The first two bytes of a 4M x 16 main memory have the following Hex values:
Byte 0 is FE
Byte 1 is 04
If these bytes hold a 16-bit two's complement integer, what is its actual decimal value if:
a) Memory is big endian?
b) Memory is little endian?
2. The memory unit of a computer has 2M Words of 32 bits (or 4 bytes) each. The computer has an instruction format with 4 fields: an opcode field; an addressing mode field to specify 1 of 6 addressing modes; a register address field to specify one of 7 registers; and a memory address field. Assume an instruction is 32 bits long. Answer the following:
How large must the addressing mode field be?
How large must the register field be?
How large must the address field be?
How large is the opcode field?
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, R2
Question 1
Let's assume %ecx = 0x000FFD0E and %eax= 0x000FED25 (Hexadecimal representation). What is the value in %ecx after the following instruction?
orq %eax, %ecx
Provide answer in hexadecimal representation.
Acceptable answer format: 000003FD or 0x000003FD
Question 2
Let's assume %eax= 0x000FED25 (Hexadecimal representation). What is the value in %eax after the following instruction?
salq $4, %eax
Provide answer in hexadecimal representation.
Acceptable answer format: 000003FD or 0x000003FD
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
Find and correct the error(s) in each of the following segments of code: The following code should output the e...
Java How To Program (Early Objects)
If an overloaded or operator accesses a private member of a class. What must be done in that classs declarati...
Starting Out with C++ from Control Structures to Objects (9th Edition)
State whether each of the following is true or false. Specifying the order in which statements execute in a pro...
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
_____ is the only language computers can process directly, without any conversion required.
Starting Out With Visual Basic (7th Edition)
Describe some design trade-offs between efficiency and safety in some language you know.
Concepts Of Programming Languages
Write a method called sum with a while loop that adds up all numbers between two numbers a and b. The values fo...
Objects First with Java: A Practical Introduction Using BlueJ (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
- A(n) ________________ instruction always alters the instruction execution sequence. A(n) ______________ instruction alters the instruction execution sequence only if a specified Condition is true.arrow_forwardAssemble the following instructions by hand and write the hexadecimal machine languagebytes for each labeled instruction. Assume that val1 is located at offset 0. Where 16-bit values are used, the bytes must appear in little endian order:.dataval1 BYTE 5val2 WORD 256.codemov ax,@datamov ds,ax ; a.mov al,val1 ; b.mov cx,val2 ; c.mov dx,OFFSET val1 ; d.mov dl,2 ; e.mov bx,1000h ; f.arrow_forwardQ2- Write a program in assembly language for the 8085 microprocessor to receive one byte of data via the SID and store it at the memory address (3000H to 3009H) using a baud rate of 1200. Information: The 8085 processor operates at a frequency of 3.072 MHz . When receive the required bytes, you must adhere to the following: The bits of two high bits will be received at the beginning of the reception(start bits 1 1 ), after that the data bits will be received, after that the low bit of the stop bit will be received (stop bit 0 ). The following flowchart will help you. The solution must be integrated and include the calculation of the baudrate delay timearrow_forward
- Consider the hex value 0x01494022 as representing one MIPS machine language instruction: Convert the hexadecimal value to 32 bit binary value. What is the operational code value (opcode) for this instruction? What is the name of the instruction with that opcode? What is the format of the instruction (R, I, or J)? Show the MIPS format of the instruction using the appropriate syntax?arrow_forwardQuestion 13 Assume that EBX and ECX have the following values EBX: FF FF FF 75 ECX: 00 00 01 A2 After the execution of the instruction ADD EBX, ECX The Value in EBX is _________ Group of answer choices 000001A2 00000117 00000117 none of them Question 14 The MOV instruction changes the flags Group of answer choices True False Question 15 The Binary Representation for each of the following Hexadecimal number 7C Group of answer choices 1111000 11110100 1111100 none of themarrow_forwardFor the next two questions, consider the following portion of assembly code, which places two quad-word (64-bit) values in memory, and names the locations a and b respectively. .align 8 a: .quad 0xaaaa b: .quad 0x0000 (e) Provide a sequence of instructions that will place the 64-bit value at memory location a into register %rdx (f) Provide a sequence of instructions that will place the 64-bit value 0xbbbb into memory at location b.arrow_forward
- write a program to evaluate the arithmetic expression:X = (AB-C) ÷ (DE+F)1) Assume a memory-to-memory architecture with two-address instructions. plz solve in 40 minutesarrow_forwardGiven the binary format of an instruction as follows0000 0011 0000 1000 1000 1000 0110 0011a. What assembly instruction does this correspond to?b. If the PC = 0X0040 00F4, what is the target address?c. How many instructions forwards or backwards is that?d. How many bytes is that in decimal?arrow_forward25: . Find the time delay in the following program if the crystal frequency is 1 MHz. Do not ignore the time delay due to the first and last instruction. DELAY: LDI R16, 30 AGAIN: LDI R17, 35 HERE: NOP NOP DEC R17 BRNE HERE DEC R16 BRNE AGAIN RET 26: Write a program to display 2 on 7 segment. A 7 segment is connected to PortD.arrow_forward
- Assume 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_forwardFor the following code segment write the machine language representation of each instruction in binary. The instruction codes are add->32,beq->4,addi->8, lw->35,j->2. Asume that Loop has the address of Ox4CB23 Loop: beq $t1, $t2, done lw $s1, 0(($t0) add $s0, $s1, $s0 addi $t1, $t1, 1 j Loop done:arrow_forwardWhat are the content of R16 and the carry flag after the execution of the following sequence of instructions? SEC LDI R16, 0x29 ROR R16 LSR R16 Select one: a. R16=0x4A and c=1 b. R16=0xCA and c=0 c. R16=0x4A and c=0 d. R16=0xCA and c=1arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Systems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage Learning
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning
Instruction Format (With reference to address); Author: ChiragBhalodia;https://www.youtube.com/watch?v=lNdy8HREvgo;License: Standard YouTube License, CC-BY