计算机导论作业2.docx

上传人:b****1 文档编号:3171737 上传时间:2023-05-05 格式:DOCX 页数:18 大小:19.90KB
下载 相关 举报
计算机导论作业2.docx_第1页
第1页 / 共18页
计算机导论作业2.docx_第2页
第2页 / 共18页
计算机导论作业2.docx_第3页
第3页 / 共18页
计算机导论作业2.docx_第4页
第4页 / 共18页
计算机导论作业2.docx_第5页
第5页 / 共18页
计算机导论作业2.docx_第6页
第6页 / 共18页
计算机导论作业2.docx_第7页
第7页 / 共18页
计算机导论作业2.docx_第8页
第8页 / 共18页
计算机导论作业2.docx_第9页
第9页 / 共18页
计算机导论作业2.docx_第10页
第10页 / 共18页
计算机导论作业2.docx_第11页
第11页 / 共18页
计算机导论作业2.docx_第12页
第12页 / 共18页
计算机导论作业2.docx_第13页
第13页 / 共18页
计算机导论作业2.docx_第14页
第14页 / 共18页
计算机导论作业2.docx_第15页
第15页 / 共18页
计算机导论作业2.docx_第16页
第16页 / 共18页
计算机导论作业2.docx_第17页
第17页 / 共18页
计算机导论作业2.docx_第18页
第18页 / 共18页
亲,该文档总共18页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

计算机导论作业2.docx

《计算机导论作业2.docx》由会员分享,可在线阅读,更多相关《计算机导论作业2.docx(18页珍藏版)》请在冰点文库上搜索。

计算机导论作业2.docx

计算机导论作业2

TestBank—ChapterTwo(DataManipulation)

ThefollowingtableisfromAppendixCofthetext.Itisincludedheresothatitcanbeincorporatedintestsforstudentreference.Questionsinthistestbankrefertothistableasthe“languagedescriptiontable.”

Op-

codeOperandDescription

1RXYLOADtheregisterRwiththebitpatternfoundinthememorycellwhoseaddressisXY.Example:

14A3wouldcausethecontentsofthememorycelllocatedataddressA3tobeplaced

inregister4.

2RXYLOADtheregisterRwiththebitpatternXY.

Example:

20A3wouldcausethevalueA3tobeplacedinregister0.

3RXYSTOREthebitpatternfoundinregisterRinthememorycellwhoseaddressisXY.

Example:

35B1wouldcausethecontentsofregister5tobeplacedinthememorycellwhose

addressisB1.

40RSMOVEthebitpatternfoundinregisterRtoregisterS.

Example:

40A4wouldcausethecontentsofregisterAtobecopiedintoregister4.

5RSTADDthebitpatternsinregistersSandTasthoughtheyweretwo’scomplementrepresentations

andleavetheresultinregisterR.

Example:

5726wouldcausethebinaryvaluesinregisters2and6tobeaddedandthesumplaced

inregister7.

6RSTADDthebitpatternsinregistersSandTasthoughtheyrepresentedvaluesinfloating-point

notationandleavethefloating-pointresultinregisterR.

Example:

634Ewouldcausethevaluesinregisters4andEtobeaddedasfloating-pointvalues

andtheresulttobeplacedinregister3.

7RSTORthebitpatternsinregistersSandTandplacetheresultinregisterR.

Example:

7CB4wouldcausetheresultofORingthecontentsofregistersBand4tobeplacedin

registerC.

8RSTANDthebitpatternsinregisterSandTandplacetheresultinregisterR.

Example:

8045wouldcausetheresultofANDingthecontentsofregisters4and5tobeplacedin

register0.

9RSTEXCLUSIVEORthebitpatternsinregistersSandTandplacetheresultinregisterR.

Example:

95F3wouldcausetheresultofEXCLUSIVEORingthecontentsofregistersFand3to

beplacedinregister5.

AR0XROTATEthebitpatterninregisterRonebittotherightXtimes.Eachtimeplacethebitthat

startedatthelow-orderendatthehigh-orderend.

Example:

A403wouldcausethecontentsofregister4toberotated3bitstotherightinacircular

