DOC PREVIEW
SJSU CS 147 - Computer Arithmetic

This preview shows page 1-2-3-4 out of 13 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 13 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Computer ArithmeticThe ALUSign-MagnitudeTwos ComplementConverting Bit LengthInteger Math NegationInteger Math AdditionInteger Math SubtractionInteger Math MultiplicationInteger Math DivisionFloating PointFloating Point Math Addition & SubtractionFloating Point Math Multiplication & DivisionGrant HardinArithmetic Logic UnitThe Component that performs arithmetic and logic operationsEverything else exists to bring data to the ALUBased on simple Boolean logic operations.Alternate representation of numberLeftmost bit is sign while the rightmost n-1 bits are magnitudeHas several drawbacks and is rarely used+18 = 00010010-18 = 10010010+0 = 00000000-0 = 10000000Most common representation of numbersMSB is sign indicatorAll bits are interpretedFor positive values, just add 0s +18 = 00010010 +18 = 0000000000010010For negatives•Move sign bit to leftmost position•Fill with copies of sign bit -18 = 11101110 -18 = 1111111111101110Formally:1.Take the Boolean complement of each bit2.Add 1 +18 = 00010010bitwise complement = 11101101 + 1 ------------ 11101110 = -18Take both values as unsigned intsOverflow Rule•If both numbers are positive or negative, overflow occurs if the result is the opposite sign.Take the twos complement of the subtrahendAdd this to the minuendOverflow still appliesSimilar to paper-pen multiplicationGenerate partial products and sum themRemember to pad negative twos complement numbersAgain, similar to paper-pencilGenerate partial divisors and subtractRemember to subtract as unsigned integerUses a fixed binary point to allow fractionsLimited•Cannot represent very large numbers•Or very small Fractions1. Check for zeros2. Align significands3. Add or subtract significands4. Normalize


View Full Document

SJSU CS 147 - Computer Arithmetic

Documents in this Course
Cache

Cache

24 pages

Memory

Memory

54 pages

Memory

Memory

70 pages

Lecture 1

Lecture 1

53 pages

Cisc

Cisc

18 pages

Quiz 1

Quiz 1

4 pages

LECTURE 2

LECTURE 2

66 pages

RISC

RISC

40 pages

LECTURE 2

LECTURE 2

66 pages

Lecture 2

Lecture 2

67 pages

Lecture1

Lecture1

53 pages

Chapter 5

Chapter 5

14 pages

Memory

Memory

27 pages

Counters

Counters

62 pages

Load more
Download Computer Arithmetic
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Computer Arithmetic and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Computer Arithmetic 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?