Popular in Course
Popular in Computer Engineering
This 3 page Class Notes was uploaded by Felton Hintz on Thursday October 29, 2015. The Class Notes belongs to CEG320 at Wright State University taught by Staff in Fall. Since its upload, it has received 21 views. For similar materials see /class/231079/ceg320-wright-state-university in Computer Engineering at Wright State University.
Reviews for ComputerOrganization
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 10/29/15
CEG 320 7 Comp Org amp Assmb lLidterm Exam Dr Doom Midterm Examination CEG 320 Computer Org amp Assembly REVIEW NAME 1 Multiple Choice 70 pts Answer ALL of the questions in this section Please select the best answer for each ofthe questions below Questions 15 use the contents of a LC3 by the table below 1 The integer equivalent for the 2 s complement value stored at memory address X0 is a 65533 b 13 c 3 d 3 e 13 f 65533 g None ofthe above 2 The character equivalent for the ASCII value stored at memory address X3 is a 0 b 8 c 48 d H e eot g None of the above 3 The mixed fraction equivalent for the IEEE oating point value stored in X2 and X3 is Recall that in a little endian machine such as the LC 3 the least significant word is held the lowest address X2 and the most signi cant word is held in the highest address X3 a 5 18 b 2 916 c 2 916 1 5 18 e A very large positive number i Avery large negative number g None of the above 4 If the contents of memory address X1 are loaded into the IR and executed as an instruction what would be the new contents of R0 a X1 b X2 c X4 1 X8 e No change 1 None of the above 5 Aprogram can be translated into the ISA of a processor by means of a a compiler b an assembler c an interpreter d All of the above e None of the above 6 The sequence of an Instruction cycle is a FETCH gt DECODE gt EVALUATE ADDRESS gt FETCH OPERANDS gt EXECUTE gt STORE RESULT b FETCH gt DECODE gt FETCH OPERANDS gt EVALUATE ADDRESS gt EXECUTE gt STORE RESULT c FETCH gt DECODE gt FETCH OPERANDS gt EXECUTE gt EVALUATE ADDRESS gt STORE RESULT d FETCH gt FETCH OPERANDS gt DECODE gt EVALUATE ADDRESS gt EXECUTE gt STORE RESULT e None of the above Page 1 of 3 CEG 320 7 Comp Org amp Assmb lIidterm Exam Dr Doom 7 Which of the following instructions can reference a memory location that is 1000 locations from the instruction a ADD b LD c STR d LEA e All of the above f None of the above 8 The addressability of LC3 memory is a 2016 locations b 16 bits c 209 locations d 2016 bits e None of the above 9 After the execution of which of the instructions below will the value in the Program Counter PC be 0X306e a i b ii c iii d i and ii e i and iii f ii and iii g i ii and iii h None of the above i 0000111001011100 at location 0X3011 ii 0000000001101110 at location 0X306d iii 1010011001101110 at location 0X306d 10 In a 16bit address space A150 if A1512 1111 were allocated to IO device registers the number of addresses assigned to memory mapped IO is a 0 b 1k c 2k d 4k e 8k 11 The instruction TRAP X23 at location X4232 causes R7 to be loaded with a X0023 b X4232 c X4233 d contents of X0023 e contents of X4232 12 If the condition codes have values N0 Z0 P1 at the beginning of the execution of the following sequence of instructions what will their values be at the end of the execution of the following sequence of LC3 instructions Assume all registers hold values of X0000 when entering this segment of code X3050 0000 0010 0000 X3051 0101 0000 0010 0000 X3052 0001 0000 0010 0001 a N0 Z0 P1 b N0 Z1 P0 c N 1 Z0 P0 d N0 Z0 130 e None of the above 13 In a CC program we encounter the integer value X previously declared with the statement int X in the conditional statement if abs2 X gt absX foo else bar Which of the following statements is most true a foo will always be called b bar will always be called c For most values of X foo will be called but bar imighti be called for one or more values of X d For most values of X bar will be called but foo imight be called for one or more values of X e foo and bar are equally likely to be called 14 In a CC program we encounter the oatingpoint value f previously declared with the statement oat X in the conditional statement if 15 15 f gt 1515 f foo else bar Which of the following statements is most true a foo will always be called b bar will always be called c For most values of f foo will be called but bar imighti be called for one or more values of f d For most values of f bar will be called but foo imight be called for one or more values of f e foo and bar are equally likely to be called Page 2 of 3 CEG 320 7 Comp Org amp Assmb Mdterm Exam Dr Doom 11 Practical Programming 1 30 pts Consider the following segment of buggy assembly code The intent of this program is to add together two number 2 and 3 and then to display the result to the display The program has several errors ORIG x3000 AND R0R0 0 AND R2R2 0 ADD R2R2 2 JSR SUB LD R7 ASCII ADD R2R2 R7 ADD R0R20 TRAP x21 TRAP OUT DISPLAY lt R0 TRAP x25 TRAP HALT SUB ADD R2R23 ADD R7R71 T ASCII FILL X0030 a 10 Provide the symbol table for this segment of code b 10 What does this program iactuallyf do as written Be speci c What will be the factuali output behavior of this code segment when run How does that result come about c 10 Rewrite the assembly code to x the bugs Page 3 of 3
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'