12. Assume that the registers R0, R1, R2, and R3 contains the values 10, 20, 30, and 40 respectively. Find the content of R0 after the execution of the following code ADD R0, R0, R1 ADD R0, R3, R2 ADD R0, R0, R3 13.Suppose we have a hypothetical processor of which each register has only 5 bits. The registers are initialized as follows; r0= 0b10110 and r1=0b11110. What are the values of the N, Z, C, V flags after the execution of the following instructions? Assume initially N=0, Z=0, C=1, V=0 and these instructions are executed independently. a) ADCS r2, r0, r1 b) RSBS r2, r0, #-4 c) ADDS r2, r0, r1 d) SBCS r2, r0, # 8 e) SDIV r2, r0, r1
Added by Hannah H.
Close
Step 1
Step 1: Read the initial values of the registers: R0 = 10, R1 = 20, R2 = 30, R3 = 40. Show more…
Show all steps
Your feedback will help us improve your experience
Adi S and 84 other Physics 102 Electricity and Magnetism educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Given the starting values listed for registers and a portion of storage, show the complete contents (in hex) after execution of the instruction. Starting values apply to each instruction. Results are NOT cumulative. Starting values for each instruction: R0 = 00000200 R1 = FF000204 R3 = 0000036C R4 = FFFFFFFF R5 = FFFFFFFF R6 = 00000004 R7 = 00000064 R8 = 00000004 ADDRESS CONTENTS 000200 F5F5F5F5 0000003C 00000123 00000008 LR 5,6 R5 = _____________ LA 1,2(0,3) R1 = _____________ L 6,4(6,1) R6 = _____________ DR 4,8 R4 = _____________ R5 = _____________ AR 0,6 R0 = _____________ MR 4,4 R4 = _____________ R5 = _____________ LTR 3,4 R3 = _____________
Akash M.
Design a 4-bit processor which consists of 4 data registers, each of 4 bits, and an instruction register (IR) of 7 bits. The first 3 bits of the instruction tell which operation is to be performed, the next 2 bits signify the first register, and the last two bits signify the second register. I6-I4 I3-I2 I1-I0 Operation Code 4-bit register operand 1 (R1) 4-bit register operand 2 (R2) The following operations are performed by the processor. Operation Code Operation Performed Description 000 R1 = A Load the contents of input A into register operand 1. 001 R1 = R2 Move the contents of register operand 2 into register operand 1. 010 R1 = R1 + R2 Add the contents of register operand 1 and register operand 2 and load it into register operand 1. 011 R1 = R1 - R2 Subtract the contents of register operand 2 from register operand 1 and load it into register operand 1. 100 R1 = R1 * R2 Multiply the contents of register operand 1 and register operand 2 and load it into register operand 1 and 2. (As the result is of 8 bits) 101 R1 = R1/2^i Divide the register contents of register operand 1 by 2^i (i is an input) and load the result into register operand 1. 110 R1 = R1*2^i Multiply the register contents of register operand 1 by 2^i (i is an input) and load the result into register operand 1. 111 R1 = R1 + R2 Logical OR the contents of register operand 1 and register operand 2 and load it into register operand 1.
Supreeta N.
Simulate the execution (contents in memory and registers in hexadecimal). Both instructions and data are 16 bits long. The instruction format provides 4 bits for the opcode, and the remaining 12 bits can be directly addressed. The list of opcodes: 0x01 = Load AC from Memory 0x02 = Store AC to Memory 0x03 = Load AC from I/O (e.g. 3005: Load AC from I/O device 5) 0x05 = Add to AC from Memory 0x07 = Store AC to I/O (e.g. 7006: Store AC to I/O device 6) Memory: 200: 3005 201: 5500 202: 2501 500: 0005 501: Assume the value retrieved from device 5 is 0x2. The value in the PC is 200. 3.1. Simulate the execution: List the values in PC, AC, and IR in both fetch and execute cycles for each instruction. (6 points) 3.2. What is the value in address 501 at the end of the execution? (1 point)
Recommended Textbooks
University Physics with Modern Physics
Physics: Principles with Applications
Fundamentals of Physics
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD