Assume that registers $s0 and $s1 hold the values 0x7 and
0x95, respectively. assume the...
![subject](/tpl/images/cats/User.png)
Engineering, 28.01.2020 02:31 rprest00
Assume that registers $s0 and $s1 hold the values 0x7 and
0x95, respectively. assume these are twos complement numbers.
a. what is $s0 in decimal?
b. what are the 8 most-significant bits?
c. what is the decimal value of those 8 msbs?
d. what is $s1 in decimal?
e. what are the 8 most-significant bits?
f. what is the decimal value of those 8 msbs (remember, it’s twos complement)?
g. drop the last 6 hex digits from both numbers – they’re just trailing zeros.
if we need to subtract $s1, we’ll need to calculate its twos complement. using only the first two hex characters as input, what is the twos complement value?
h. what is the decimal value of those 8 bits?
i. calculate the value of $t0 for the following assembly code:
add $t0, $s0, $s1
but do it with just the first two hex characters, as if we had only 8-bit registers.
in decimal: (hint: it’s a number between -10 and +10)
j. what about in hex (remember, use two hex characters for 8 bits):
k. can we just add back the trailing six "0" hex characters we eliminated? to find out, calculate the result using all 8 hexadecimal values for each source operand, and use 8 for the output. what is the value of $t0 from the same command?
add $t0, $s0, $s1
in value in hex:
l. does the "trick" work? can we truncate inputs to ignore the same number of trailing zeros from both operands and still get the right answer in hex/binary?
no
m. is there a carry-out from this equation (did we produce a 33rd bit when using the full 32-bit operands, or a 9th bit when using the 8-bit operands)?
no
n. does that carry-out mean we have overflow? explain.
noexplain:
o. we now turn to subtraction. we will need to calculate the twos complement of $s2 so we can add it instead of subtract it. what is that value?
in hex (8 characters):
p. 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
$t0 in hex:
q. try using only the first 8 bits like we did earlier, as if the problem were:
sub $t0, 0x70, -0x95
first, what is -0x95? calculate the twos complement of 0x95?
in hex:
r. now, what is 0x70 + -0x95? substitute your 2’s comp value for -0x95 to make it positive, and then add instead of subtracting.
in hex:
s. what about in binary?
t. is there carryout in this result? yes no
u. is there overflow (invalid answer)?
yes no. explain:
![ansver](/tpl/images/cats/User.png)
Answers: 3
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Another question on Engineering
![question](/tpl/images/cats/User.png)
Engineering, 04.07.2019 18:10
What difference(s) did you notice using a pneumatic circuit over hydraulic circuit.explain why the pneumatic piston stumbles when it hits an obstacle.
Answers: 2
![question](/tpl/images/cats/User.png)
Engineering, 04.07.2019 18:10
Apump is used to circulate hot water in a home heating system. water enters the well-insulated pump operating at steady state at a rate of 0.42 gal/min. the inlet pressure and temperature are 14.7 lbf/in.2, and 180°f, respectively; at the exit the pressure is 60 lbf/in.2 the pump requires 1/15 hp of power input. water can be modeled as an incompressible substance with constant density of 60.58 lb/ft3 and constant specific heat of 1 btu/lb or. neglecting kinetic and potential energy effects, determine the temperature change, in °r, as the water flows through the pump.
Answers: 1
![question](/tpl/images/cats/User.png)
Engineering, 04.07.2019 18:10
An air conditioning system consist of a 5 cm diameter pipe, operating at a pressure of 200 kpa. the air initially enters the pipe at 15°c with a velocity of 20 m/s and relative humidity of 80%. if the heat supply throughout the process is 960 w, determine the relative humidity and the temperature at the outlet
Answers: 3
![question](/tpl/images/cats/User.png)
Engineering, 04.07.2019 18:10
Assuming compressible flow of air and that the measurements are done at flagstaff a pitot static tube that gives the difference of total and static pressure measures 0.35 m of mercury. what is the velocity of air? assume the temperature to be 300k. (submit your excel or matlab calculation sheet)
Answers: 1
You know the right answer?
Questions
![question](/tpl/images/cats/fizika.png)
![question](/tpl/images/cats/ekonomika.png)
![question](/tpl/images/cats/obshestvoznanie.png)
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 14.01.2020 04:31
![question](/tpl/images/cats/biologiya.png)
Biology, 14.01.2020 04:31
![question](/tpl/images/cats/mat.png)
Mathematics, 14.01.2020 04:31
![question](/tpl/images/cats/ekonomika.png)
Business, 14.01.2020 04:31
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 14.01.2020 04:31
![question](/tpl/images/cats/ekonomika.png)
![question](/tpl/images/cats/ekonomika.png)
![question](/tpl/images/cats/ekonomika.png)
![question](/tpl/images/cats/pravo.png)
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 14.01.2020 04:31
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/health.png)
![question](/tpl/images/cats/ekonomika.png)
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 14.01.2020 04:31
![question](/tpl/images/cats/istoriya.png)
History, 14.01.2020 04:31
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 14.01.2020 04:31