{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

slide5 - A r i thmeti c I CPSC 350 E J Ki m A ny Questi ons...

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

View Full Document Right Arrow Icon
Arithmetic I CPSC 350 E. J. Kim
Image of page 1

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

View Full Document Right Arrow Icon
Any Questions?
Image of page 2
What happened so far? We learned the basics of the MIPS assembly language We briefly touched upon the translation to machine language We formulated our goal, namely the implementation of a MIPS processor.
Image of page 3

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

View Full Document Right Arrow Icon
Pipelined MIPS Processor
Image of page 4
Welcome to the Future! The execution of machine instructions can follow, for example, the steps: Instruction fetch Instruction decode and register read Execute opn. or calculate an address Access operand in data memory Write the result into a register
Image of page 5

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

View Full Document Right Arrow Icon
Pipelined MIPS Processor We concentrate first on the arithmetic-logic unit
Image of page 6
The Arithmetic-Logic Unit Arithmetic (addition and subtraction) we need to know number representations there exist various interesting algorithms for addition and subtraction integer and floating point arithmetic Logical operations (and, or, not)
Image of page 7

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

View Full Document Right Arrow Icon
Computer Arithmetic
Image of page 8
Unsigned Numbers 32 bits are available Range 0..2 32 -1 1101 2 = 2 3 +2 2 +2 0 = 13 10 Upper bound 2 32 –1 = 4,294,967,295
Image of page 9

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

View Full Document Right Arrow Icon
Unsigned Numbers If we have n bit unsigned integers, then addition really means a+b mod 2 n For example, if n=4, then 1101 2 + 1001 2 = 13 + 9 = 22 = 6 mod 16 1101 + 1001 =0110
Image of page 10
Number representations What signed integer number representations do you know?
Image of page 11

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

View Full Document Right Arrow Icon
Signed Numbers Sign-magnitude representation MSB represents sign, 31bits for magnitude One’s complement Use 0..2 31 -1 for non-negative range Invert all bits for negative numbers Two’s complement Same as one’s complement except negative numbers are obtained by inverting all bits and adding 1
Image of page 12
Image of page 13
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