w05-quiz2-solution

w05-quiz2-solution - ECE 30 Introduction to Computer...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the 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

Page1 / 3

w05-quiz2-solution - ECE 30 Introduction to Computer...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online