fashion.

BRXYJUMPtotheinstructionlocatedinthememorycellataddressXYifthebitpatterninregisterR

isequaltothebitpatterninregisternumber0.Otherwise,continuewiththenormalsequenceof

execution.(ThejumpisimplementedbycopyingXYintotheprogramcounterduringtheexecute

phase.)

Example:

B43Cwouldfirstcomparethecontentsofregister4withthecontentsofregister0.If

thetwowereequal,thepattern3Cwouldbeplacedintheprogramcountersothatthenext

instructionexecutedwouldbetheonelocatedatthatmemoryaddress.Otherwise,nothingwould

bedoneandprogramexecutionwouldcontinueinitsnormalsequence.

C000HALTexecution.

Example:

C000wouldcauseprogramexecutiontostop.

MultipleChoiceQuestions

1.WhichofthefollowingisnotcontainedinaCPU?

A.InstructionregisterB.Programcounter

C.General-purposeregisterD.Memorycell

ANSWER:

D

2.Whichofthefollowinginstructions(asdescribedinthelanguagedescriptiontable)changesthecontentsofamemorycell?

A.10ABB.20ABC.30ABD.40AB

ANSWER:

C

3.Whichofthefollowinginstructions(asdescribedinthelanguagedescriptiontable)places00000000inregisterA?

A.1A00B.2A00C.3A00D.200A

ANSWER:

B

4.Whichofthefollowinginstructions(asdescribedinthelanguagedescriptiontable)places00000000inregister5?

A.25FFB.9555C.15FFD.8555

ANSWER:

B

5.Whichofthefollowinginstructions(asdescribedinthelanguagedescriptiontable)willnotchangethecontentsofregister5?

A.1508B.2508C.A503D.A508

ANSWER:

D

6.Whichofthefollowinginstructions(asdescribedinthelanguagedescriptiontable)isequivalenttorequestingthatregisterAberotatedtotheleftbythreebits?

A.AA05B.AA03C.AA08D.AA01

ANSWER:

A

7.Whichofthefollowinginstructions(asdescribedinthelanguagedescriptiontable)changesthecontentsofregister7?

A.4077B.4075C.4057D.37BB

ANSWER:

C

8.Whichofthefollowingisnotaformofparallelprocessing?

A.SISDB.MIMDC.SIMD

ANSWER:

A

9.InwhichofthefollowinglocationsisinformationmostreadilyavailableformanipulationbytheCPU?

A.General-purposeregistersB.MainmemoryC.Massstorage

ANSWER:

A

10.Thebusinacomputerisanexampleofwhichformofcommunication?

A.SerialB.ParallelC.NeitherAnorB

ANSWER:

B

11.Whichofthefollowinginstructionsdoesnotfallinthecategoryofarithmetic/logicinstructions?

A.ROTATEB.ADDC.ORD.JUMP

ANSWER:

D

12.Whichofthefollowinginstructionsfallsinthecategoryofdatatransferinstructions?

A.LOADB.ANDC.ROTATED.JUMP

ANSWER:

A

13.Whichofthefollowingisnotacomponentofamachineinstruction?

A.Op-codeB.PortC.Operand

ANSWER:

B

14.WhichofthefollowingisnotanactivityperformedentirelywithinaCPU?

A.FetchinstructionsB.PerformBooleanoperations

C.PerformarithmeticoperationsD.Movedatabetweenregisters

ANSWER:

A

15.WhatmaskinregisterFwouldcausetheinstruction8AAF(refertothelanguagedescriptiontable)toputa0inthemostsignificantbitofregisterAwithoutdisturbingtheotherbits?

A.11111110B.00000001C.10000000D.011111111

ANSWER:

D

16.WhatmaskinregisterFwouldcausetheinstruction7AAF(refertothelanguagedescriptiontable)toputa1inthemostsignificantbitofregisterAwithoutdisturbingtheotherbits?

A.11111110B.00000001C.10000000D.011111111

ANSWER:

C

17.Whichofthefollowinginstructionswillnotproducethesameresultastheothertwo?

(Refertothelanguagedescriptiontable.)

A.A502B.A506C.A50A

