Assembly language - MIPS

Info icon This preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Problem Session Problem Session Nan Li Nan Li 2006.11 2006.11
Image of page 1

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

View Full Document Right Arrow Icon
What will we do? Go over each chapter Important Points Some of exerciseproblems
Image of page 2
Outline Big Picture Instruction Set – Tell themachinewhat it should do How can wepresent thosenumbers How can wemeasurethe goodness of a machine How to implement theinstruction set?
Image of page 3

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

View Full Document Right Arrow Icon
Chapter 1
Image of page 4
Chapter 2 Three types of Instruction R-type, I-type, J-type Example: MIPS -> High Level Language Thelast question in themidterm High Level Language -> MIPS 1.Theformat and meaning 2.Instruction-> Machine code 3.Machinecode-> Instruction op rs rt rd shamt funct add $1, $21, $29: 000000 10101 11101 00001 00000 100000
Image of page 5

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

View Full Document Right Arrow Icon
bne$s5, $0, C1 # branch k != 0 add $s0, $s3, $s4 # f = i + j j Exit # break C1: addi $t0, $s5, -1 # $t0 = k - 1 bne$t0, $0, C2 # branch k != 1 add $s0, $s1, $s2 # f = g + h j Exit # break C2: addi $t0, $s5, -2 # $t0 = k - 2 bne$t0, $0, C3 # branch k != 2 sub $s0, $s1, $s2 # f = g - h j Exit # break C3: addi $t0, $s5, -3 # $t0 = k - 3 bne$t0, $0, Exit # branch k != 3 sub $s0, $s3, $s4 # f = i - j Exit: if (k==0) f = i + j; Elseif (k==1) f = g + h; It is a branch If else? For, while?
Image of page 6
Chapter 3 Integer Conversion fromonebaseto theother Two’s complement: Positive: Negative: invert and add Calculation How to detect overflow?
Image of page 7

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

View Full Document Right Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern