This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: ECE 30 Introduction to Computer Engineering Quiz 2 February 2, 2005 Name Student ID Signature Your score out of 1 10 2 10 Total 20 You may only use the MIPS assembly instructions listed below. Do not use any other instructions! arithmetic add add addu add (unsigned) sub subtract subu subtract (unsigned) addi add immediate addiu add immediate (unsigned) special lui load upper immediate slt set if less than sltu set if less than (unsigned) branch beq branch if equal bne branch if not equal jump j jump jal jump and link jr jump register 1. Computer Arithmetic / Assembly Language Programming (10 points) (a) (2 points) A is an 8-bit integer in the two’s complement representation and B is a 4-bit two’s complement integer. Which one is larger, if A = 11101110 and B = 1110 ? What is the 8-bit two’s complement representation of B ? A = 11101110 =- 18 < B = 1110 =- 2 . The 8-bit representation of B is 11111110 ....
View Full Document
- Spring '08
- complement representation, complement number, MIPS instruction sequence, length MIPS instruction