早教吧 育儿知识 作业答案 考试题库 百科 知识分享

计算机概论作业1、UsingthemachinelanguagedescribedinAppendixC,writeprogramtoperform2+3andstorestheprograminthefollowingmemorycells:AddressCellsA020A102A2A3A4A5A62、Summarizethedifferenceofthefollowingconce

题目详情
计算机概论作业
1、Using the machine language described in Appendix C,write program to perform 2+3 and stores the program in the following memory cells:
Address Cells
A0 20
A1 02
A2
A3
A4
A5
A6
2、Summarize the difference of the following concepts:
(1) a program
(2) a process
(3) a routine
3、The problem about the towers of Hanoi:
(1) 3 pegs:A,B,C;
(2) N rings are stacked in order of descending diameter from bottom to top on peg A
(3) Write a algorithm in pseudocode:to move all rings from A to C,but move only one ring at a time,and a smaller ring must be placed on top of a bigger one.
Also reference problem 40 on page 246.
4、Write two different algorithms to reverse an array a[m],and Compare the difference of :
nTime required
nSpace required
还有实验报告啊,怎样写?要写什麽内容?
▼优质解答
答案和解析
Address Cells
A0 20
A1 02
A2 21
A3 03
A4 53
A5 01
A6 C0
A7 00
A program is a static set of directions.
A progress is a dynamic activity whose properties change as time progresses.
A routine can perform fundamental input/output activities such as receiving information from the keyboard,displaying messages on the computer screen,and reading data from mass storage.
procedure Hanoi
//3 pegs:A,B,C;
//N rings are stacked in order of descending diameter from bottom to top on peg A
if(the ring=1)
then(put the ring from A to C)
else
(move the n-1 ring from a to c to b ; move the n=1 ring from b to a to c)
第4个我还没有做呢!那么拜托多给一点分啦!
实验报告是选作内容,请尽量不要写
看了计算机概论作业1、Usingt...的网友还看了以下: