No partial marks for some digits being correct nlo

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: is not exact +/- 1 is OK -5 if the answer is not of the form CONSTANT - N Do w Do Do wn lo Dow 4. [10] Instruction Semantics: Please write the sequence of instructions that will execute given that execution starts at label KOKO below (instruction A). List instructions as A, B, and C as indicated to the left of each instruction in parentheses. We already listed the first execution of A for you. : ID st Te (A) (B) (C) KOKO: LALA: Oxdia @ http://www.oxdia.com Sequence of Test ID: 3252 CALL LALA CALL KOKO RET executed instructions: This test is copyrighted by the uploader and/or course instructor. Downloader id is shown and also encrypted throughout the document. Unauthorized reproduction/distribution is strictly prohibited. Solution (if any) is NOT audited, so use at your discretion. 52 32 1 1169 Test ID: 3252 Down load er ID: Do wn lo ad er ID : 11 69 1 Last Name (in case pages get detached):__________________ Down load er ID: 1169 1 Test ID: 3252 ID: 3252 Page 5 of 11 52 32 : ID Test st Te Do wn lo ad er ID : 11 69 1 A, _C, _B, _A, _C, _B, _A, _C, _B, _A, _C, _B, _A, _C, _B, _A, Do wn lo ad er ID : 11 69 1 ID Te : 32 52 st 11691 ader ID: Downlo -2 if the second instruction is not C -2 if the third instruction is not B -8 if eventually they do not show the repeated sequence A, C, B 52 32 : ID st Te Dow nlo ade r ID: Tes Tes t ID: 325 2 116 91 t ID: 325 2 ID : 32 52 This scheme allows for slightly “shifted” execution sequences. Do wn lo ad er : 11 69 1 32 52 ID st ID : 32 Do wn lo ad e r ID : 11 52 69 1 Te st Te st ID : Test ID: 3252 Tes t ID: 325 ade r ID: 116 91 2 52 Dow nlo Dow nlo ID : 32 Test ID: 3252 ade r ID: 116 r ID: ade nlo Dow 91 Te st st ID 32 52 Do : 11 Te 69 1 : lo wn er ID ad : ID r 1 69 11 Te st de ID : 32 Do w nl oa 52 3252 Test ID: Test ID: 3252 2 325 Tes t ID: Downloader ID: 11691 Te Test ID: 3252 st ID : 52 32 Oxdia @ http://www.oxdia.com This test is copyrighted by the uploader and/or course instructor. Downloader id is shown and also encrypted throughout the document. Unauthorized reproduction/distribution is strictly prohibited. Solution (if any) is NOT audited, so use at your discretion. 116 91 Test ID: 3252 Page 6 of 11 Last Name (in case pages get detached):__________________ 5. [10] Basic C and Assembly: Given the following assembly sequence: BEQ BLT BEQ R9, R10, KOKO R9, R10, KOKO R0, R0, LALA 52 ID st Te Down load KOKO: ADDI R9, R9, 1 ADD R9, R9, R10 Test ID: 3252 LALA: SUB R9, R9, R10 32 52 Which C statement does it implement? Circle the appropriate sequence below. Finding what registers a and b correspond to is part of the question. Do wn lo Do wn lo ad er ID : ID ad er : 11 69 1 ID : 11 69 1 if (a <= b) a = a + 1; else a = a – b; (b) if (a > b) a = a + 1; else a = a – b; wn lo ad er ID : st 32 11 lo Do Te ID : ad e r ID : 11 69 1 st (a) 69 1 Dow wn 52 ade r ID: 91 116 Do nlo if (a >= b) a = a + 1; else a = a – b; (d) if (a <= b) a = a + b + 1; else a = a – b; st (f) (g) Te st ID : 32 52 if (a >= b) a = a + b + 1; else a = a – b; None of the above. -10 if the answer is (c), (e), (f) or (g) -8 if the answer is (b) -9 if the answer is (d) Oxdia @ http://www.oxdia.com This test is cop...
View Full Document

Ask a homework question - tutors are online