exam2_sol - Department of Electrical and Computer...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Department of Electrical and Computer Engineering The Unjiremit}r of Texas at Austin EE 3051 REM, 2cm Yale Putt, Instructor This: Amen: Bat-1113.1 Cameron Damn, Lisa. (in: la. Fuente, Phillip Duran, Jose Joan, Jaaween Kaur, Rustaqn Miftakhutdinov, Venn Nani-semen, Nady Obaid, Poorna. Saith Exam 2, Number 15, 2906 Saimiian Problem 1 [15 poinifijii Problem 2 [li] WHEEL Problem 3 [15 pointSIIII—E Problem 4 {20 Whitehi Problem 5 [2D Nutshfl Problem 5 [20 points}: Torte] [100 points]: “3 0 Note: Please be sure that your mm to all questions [and all supporting work that is are contained in the space provided. Note: Phase be sure your time is written. legibe on each sheet of the exam I will nut cheat on this exam. W Sigpnture GOOD LUCK! semen Problem 1 [15 points} Name: Part a [.5 points): An Ammth Language program contains the instruction mu R1. H2, #25. What will the Assembler produce as a result? An error massage, staffing that #315- caene'l‘ he. FfoEjea'l'E 1'11 5 hills. Part 1:: [5 points}: A]: Lil-3 machine language program contains the instmction: DUUDllllllll‘lll‘l The PC oontains the address of this instruction. What will the L03 computer do? Be cat-em. This question will require a little thought. The answer “The computer will execute the above instruction" Will earn zero points. I: I..: "61" his {ashore-Len brandefi HflWflJ-I‘ltlfiflfllly for that? so Hug mmrwm will be. stud“; in our": a'mcx‘m'i-t leaf) eyegeeh‘ag this ins l—rwvr‘ln'on . Part c [5 points}: The HG-l [Huroongous Computer} has N difl'erent opcodes, 101} registers... and supports operate instructions just like the LIZ—3. It also allows immediate operands in the ‘style” of the L03, expressing values between -512 and +511. What is the maximum value for N if an histruefion is 4 bytes long? Please show your work. £00690 Um) ‘? 31-7-7- 1~10 = 7 a = ll? \ 5k— erin bli'l” , "a a 3 1'3“? Sblmjrfom Problem 2 {11} points] Name: The following program is mmhled and loaded into the L03 simulator. Before mutton. a hreakpoint is set at the TRAP x25 instruction. The run button is premed. What is the value of R1 when the breakpoint isrmnhed? .DRIG flflflfl ID no, A AND 31. n1. #0 an R1. an. #3 mo n1. n1. #5 -—— +uruu. fwd-a N0? TRAP 125 A. . FILL x3000 . HID- NW Sabine Problem 3 {15 points} The figure below shows some of the digital logic associated with an impimnentatiun of the LID-3 camputer. 15141312111093T5543210 Part a [3 points}: What information is provided by the signal labeled 1': in the diagrmn [in ten words or fEW'EI1 please}? I“ newer- Oeierminfls FF 'H'xEL {Insirhc‘i'ten Us a. beet-min. Part I: {3 points): What infermtion is provided by the sigma-1 labeled Y in the diagram [in ten words or fe‘iiil'el'1 please}? Note that this signal depends on both. the output of the AND gate and tile output of the combinationel logic block. Deiiumfnee ti: 'HxEr Era-mark i39- ‘i‘Qttnt Part I: [3 points}: Identify the three inputs labeled A, 131 and C in the space provided. Part d {fl points}: Dfiign the eembinetienei logic [inside the hie-ck shown} that is nee-366m fer the signal Y to act 3.5 required by the L03. Hm Sela Han Problem 4 {20 points) Part a {5 points}: Generate the symbol table for the progrmn belcrw. You may not need all of the spaces provided. .DRIG 13000 353 I. BE END A Ll} ED, LF TRAP 3:21 LEA 1w, EEEUE TRAP 122 LEA RD, HIE 'I'ELAP :22 ADD 3?, HT. 3—1 BET Elm Tm :25 £13,305 .STRIHGZ 'EESGE IS" ARE .STRIHGZ " .WESEIHEF“ BUFFER .ELKH 3 LF .FILL 19A .END Part I: [15 pointa}: 1fi-Thvsut. does this program output? Be specific. A1501 be care-ml. E43309 335 4w550mel Awfisomfi[ AwfisamEi .. . GnCeJLaly Wi‘fuis WESEME'.) Name: St» alien Problem 5 [EU palms} In Problem set 5, you were asked to write the subroutine BIHJET which inputs 3. binary number entered from the keyboard and stores the zero extended value into RE. The program helew calls the subroutine HDDjIIIUIET which in addition to storing the zero extended value in ED, also stores the total number of bits entered into R1. For example. if the user types lflfllfl, Rf! would contain flmflflflflflfltflflflfllfl, and R1 would contain the value 5. Assutne the user types from 1 to 16 binary dig-its. After calling the HflDJtIl'lfiET subroutine1 the progrun helottr Sign extends the value that the use: entered from the keyboard and stores the rfiult in HE. However, a few.T instructions have been left out. Your job: eomplete the program. Note. Each box corresponds to 1 missing instruction. .DRIG :3000 HUDJSIHJG'E'I' ADD R2, R2, #1 ; 112 = DDDUUUUUDDWDDI NUT R3, R2 : R3 = 111111111111111'EII 10D? .‘LDD R1, R1, #-1 BR: DUNE ten 32, e2 5.2 At} KB, R3 £3 Bflnzp LunP nun: Awe REL R0 RA :1' SKIP ADD RID, H13. R3 SKIP HALT .EIIIE) Nam Se? [Mi—[loo Problem 5 [ED points} A program executing on the LC—3 computer encounters a. breelcpohlt set 3.1: address x35m1 and halts. The computer operator does not change the state of the computer in W my: but immediateh' pm the run button to rm exemtion The table below shows the contents of MAR anti MDR for the first six teemazrrf,r names that the L133 performs after resuming execution. Your job: Fill in the missing entries. ...
View Full Document

Page1 / 7

exam2_sol - Department of Electrical and Computer...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online