Oxdiacom this test is copyrighted by the uploader

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: t your discretion. ID: 3252 32 52 nlo ade r ID: 116 91 Page 3 of 11 Last Name (in case pages get detached):__________________ 1. [20] Basic Instruction Semantics: Assume the following initial state for ad er ID : 11 69 1 Downloader ID: 11691 lo 0x12345678 0xFAFB12AE 0x01000100 0xFFFFFFFE 0xFFFFFFFF wn = = = = = Do R8 R9 R10 R11 R12 Test ID: 3252 registers: 1 69 : er ad 11 ID lo wn Do In the following lists of instructions, determine what is the outcome of the instruction and write in hexadecimal using all eight digits (that is write 0x00000000 and not 0x0). In all cases find the outcome of each instruction given that it executes with the initial state given above. 1 69 : ID 11 er ad lo wn Do R2 = _____0x01000102_____ b. ADD R2, R9, R12 R2 = _____0xFAFB12AD______ 69 1 a. ADDI R2, R10, 2 Test 11 r ID : R2 = _____0xFAFB12AC______ R2 = _____0x13345778________ lo ad e d. OR R2, R8, R10 Dow nlo ade r ID: 1 69 : 116 11 91 ID wn er ad lo wn Do e. ORHI R2, R8, 0xFFFF R2 = _____0xFFFF5678________ Do 52 32 : ID Test ID: st 3252 Te R2 = _____0x12340000________ g. ANDI R2, R11, 0x1111 R2 = _____0x00001110________ 52 f. XORI R2, R8, 0x5678 Tes t ID: 325 : 32 2 ID Tes t ID: 325 2 Te st ID : 32 : 11 69 R2 = _____0x90000000________ R2 = _____0x00000012________ j. ADDI R2, R0, 0x8000 R2 = _____0xFFFF8000________ nl oa Do w ID: 11691 de r ID i. ADDI R2, R0, 0x0012 Downloader 1 52 h. MOVIA R2, 0x90000000 st ID: 3252 c. ADD R2, R9, R11 Te st ID : 32 52 Downloader ID: 11691 -2 for each incorrect answer Max -2 per point. No partial marks for some digits being correct. Test ID: 3252 91 116 r ID: ade nlo Dow Oxdia @ http://www.oxdia.com Test ID: 3252 This test is copyrighted by the uploader and/or course instructor. Test ID: 3252 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. Page 4 of 11 Last Name (in case pages get detached):__________________ : 1 69 11 ID er lo ad wn Do 52 32 : ID st Te 2. [10] Memory Operations: Assume the following initial state: t ID: 325 2 Tes 52 : st Te ID 32 Dow nlo ade r ID: 116 91 R8 = 0x01000100 R9 = 0x897601FE What is the value of R2 when each of the following instruction sequences executes for little- and big-endian machines? Downloader ID: 11691 Little-Endian 0x897601FE Down load er ID: 32 52 Test ID: lo 11 ad Do 1 69 11 69 1 52 0x000001FE 0xFFFF8976 0x00000001 : ID er ad lo wn Do 11 32 0x000001FE 1 69 : ID er wn 0xFFFFFFFE 0x00000001 0x000000FE ID : ID: 3252 0xFFFF8976 Te st ID st Test 3252 Big-Endian 0x897601FE : ID : 1169 1 STW R9, 0(R8) LDW R2, 0(R8) STW R9, 0(R8) LDH R2, 2(R8) STW R9, 0(R8) LDH R2, 0(R8) STH R9, 0(R8) LDB R2, 1(R8) STH R9, 0(R8) LDBU R2, 1(R8) Download st ID : 32 er ID: 11691 52 ad e r Te -1 for each incorrect answer Max -1 per point. No partial marks for some digits being correct. nlo ade r ID: 116 91 wn lo ad er Te ID : st ID 1 : 32 52 52 11 69 32 3. [10] Instruction Semantics: if, initially, R8 = N, where N is a positive integer, 52 : 32 ID st Te 1 1169 ID er ID: st load Down : how many times does the following loop iterate? 1 ADDI R8, R8, 1 BGT R8, R0, KOKO 69 KOKO: ID : 11 Te Dow nlo ade r ID: 116 91 ID: 3252 st Te : ID nl oa de r Test Number of Iterations = _0x7FFFFFFF - N _ 52 32 -5 if the answer...
View Full Document

This document was uploaded on 01/28/2014.

Ask a homework question - tutors are online