Docsity

Practice Quiz 1 - Computer Organization | COMP 411, Quizzes of Computer Architecture and Organization

Partial preview of the text

Download Practice Quiz 1 - Computer Organization | COMP 411 and more Quizzes Computer Architecture and Organization in PDF only on Docsity!

Quiz 1 Warm Up

  • Format^ – Multiple choice– 25-30 questions– Open Book– Open Notes– No computers– No calculators

Sample Question

In a certain state automotive tags are assigned a uniqueID composed of eight characters as follows: the firstthree characters are letters (A-Z), followed by a dash (-),and 4 decimal digits (0-9).Q1) How many bits of information are in a tag asdescribed above?(A)^

8 × 8

(B)^

(^3) log(26 2

(C)^

3×5 + 1 + 4×

(D)^

log(256^2

8 3 /(26^10

(E)^

none of the above

Sample Question

Q3) What hexadecimal number is equivalent to-33 in an 8-bit 2’s complement representation?^ (A) 0x21(B) 0xA1(C) 0xDE(D) 0xDF(E) none of the above

  • Sample Question #
    • Q4) What is the most negative numberrepresentable in a 12-bit 2’s complementbinary number? (A) -1024(B) -2047(C) -2048(D) -4095(E) -

Sample Question

Q6) Which of the following statements bestdescribes the use of the

rt^ field by the MIPs

sw^ instruction. (A) The contents of the rt register are added to the signed16-bit constant and used as a memory address(B) The contents of the rt register are added to 4 times thesigned 16-bit immediate field and used as a memoryaddress(C) The contents of rt are stored into memory(D) The contents of the memory location with the addresspointed to by rt are stored in memory(E) The 5-bit value encoded in the rt field is stored inmemory

Sample Question

Consider the following 5 MIPS instructions:A:^

lui^ $t1, B:^

la^ $t0,4096($t1) C:^

lw^ $t0,4096($t1) D:^

addi^ $t0,$t1, E:^

sw^ $t0,4096($t0) Q7)^ When executed in sequence, at what memory address (inhexadecimal) will the contents of $t0 be stored by theinstruction labeled E?^ (A) 0x00001000(B) 0x10001000(C) 0x10002000(D) 0x40964096(E) The address cannot be determined from the instruction sequence alone

Sample Question

Consider the following 5 MIPS instructions:A:^

lui^ $t1, B:^

la^ $t0,4096($t1) C:^

lw^ $t0,4096($t1) D:^

addi^ $t0,$t1, E:^

sw^ $t0,4096($t0) Q9) Which maximal set of instructions could be removed fromthe given sequence and have no effect on the results of theinstruction labeled E?^ (A)^ The instructions labeled A and B(B)^ The instructions labeled B and C(C)^ The instructions labeled B, C, and D(D)^ The instructions labeled A, B, C, and D(E)^ None can be removed.

Sample Question

Consider the following “C” languagecode fragment:^ if (a == 0) {a = 1;} else {a = 0;} Q10)^ Which of the following MIPSinstruction sequences performs thesame operation as the given codefragment? (A)^ lw^

$t0,abne $t0,$0,L1addi $t0,$0,1b L2L1: add $t0,$0,$0L2: sw $t0,a

(B)^ lw^

$t0,abeq $t0,$0,L1sw $0,ab L L1:^ addi^

$t0,$0,1sw $t0,a L2: (C)^ lw^

$t0,asltiu $t0,$t0,1sw $t0,a (D)^ lw

$t0,aaddi^ $t1,$0,1beq^ $t0,$0,L1addi^ $t1,$0,0L1: sw $t1,a (E)^ All of the above