Chapter 2: Q40E (page 172)
Question: If the current value of the PC is 0x00000000, can you use a single jump instruction to get to the PC address as shown in Exercise 2.39?
Short Answer
No, single jump can go up to 0x0FFFFFFC
Chapter 2: Q40E (page 172)
Question: If the current value of the PC is 0x00000000, can you use a single jump instruction to get to the PC address as shown in Exercise 2.39?
No, single jump can go up to 0x0FFFFFFC
All the tools & learning materials you need for study success - in one app.
Get started for freeAssume that registers \(s0 and \)s1 hold the values 0x80000000 and 0xD0000000, respectively.
1. What is the value of \(t0 for the following assembly code?
add \)t0,\(s0,\)s1
2. Is the result in \(t0 the desired result, or has there been an overflow?
3. For the contents of registers \)s0 and \(s1 as specified above, what is the value of \)t0 for the following assembly code?
sub \(t0,\)s0,\(s1
4. Is the result in \)t0 the desired result, or has there been an overflow?
5. For the contents of registers \(s0 and \)s1 as specified above, What is the value of \(t0 for the following assembly code?
add \)t0,\(s0,\)s1
add \(t0,\)t0,\(s0
6. Is the result in \)t0 the desired result, or has there been an overflow?
Provide the type, assembly language instruction, and binary representation of instruction described by the following MIPS fields:
op= , rs=1, rt=2, const=
Question: Write a program in MIPS assembly language to convert an ASCII number string containing positive and negative integer decimal strings, to an integer. Your program should expect register \(a0 to hold the address of a null-terminated string containing some combination of the digits 0 through 9. Your program should compute the integer value equivalent to this string of digits, then place the number in register \)v0. If a non-digit character appears anywhere in the string, your program should stop with the value -1 in register \(v0. For example, if register \)a0 points to a sequence of three bytes 50ten, 52ten, 0ten (the null-terminating string “24”), then when the program stops, register $v0 should contain the value .
Question: Provide the type and hexadecimal representation of the following instruction:
sw \(t1, 32(\)t2)
Question: [5] <§2.7> Suppose the program counter (PC) is set to 0x2000 0000. Is it possible to use the jump (j) MIPS assembly instruction to set the PC to the address as 0x4000 0000? Is it possible to use the branch-on-equal (beq) MIPS assembly instruction to set the PC to this same address?
What do you think about this solution?
We value your feedback to improve our textbook solutions.