Quiz3Sol - write it as 00101 and not 101. Address Opcode...

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

View Full Document Right Arrow Icon
CDA3101 Quiz 3 Last Name ____________________ Time: 15 minutes First Name ____________________ 1. Consider the following MIPS assembly code. loop: lb $t7, 0($t3) add $t1, $t1, $t7 addi $t0, $t0, -4 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 at 0x04c00008 , 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 0x04c00008 100000 01011 01111 0000000000000000 0x04c0000c 000000 01001 01111 01001 00000 100000 0x04c00010 001000 01000 01000 1111 1111 1111 1100 0x04c00014 000101 01000 01110 1111 1111 1111 1100 0x04c00018 001000 01011 01011 0000 0000 0000 1000 0x04c00020 000010 0100 1100 0000 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 homework help was uploaded on 04/18/2008 for the course CDA 3103 taught by Professor Bandyopadhyay during the Spring '08 term at University of Florida.

Ask a homework question - tutors are online