19-Computer Arithmetic

19-Computer Arithmetic - Computer Arithmetic Presenter...

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

View Full Document Right Arrow Icon
Computer Arithmetic Presenter Tathagata Bhattacharjee
Background image of page 1

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

View Full DocumentRight Arrow Icon
Tathagata Bhattacharjee 2 ALU Inputs and Outputs
Background image of page 2
Tathagata Bhattacharjee 3 Does the calculations Everything else in the computer is there to service this unit Handles integers May handle floating point (real) numbers May be separate FPU (maths co- processor) May be on chip separate FPU (486DX +)
Background image of page 3

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

View Full DocumentRight Arrow Icon
Tathagata Bhattacharjee 4 ALU performs actual arithmetic and logical operations on data All other elements of the computer system – control unit, registers, memory, I/O – are mainly used to bring data into the ALU for it to process and then to take the result back out.
Background image of page 4
Tathagata Bhattacharjee 5 FPU Stands for "Floating Point Unit." The first computer processors were far better at dealing with integers than with real numbers (floating point numbers). So a separate FPU processor was developed to handle the floating point calculations. That way, when the CPU encountered a floating-point expression (i.e. 1.62 * 0.87359), it would send the calculation to the FPU.
Background image of page 5

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

View Full DocumentRight Arrow Icon
Tathagata Bhattacharjee 6 Since the FPU is specifically designed to handle floating-point math, it computes expressions involving real numbers more efficiently. While the first floating point units used to be manufactured as individual chips, they are now typically integrated into the CPU.
Background image of page 6
Tathagata Bhattacharjee 7 Integer Representation Only have 0 & 1 to represent everything Positive numbers stored in binary e.g. 41=00101001 No minus sign No period Sign-Magnitude Two’s compliment
Background image of page 7

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

View Full DocumentRight Arrow Icon
Tathagata Bhattacharjee 8 Converting Decimal to Binary Method 1: Divide the number by 2, then divide what's left by 2, and so on until there is nothing left (0). Write down the remainder (which is either 0 or 1) at each division stage. Once there are no more divisions, list the remainder values in reverse order. This is the binary equivalent.
Background image of page 8
Tathagata Bhattacharjee 9 Example 254 / 2 giving 127 with a remainder of 0 127 / 2 giving 63 with a remainder of 1 63 / 2 giving 31 with a remainder of 1 31 / 2 giving 15 with a remainder of 1 15 / 2 giving 7 with a remainder of 1 7 / 2 giving 3 with a remainder of 1 3 / 2 giving 1 with a remainder of 1 1 / 2 giving 0 with a remainder of 1 Thus the binary equivalent is 11111110
Background image of page 9

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

View Full DocumentRight Arrow Icon
Tathagata Bhattacharjee 10 Example 132 / 2 giving 66 with a remainder of 0 66 / 2 giving 33 with a remainder of 0 33 / 2 giving 16 with a remainder of 1 16 / 2 giving 8 with a remainder of 0 8 / 2 giving 4 with a remainder of 0 4 / 2 giving 2 with a remainder of 0 2 / 2 giving 1 with a remainder of 0 1 / 2 giving 0 with a remainder of 1 Thus the binary equivalent is 10000100
Background image of page 10
11 Converting Decimal to Binary Method 2: Each column represents a power of 2, so use this as a basis of calculating the number. It is sometimes referred to as the 8:4:2:1 approach. Write down the binary number.
Background image of page 11

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

View Full DocumentRight Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/15/2011 for the course ECO 2023 taught by Professor Mr.raza during the Summer '10 term at FAU.

Page1 / 89

19-Computer Arithmetic - Computer Arithmetic Presenter...

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

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