CSE230 Questions And Answers With Verified Study Updates
AfterMhavingMrunMbothMofMtheMfollowingMinstructions,MwhatMvalueMwillMbeMinMregisterMt8?
liM$t8,M2
liM$t8,M4M-MAnswerM✔✔4
IfMregisterMt0McontainsM0MandMt1McontainsM4,MwhatMwillMtheMfollowingMinstructionMdo?
swM$t0,M0($t1)M-
MAnswerM ✔✔CopyMtheMcontentsMofMregisterMt0MintoMtheMmemoryMaddress,M4
IfMregisterMt2McontainsM1MandMregisterMt3McontainsM1,MwhatMvalueMwillMtheyMcontainMafter
MrunningMtheMfollowingMinstruction?M-
MAnswerM ✔✔t2MwillMcontainM2MandMt3MwillMcontainM1
WhichMofMtheMfollowingMcodeMsnippetsMresultsMinMaMloop?M-MAnswerM✔✔label:
jMlabel
WhichMofMtheMfollowingMinstructionsMwillMreadMaMvalueMfromMmemoryMandMcopyMitMintoM
aMregister?M-MAnswerM✔✔lwM-
MTheMloadMimmediateM(li)MinstructionMloadsMaMvalueMgivenMinMtheMinstructionM(i.e.ManMim
mediateMvalue)MdirectlyMintoMaMregisterMandMdoesMnotMinteractMwithMmemory.MTheMstoreM
wordM(sw)MinstructionMperformsMaMwriteMtoMmemoryMratherMthanMaMread.MBothMtheMadd
MimmediateM(addiu)MandMshiftMleftMlogicalM(sll)MinstructionsMonlyMinteractMwithMregistersMa
ndMdoMnotMreadMfromMorMwriteMtoMmemory.
, WhichMofMtheMfollowingMinstructionsMwillMwriteMaMvalueMfromMaMregisterMintoMmemory?M-
MAnswerM ✔✔swM-
MTheMloadMimmediateM(li)MinstructionMloadsMaMvalueMgivenMinMtheMinstructionM(i.e.ManMim
mediateMvalue)MdirectlyMintoMaMregisterMandMdoesMnotMinteractMwithMmemory.MTheMstoreM
wordM(sw)MinstructionMperformsMaMwriteMtoMmemoryMratherMthanMaMread.MBothMtheMadd
MimmediateM(addiu)MandMshiftMleftMlogicalM(sll)MinstructionsMonlyMinteractMwithMregistersMa
ndMdoMnotMreadMfromMorMwriteMtoMmemory.
AtManyMgivenMtimeMwhileMaMprogramMisMrunning,MwhereMisMtheMcurrentMvalueMofMtheMswi
tchesMlocated?M-MAnswerM✔✔MemoryMaddress:M0xf0100000
IfMswitchM2MandMswitchM3MareMbothMset,MwhatMvalueMwillMbeMreadMfromMtheMswitches?M-
MAnswerM ✔✔12M(2^2M+M2^3)
WhichMtypesMofMinstructionsMhaveMbranchMdelayMslots?M-
MAnswerM ✔✔JumpMandMbranchMinstructions
WhatMisMtheMsmallestMvalueMthatMcanMbeMwrittenMtoMtheMaddressMofMtheMLEDMarrayMinMo
rderMtoMturnMonMallM8MLEDs?M-MAnswerM✔✔0xff
WhichMvalue,MwhenMwrittenMtoMtheMmemoryMaddressMofMtheMLEDMarray,MwillMturnMonMLE
DsM0,M2,MandM4?M-MAnswerM✔✔0b10101
AssumeMthatMregisterM$t2McontainsM0xf0100000.MWhichMinstructionMwillMcopyMtheMcurrent
MvalueMofMtheMswitchesMintoMregisterM$s1?M-MAnswerM ✔✔lwM$s1,M0($t2)
TheMfirstMargumentMinMtheMloadMwordMinstructionMisMtheMdestinationMregister,MwhichMisMw
hereMtheMvalueMcopiedMfromMmemoryMwillMbeMplaced.
AfterMhavingMrunMbothMofMtheMfollowingMinstructions,MwhatMvalueMwillMbeMinMregisterMt8?
liM$t8,M2
liM$t8,M4M-MAnswerM✔✔4
IfMregisterMt0McontainsM0MandMt1McontainsM4,MwhatMwillMtheMfollowingMinstructionMdo?
swM$t0,M0($t1)M-
MAnswerM ✔✔CopyMtheMcontentsMofMregisterMt0MintoMtheMmemoryMaddress,M4
IfMregisterMt2McontainsM1MandMregisterMt3McontainsM1,MwhatMvalueMwillMtheyMcontainMafter
MrunningMtheMfollowingMinstruction?M-
MAnswerM ✔✔t2MwillMcontainM2MandMt3MwillMcontainM1
WhichMofMtheMfollowingMcodeMsnippetsMresultsMinMaMloop?M-MAnswerM✔✔label:
jMlabel
WhichMofMtheMfollowingMinstructionsMwillMreadMaMvalueMfromMmemoryMandMcopyMitMintoM
aMregister?M-MAnswerM✔✔lwM-
MTheMloadMimmediateM(li)MinstructionMloadsMaMvalueMgivenMinMtheMinstructionM(i.e.ManMim
mediateMvalue)MdirectlyMintoMaMregisterMandMdoesMnotMinteractMwithMmemory.MTheMstoreM
wordM(sw)MinstructionMperformsMaMwriteMtoMmemoryMratherMthanMaMread.MBothMtheMadd
MimmediateM(addiu)MandMshiftMleftMlogicalM(sll)MinstructionsMonlyMinteractMwithMregistersMa
ndMdoMnotMreadMfromMorMwriteMtoMmemory.
, WhichMofMtheMfollowingMinstructionsMwillMwriteMaMvalueMfromMaMregisterMintoMmemory?M-
MAnswerM ✔✔swM-
MTheMloadMimmediateM(li)MinstructionMloadsMaMvalueMgivenMinMtheMinstructionM(i.e.ManMim
mediateMvalue)MdirectlyMintoMaMregisterMandMdoesMnotMinteractMwithMmemory.MTheMstoreM
wordM(sw)MinstructionMperformsMaMwriteMtoMmemoryMratherMthanMaMread.MBothMtheMadd
MimmediateM(addiu)MandMshiftMleftMlogicalM(sll)MinstructionsMonlyMinteractMwithMregistersMa
ndMdoMnotMreadMfromMorMwriteMtoMmemory.
AtManyMgivenMtimeMwhileMaMprogramMisMrunning,MwhereMisMtheMcurrentMvalueMofMtheMswi
tchesMlocated?M-MAnswerM✔✔MemoryMaddress:M0xf0100000
IfMswitchM2MandMswitchM3MareMbothMset,MwhatMvalueMwillMbeMreadMfromMtheMswitches?M-
MAnswerM ✔✔12M(2^2M+M2^3)
WhichMtypesMofMinstructionsMhaveMbranchMdelayMslots?M-
MAnswerM ✔✔JumpMandMbranchMinstructions
WhatMisMtheMsmallestMvalueMthatMcanMbeMwrittenMtoMtheMaddressMofMtheMLEDMarrayMinMo
rderMtoMturnMonMallM8MLEDs?M-MAnswerM✔✔0xff
WhichMvalue,MwhenMwrittenMtoMtheMmemoryMaddressMofMtheMLEDMarray,MwillMturnMonMLE
DsM0,M2,MandM4?M-MAnswerM✔✔0b10101
AssumeMthatMregisterM$t2McontainsM0xf0100000.MWhichMinstructionMwillMcopyMtheMcurrent
MvalueMofMtheMswitchesMintoMregisterM$s1?M-MAnswerM ✔✔lwM$s1,M0($t2)
TheMfirstMargumentMinMtheMloadMwordMinstructionMisMtheMdestinationMregister,MwhichMisMw
hereMtheMvalueMcopiedMfromMmemoryMwillMbeMplaced.