This preview shows pages 1–3. Sign up to view the full content.
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 twos complement representation and B is a 4-bit twos complement integer. Which one is larger, if A = 11101110 and B = 1110 ? What is the 8-bit twos complement representation of B ? A = 11101110 =- 18 < B = 1110 =- 2 . The 8-bit representation of B is 11111110 ....
View Full Document
- Spring '08