ANSWER:

B

18.Whichofthefollowinginstructionswillnotproducethesameresultastheothertwo?

(Refertothelanguagedescriptiontable.)

A.9555B.2500C.1500

ANSWER:

C

19.IfregisterAcontainedthepattern00000000,whichofthefollowinginstructionscouldalterthecontentsofregister0?

(Refertothelanguagedescriptiontable.)

A.700AB.800AC.900A

ANSWER:

B

20.Whichofthefollowinginstructions(asdescribedinthelanguagedescriptiontable)isessentiallyanunconditionaljump?

A.B033B.B133C.B233D.B333

ANSWER:

A

Fill-in-the-blank/Short-answerQuestions

1.Ifregister0containsthepattern01101001beforeexecutingtheinstructionA003(seethelanguagedescriptiontable),whatbitpatternwillbeinregister0aftertheinstructionisexecuted?

____________

ANSWER:

00101101

2.Ifregisters5and6containthebitpatterns5Aand58respectively,whatbitpatternwillbeinregister4afterexecutingtheinstruction5456?

(Seelanguagedescriptiontable.)

____________

ANSWER:

B2

3.Ifregisters5and6containthebitpatterns5Aand58respectively,whatbitpatternwillbeinregister4afterexecutingtheinstruction6456?

(Seelanguagedescriptiontableandassumeafloating-pointformatinwhichthemostsignificantbitisthesignbit,thenextthreebitsrepresenttheexponentfieldinexcessnotation,andthelastfourbitsrepresentthemantissa.)

____________

ANSWER:

69

4.Writetheanswertoeachofthefollowinglogicproblems.

101010101010101010101010

AND11110000OR11110000XOR11110000

ANSWER:

10100000,11111010,and01011010

5.SupposeregistersEandFcontainedAAandCC,respectively.WhatbitpatternwouldbeinregisterDafterexecutingeachofthefollowinginstructions(seelanguagedescriptiontable)?

A.7DEF__________

B.8DEF__________

C.9DEF__________

ANSWER:

A.EEB.88C.66

6.Ifregisters0,1,and2containthepatternsA5,A5,andB7,respectively,whichofthefollowinginstructionswillresultinajumptolocationAA?

(Refertothelanguagedescriptiontable.)

A.B0AAB.B1AAC.B2AA

____________

ANSWER:

AandB

7.Ifregisters0and1containthepatternsB5andF0,respectively,whatwillbeinregister1afterexecutingeachofthefollowinginstructions?

(Refertothelanguagedescriptiontable.)

A.A102__________

B.4001__________

C.4010__________

ANSWER:

A.3CB.B5C.F0

8.SupposetheinstructionB1A5(asdescribedinthelanguagedescriptiontable)isstoredinmainmemoryataddressesE0andE1.Moreover,supposeregisters0and1bothcontainthepatternFF.WhatvaluewillbeintheCPU’sprogramcounterimmediatelyafterexecutingtheinstruction?

____________

ANSWER:

A5

9.SupposetheinstructionB1A5(asdescribedinthelanguagedescriptiontable)isstoredinmainmemoryataddressesE0andE1.Moreover,supposeregisters0and1containthepatternsFFand75,respectively.WhatvaluewillbeintheCPU’sprogramcounterimmediatelyafterexecutingtheinstruction?

____________

ANSWER:

E2

10.Encodeeachofthefollowingcommandsintermsofthemachinelanguagedescribedinthelanguagedescriptiontable.

A.__________LOADregister7withthevalueA5.

B.__________LOADregister7withthecontentsofthememorycellataddressA5.

C.__________ADDthecontentsofregisters5and6asthoughttheywerevaluesintwo’s

complementnotationandleavetheresultinregister4.

D.__________ORthecontentsofregisters5and6,leavingtheresultinregister4.

ANSWER:

A.27A5B.17A5C.5456(or5465)D.7456(or7465)

11.Encodeeachofthefollowingcommandsintermsofthemachinelanguagedescribedinthelanguagedescriptiontable.

A.__________ROTATEthecontentsofregister7totheright5bi

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 医药卫生 > 基础医学

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2