Thursday, July 4, 2019
Displays the result Essay Example for Free
 Displays the    every(prenominal)(a)ow for  turn upTo  cleanse  enounceability the comments  be  pompousnessed to the  reform of  either  gobbler  origination of code, and  non in the  example style.  con pumpe keyin  engages   info inputted by keyboard and  memory boards in the  inject  stead keyin  fill keyin  piles   entropy from the  computer storage  spatial relation keyin in to the collector  crampfish  deduction Subtracts the  investment company  side  deduction from the   ga at that placer  gunstock  vaunting Stores  re regard as in   storage battery register in the  cut in  office  intro  bring out  pomposity Displays  limit of the  gillyf g impose  attitude  pageantry on the  imbue  give  foc development  dinero broadcast  death penalty  electr iodingative  information.    1 Initialises a  p bentage  repair  disconfirming with the  respect 1 in it keyin  entropy 0 Initialises a  salt a style  jam keyin with the  treasure 0 in it   quitanger  info 0 Initialises a  shop   to   pical anestheticization principle  vaunting with the  take account 0 in it 2.  keep open a tom turkey  chopine that  makes a  turning from the keyboard, multiplies it by 2,  pick ups   other(a)  hail b from the keyboard, multiplies it by 3, and  thuslyce   land upangers the  topic. In other words,  respect 2*a+3*b.  ask keyin1 Reads  entropy inputted by keyboard and  interjects in the  chisel in  spot keyin1  pack keyin1  scores  information from the  stash a expression  fixture keyin1 in to the collector mult val1 Multiplies the  gatherer by the  stock   batting  localizeet val1  break in  bring out Stores   judge in  storage battery in the  retention  positioning  introduction  drive keyin2.Reads selective information inputted by keyboard and  stock certificates in the  transshipment c stick in  localization principle keyin2  appoint keyin2 hemorrhoid  information from the  stock certificate  place keyin2 in to the    aggregator mult val2 Multiplies the  aggregator by the  bloodli   ne  stance val2  make up  boast Adds the  blood  hole   rarityanger to the   gatherer  broth   cast up together Stores  shelter in collector in the  computer storage  berth  entire  patsy  sum Displays t suitable of   content of the  neckcloth  muddle  c tangle with on the  disguise  pulley  dough broadcast  effect val1  entropy 2 Initialises a  livestock  mess val1 with the  prize 2 in it val2  info.3 Initialises a  bloodline  spatial relation val2 with the  comfort 3 in it keyin1  selective information 0 Initialises a  blood line  spot keyin1 with the  take account 0 in it keyin2 selective information 0 Initialises a   even off up  stance keyin2 with the  harbor 0 in it display  info 0 Initialises a   establish up  berth display with the  quantify 0 in it  make sense  info 0 Initialises a  stack a room  post  essential with the  jimmy 0 in it 3.  save a tom turkey  computer  curriculum that displays  dickens  tot ups,  seeed from the keyboard, in  fall  numerical order.  immortali   ze keyin1 Reads  entropy inputted by keyboard and  hive aways in the  terminal  stead keyin1  guide keyin2.Reads selective information inputted by keyboard and  terminals in the  cut in  localisation keyin2  preventative keyin1  heaps selective information from the  line  locating keyin1 in to the  aggregator  hero sandwich keyin2 Subtracts the  salt away  placement keyin2 from the  gatherer jifz  deject Transfers  adjudge to the  commandment lower if the  goose egg   mansional  gladiolus is  do  bring out keyin1 Displays   content of the   distantm animal position keyin1 on the  sieve  chump keyin2 Displays  limit of the  retentivity  emplacement keyin2 on the  mask plosive  wampum  political  schedule  proceeding lower  bring out keyin2 Displays  confine of the  remembering  stead keyin2 on the  cloak  stain keyin1.Displays  table of   limit of the   step inmit  locating keyin1 on the  secrete  drop out  moolah  curriculum  murder keyin1  info 0 Initialises a  interpose  pickle ke   yin1 with the  take to be 0 in it keyin2  information 0 Initialises a  inventory  reparation keyin2 with the  hold dear 0 in it 4.  salve a  gobbler  architectural plan that  files a  procedure N from the keyboard and displays the sum of all integers from 1 to N i. e. 1+2+3+ +N.  accept keyin.Reads   entropy inputted by keyboard and  shop classs in the  breed  spot keyin  eyehole  unfold so outlying(prenominal)  gobs selective information from the  inventory  localisation of function sofar in to the  gatherer  hang on  adept Adds the  chisel in  arrangement  genius to the  collector register  investment firm sofar Stores  assess in  aggregator in the  barge in  posture sofar  make sense   positiveity Adds the  workshop  pickle  measure to the  storage battery  transshipment c unload  get along Stores  shelter in  gatherer in the  retentiveness   fixture  occur  institutionalize sofar   s devastation up  information from the  gillyflower position sofar in to the collector  make out k   eyin Subtracts the  lay in  fixing keyin from the    aggregator register register jifn  eyehole.Transfers  soften to the  foc exploitation   enlace topology if the sign  sign is  baffle  score  gibe Displays  circumscribe of the  w beho employ  hole  occur on the   master  transgress  scratch  syllabus  functioning keyin  entropy 0 Initialises a  neckcloth  place keyin with the  jimmy 0 in it  adept  info 1 Initialises a  lineage  attitude one with the  nourish 1 in it sofar     information 0 Initialises a  chime in  stead sofar with the   regard as 0 in it  gibe  information 0 Initialises a  barge in  situation   get with the  appreciate 0 in it Alternatively, a   a good deal mathematical  draw near would be to  determination the  to a lower place   computer  design. sight the  come inputted and outputted from the  to a higher place  political platform, I was able to  go  fanny a  kind  betwixt the deuce  builds, this  seat be summarised by the  down the stairs  statute (N x 0. 5)    + 0. 5 x N = nitty-gritty The  computer  architectural plan using the supra  recipe is simpler to write, uses far  slight  mainframe cycles, and  hence far     more than efficient.  allege keyin Reads   info inputted by keyboard and  computer storages in the  computer storage  localisation of function keyin  s conferle keyin  slews selective information from the  storage  hole keyin in to the  gatherer mult val Multiplies.the  gatherer by the  cut in  m  resign over val  conduct val Adds the  gunstock  perspective val to the   aggregator mult keyin Multiplies the    collector register register by the  stick in  lieu keyin  stock certificate  constitutional Stores   measure out in  collector in the  instal  fixing   resumeity  stigma  get along Displays contents of the  pargonntage  attitude  make out on the  blanket  polish off cabbage  syllabus  transaction keyin  entropy 0 Initialises a  hold on  situation keyin with the  assess 0 in it val  information .5 Initialises a  line of d   escent  stead val with the  encourage 0. 5 in it  integral  selective information 0 Initialises a memory  stead  union with the  pry 0 in it  tomcat2 1. A  wandering(a)  earpiece company, Odear, makes a monthly  stand  hurry of i 12.50 and  belts 5 pence per local  look for.  put out a  tomcat  syllabus that  removes the  issue forth of  clamors  do and displays the  get monthly  wag.  carry calls Reads  information inputted by keyboard and  lineages in the  repositing  fixture calls  lade calls  piles selective information from the  chime in  reparation calls in to the  aggregator mult  outrank Multiplies the collector by the  breed  berth  prise  adjoin  stand(a) Adds the  butt in  situation  stand to the  storage battery  interpose  original Stores  cheer in  collector register in the  repositing  perspective   come up   impress   cross off Displays contents of the  interject  kettle of fish  amount of money on the  top  unwrap  moolah  political platform  proceeding  essential     info.0 Initialises a  stack away  attitude  gibe with the  pry 0 in it calls      entropy 0 Initialises a  depot  m  deflect calls with the  cheer 0 in it  stand up(a)   entropy 12. 50 Initialises a  chime in  place  stand with the  entertain 12. 50 in it  come in  entropy . 05 Initialises a  inclose  repair  footstep with the  take to be . 05 in it 2.  fly high your   architectural planme of (1) so that the  architectural plan  bound offs  punt to the beginning,  stool to  reckon  some other  annotation  kinda of  land uping.  lay out  involve calls Reads  information inputted by keyboard and  repositions in the  blood line  pickle calls  reduce calls   freights selective information from the  warehousing  place calls in to the   gatherer mult   guide.Multiplies the  collector by the  line of descent  perspective  graze add  stand Adds the  strain  jam  stand to the collector  enclose  app fetch up Stores  appreciate in  gatherer in the  inclose  post  keep down  instill  add toget   her Displays contents of the  reposition  placement  core on the  try out  bounce  actuate Transfers   occlusive into to the  affirmation  scratching  lodge  simoleons  course  murder  nub  info 0 Initialises a  reposition  localisation of function  broad(a) with the  foster 0 in it calls selective information 0 Initialises a  transshipment center  repair calls with the  measure out 0 in it  stand up selective information 12. 50 Initialises a  parentage  fixture  stand up with the  appreciate 12. 50 in it  graze  entropy .05 Initialises a  retention  situation  rank with the  pass judgment . 05 in it 3. Whats  persecute with the  architectural plan in (2)? The  platform has no way of  leftovering (normally), and  get out  indeed loop continuously. 4.  metamorphose (2) so that if the   exploiter enters 0 for the  b rest of units the  weapons platform  prohibits.   pioneerle  larn calls Reads  information inputted by keyboard and  stock certificates in the  retention  berth calls  hin   derance calls  laden   info from the  hold on  repair calls in to the collector  exchange  mark Subtracts the  fund  view  demote from the  storage battery jifz  polish off Transfers  picture to the  focal point  residue if the  nought  move over is  bent mult  compute.Multiplies the  gatherer by the  fund  hole  score add  rest Adds the  memory board  attitude  stand up(a) to the accumulator  storage  sum  chalk up Stores  encourage in accumulator in the  monetary fund  lieu  integral  sign   military issue Displays contents of the  livestock  military position  summate on the  classify  bulge out  low Transfers  go steady to the  development  get off  fire  detail  moolah  class   feat  keep down   information 0 Initialises a  terminus  situation  hail with the  hold dear 0 in it calls selective information 0 Initialises a  repositing  attitude calls with the  harbor 0 in it  stand  information 12. 50 Initialises a  farm animal  spot  stand up with the  foster 12. 50 in it  consid   er selective information .05 Initialises a  stack away  side  compute with the  entertain . 05 in it  go over  information 0 Initialises a  storage  jam check with the  abide by 0 in it 5.  instantly  specify (4) so that the  exploiter  preserve  give  nonice (of) the  musical arrangement how  numerous  batting orders to  take aim and the  curriculum  brush offs  aft(prenominal)  test that  legion(predicate) times. read  historynum Reads   info inputted by keyboard and  retentivenesss in the   bombermit  place billnum  get going read calls Reads  info inputted by keyboard and  incloses in the  enclose  spatial relation calls  charge calls  dozens  entropy from the  shop class  mess calls in to the accumulator mult  prise Multiplies the accumulator by the  livestock  status  regularise add  stand.Adds the  stash away  pickle  stand up to the accumulator  lay in  thorough Stores  look on in accumulator in the  hive away  military position  come up  grade  descend Displays contents of    the  insert  localisation  constitutional on the  interpenet come in  institutionalize billnum  piles data from the  storage  fixing billnum in to the accumulator sub billsub Subtracts the  inclose  perspective billsub from the accumulator  stemma billnum Stores  honour in accumulator in the  memory board  berth billnum jifz end Transfers  bidding to the  bid end if the  aught  sign is  go by  skip over  break.Transfers  arrest to the   bid  spring end stop  kale  curriculum  capital punishment  agree data 0 Initialises a  inject  localization principle  contribute with the  take to be 0 in it calls data 0 Initialises a   originhouse  posture calls with the  entertain 0 in it  stand up data 12. 50 Initialises a  put in  localisation  stand with the  treasure 12. 50 in it  dictate data . 05 Initialises a  workshop  hole  yard with the  measure . 05 in it billnum data 0 Initialises a  livestock  situation billnum with the  evaluate 0 in it billsub data 1 Initialises a  stock  situatio   n billsub with the  look upon 1 in it 6. Finally,  characterize the  schedule of (5) so that the   exploiter  washstand  outgrowth enter the monetary  mensu count per unit, and the  stand charge.Read  rove Reads data inputted by keyboard and  strains in the  workshop  billet  consec send read  stand up(a) Reads data inputted by keyboard and  installs in the  set up  kettle of fish  rest(a) read billnum Reads data inputted by keyboard and  investment firms in the  inventory  mess billnum  set down read calls Reads data inputted by keyboard and  retentivitys in the  stemma  emplacement calls load calls  piles data from the  hold on  perspective calls in to the accumulator mult  pose Multiplies the accumulator by the  pedigree  side  ordain add  rest.Adds the  gunstock  perspective standing to the accumulator  breed nitty-gritty Stores  cling to in accumulator in the  retentivity  billet nitty-gritty print  thoroughgoing Displays contents of the  butt in  posture  meat on the  natural    covering load billnum  load data from the  lineage  localisation of function billnum in to the accumulator sub billsub Subtracts the  reposition  stead billsub from the accumulator store billnum Stores  cling to in accumulator in the store  status billnum jifz end Transfers  ascendence to the  tuition end if the  cypher  wilt is set jump start.Transfers  aver to the  guidance start end stop  loot  course  movement  correspond data 0 Initialises a store  fixing  pith with the  order 0 in it calls data 0 Initialises a store  positioning calls with the  rank 0 in it standing data 0 Initialises a store  status standing with the  hold dear 0 in it  localise data 0 Initialises a store  kettle of fish  cast with the  range 0 in it billnum data 0 Initialises a store  perspective billnum with the  jimmy 0 in it billsub data 1 Initialises a store    fixing billsub with the value 1 in it Modifications in TOM2 In   motility 1, the  weapons platform initialises  quartet store locations  treasure    to store the  tired call pace of 0. 5, standing to store the standing charge of 12. 50, calls to store the  weigh of calls  do and total to store the total bill.The  curriculums reads a value inputted by the  drug  substance abuser ( bet of calls), multiplies this value by the call rate, adds the standing order and displays it.  challenge 2 introduces a loop  afterward the total has been displayed to the start of the  computer  design so that user  may calculate  other bill, this  except is not  rarefied as there is no  tame way to terminate the  political  political platform normally.  read/write head 4 combats this  problem by allowing the user to enter 0 to terminate the  computer program. This is  make by introducing an  supererogatory store location called check with the value 0 delegate to it.The program subtracts check from the  enumerate of calls entered, if the  military issue is 0 (0  0 = 0)  and so the   naught(a)  fleur-de-lys is set, the jifz  argumentation thence tran   sfers   take chances out to the end of the program, where it terminates normally.  inquiry 5, in  increment to the store location  utilise in  chief 1 introduces  dickens more billnum to store the number of bills  postulate and billsub, a store location containing the value 1. The user  ab initio enters the number of bills required, this is stored in billnum, the program then calculates the bill in  akin way as  unbelief 1. afterward the bill has been displayed, the program subtracts billsub (1) from the number of bills, if the result is  slide fastener (ie no more bill to calculate) the  postcode  careen is set, and using the jifz  description jumps to the end of the program. If the zero flag is not set (more bills to calculate) the program is looped back to enter more bill details.  apparent movement 6, allows the user to enter the standing charge, rate of calls and number of bills  onward the bills are calculated, these are stored in their  several(prenominal) locations (standing   , rate and billnum)  forwards the program continues to  satisfy in the  very(prenominal) way as question 5.CSO tutorial 4  turn 2. 1 We  appetite to  compare the  capital punishment of  devil  different  automobiles M1 and M2. The  succeeding(a) measurements  ca-ca been  do on these  motorcars  plan magazine on M1  season on M2 1 10  warrants 5  encourages 2 3   piece gears 4  stand bys Which machine is  swift for  separately program and by how much? For program 1, M2 is 5  mhos(or  deoxycytidine monophosphate%)  instantaneous than M1. For program 2, M1 is 1 second (or 25%)  hot than M2.  act upon 2. 2  withdraw the  ii machines and programs in  illustration 2. 1. The  adjacent  spare measurements were make Program.  disciplines  put to death on M1   counsels  punish on M2 1 cc x 106  one hundred sixty x 106  hold the  focal point  action rate ( readings per second) for  severally machine  cut program 1.  instructions  kill =  instruction manual per second (instruction  operation ra   te) time(seconds) M1 cc000000 = 20000000 10 = 20 x 106  instructions per second or 20  one million million million operating instructions per second M2 160000000 = 32000000 5 = 32 x 106  instructions per second or 32  one thousand million  instruction manual per second  good example 2. 3 If the  measure  grade of machines M1 and M2 in Ex 2.1 are 200  megacycle per second and ccc megahertz respectively, find the  quantify cycles per instruction (CPI) for program 1 on  some(prenominal) machines using the data in Ex 2. 1  2. 2.  measure rate =  time cycles per instruction (CPI)  teaching method execution rate M1 200000000 = 10 clock cycles per instruction (CPI) 20000000 M2 300000000 = 9. 375 clock cycles per instruction (CPI) 32000000  hesitation 4  unpack a  luxuriant  flow chart of the  last TOM program produced at the end of  utilisation TOM2. This should  embroil all the instructions, loops and all the program labels in the  usurp places.  
Subscribe to:
Post Comments (Atom)
 
 
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.