Question

The following are the %l2 register values, the %l3 register values, and the commands to execute:...

The following are the %l2 register values, the %l3 register values, and the commands to execute: After executing the command, write the values of the Condition code Z, N, V, C, and %l4 registers in the table.

1)

%l2: 0x8000_0000

%l3: 0x8000_0000

addcc %l2, %l3, %l4

-------------------------> Z=? , N=? , V=? , C=? , %l4=?

2)

%l2: 0x0123_4567

%l3: 0xFEDC_BA98

xorcc %l2, %l3, %l4

-------------------------> Z=? , N=? , V=? , C=? , %l4=?

Homework Answers

Answer #1

Greetings!!

1)

%l2: 0x8000_0000

%l3: 0x8000_0000

-------------------------

%I4 0x1 0000 0000

Z=1 Since the 8 digit(or 32 bit) answer is 0

N=0 SInce the MSB is 0 becuase MSB reperesents sign

V=1 SInce an overflow occured

C=1 Since a carry is generated out of MSB

%l4=0000 0000 with C=1

2) xorcc %l2, %l3, %l4

%l2: 0x0123_4567

%l3: 0xFEDC_BA98

-------------------------

%I4 0xFFFF FFFF

Z=0 Since the answer is non zero  

N=1 Since the MSB is 1 which represents sign

V=0 By default

C=0 By default

%l4=0xFFFF FFFF

Hope this helps

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
1. Enter the integer value of the $v0 register after executing  the following intstruction, given the register...
1. Enter the integer value of the $v0 register after executing  the following intstruction, given the register values $zero = 0, $t7 = 109 : sll $v0, $t7,3 2. Enter the integer value of the $v0 register after executing the following instruction, given the register values $t2 = 30 : addiu $v0, $t2, 14648
List a sequence of Linux commands you would execute after you successfully log on to your...
List a sequence of Linux commands you would execute after you successfully log on to your VM machine, make a directory called midterm in your home directory, create a simple C program called display.c in the newly created directory, compile the code using gcc compiler, and run the program, and finally, save the output to a text file called display.txt. Remember to briefly explain each command.
Example the Pep/9 system contains the following four hexadecimal values register A: 25B6 register X: AE20...
Example the Pep/9 system contains the following four hexadecimal values register A: 25B6 register X: AE20 Mem[091D]: 0FF0 Mem[0A71]: 301D If these are the values before each of the following instructions executes, indicate which of these values is changed when each statement is executed, and show the new value. If a register or a memory location shown above is unchanged by the instruction, don't show its contents; only show the item that changed and what the new 16-bit value of...
What values are in the status register after the operation 1000 + 1111 for a 4-bit...
What values are in the status register after the operation 1000 + 1111 for a 4-bit ALU? ("+" means addition) Z:   V:   C:   N:
I. What value will be in register r2 after execution of the following instructions? Show your...
I. What value will be in register r2 after execution of the following instructions? Show your work with the register values after executing each instruction. MOV r2, #0x0 LDR r1, =0xCF MOVS r1, r1, LSR #1 ADC r2, r2, #0 MOVS r1, r1, LSR #1 ADC r2, r2, #0 II. Assume a 32 bit register holds a data of four bytes as B3B2B1B0. Write a sequence of ARM instruction that takes this data as input and swaps the bytes 0...
-Data Structure in C++ (Review for C++) -using vector and class In this assignment you’re going...
-Data Structure in C++ (Review for C++) -using vector and class In this assignment you’re going to build a simple “register machine”, a kind of minimal computer that only supports storing a fixed number of values (i.e., no randomly-accessible “main memory”). Your machine will consist of an input loop that reads lines of input from the user and then executes them, stopping when the user quits (by executing the stop command). Each line of input consists of a command followed...
Consider executing the following code on the pipelined datapath that we discussed in class. a). During...
Consider executing the following code on the pipelined datapath that we discussed in class. a). During the 5th cycle, which registers are being read and which register(s) will be written (using the register file)? b). Explain what the forwarding unit is doing during the 5th cycle of execution. Which registers are being compared? List all pairs of registers that are compared during the 5th cycle for the forwarding unit. (First, you need to determine which instruction's values are in the...
Consider the following recursive algorithm. Algorithm Mystery(n) if n=1 then Execute Task A; // Requires Θ(1)...
Consider the following recursive algorithm. Algorithm Mystery(n) if n=1 then Execute Task A; // Requires Θ(1) operations else Mystery(n/3); Mystery(n/3); Mystery(n/3); Execute Task B;  //Requires 2n operations end if Let C(n) be the complexity of Mystery(n). Use the method of backward substitution to determine C(n) in three steps. a) Write the recurrence relation for C(n) including the initial condition. b) Write at least two substitution steps for C(n) and identify the pattern. c) Determine the complexity class of the algorithm in...
III. After execution of the following instructions what value will be in register r0? LDR                ...
III. After execution of the following instructions what value will be in register r0? LDR                 r12, =0xA4000000 LDR                 r0, =0x75 LDR                 r1, =0xD2 LDR                 r2, =0x9C LDR                 r5, =0xC STMDB           r12!, {r0-r2, r5} LDR                 r0, [r12, #8] SUB                 r0, #0x77 IV. Assume that the variables f, g, h, i, and j are assigned to registers r0, r1, r2, r3, and r4, respectively. Assume that the base address of the arrays A and...
Write a sequence of two instructions that copies bits 0-5 from AL to bits 0-5 in...
Write a sequence of two instructions that copies bits 0-5 from AL to bits 0-5 in BL. Bits 6-7 in BL should be cleared, and AL should be unchanged             Mov al, bl       And 00111111, bl       Write a sequence of two instructions that copies the integer in bits 4-7 from AL register into bits 0-3 of the BL register. Upper 4 bits of AL and BL will be cleared             Shr al, 4       Mov bl,...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT