Quiz4_sol - write it as 00101 and not 101 Address Opcode Operands/result 0x004c0008 100000 01011 01111 0000000000000000 0x004c000c 000000 01001

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

View Full Document Right Arrow Icon
CDA3101 Quiz 4 Last Name ____________________ Time: 15 minutes                                                      First Name ____________________ No calculators are allowed . 1. Consider the following MIPS assembly code.  loop: lb $t7, 0($t3) add $t1, $t1, $t7 addi $t0, $t1, 12 bne $t0, $t6, loop addi $t3, $t3, 8 j loop  Complete the following table which contains the machine code (binary equivalent) for  the above MIPS assembly language code. Assuming that the address of the first instruction is 0x004c0008 represent the  addresses in hexadecimal notation Represent all other values in binary Specify all bits      in a field. e.g. if a field is 5 bit long and the value in it is decimal 5, 
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: write it as 00101 and not 101. Address Opcode Operands/result 0x004c0008 100000 01011 01111 0000000000000000 0x004c000c 000000 01001 01111 01001 00000 100000 0x004c0010 001000 01001 01000 0000 0000 0000 1100 0x004c0014 000101 01000 01110 1111 1111 1111 1100 0x004c0018 001000 01011 01011 0000 0000 0000 1000 0x004c001c 000010 0000 0100 1100 0000 0000 0000 10 $t0 = $8, $t1=$9, $t3=$11, $t6=$14, $t7=$15. R-format Instruction: 31-26 25-21 20-16 15-11 10-6 5-0 opcode rs rt rd shamt funct I-format Instruction: 31-26 25-21 20-16 15-0 opcode rs rt offset J-Format Instruction: 31-26 25-0 opcode address...
View Full Document

This note was uploaded on 04/29/2010 for the course CDA 3101 taught by Professor Small during the Spring '08 term at University of Florida.

Ask a homework question - tutors are online