{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# Ch03POCA - 3-1 Chapter 3 Arithmetic Principles of Computer...

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

Chapter 3: Arithmetic 3-1 Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Principles of Computer Architecture Miles Murdocca and Vincent Heuring Chapter 3: Arithmetic

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

View Full Document
Chapter 3: Arithmetic 3-2 Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Chapter Contents 3.1 Overview 3.2 Fixed Point Addition and Subtraction 3.3 Fixed Point Multiplication and Division 3.4 Floating Point Arithmetic 3.5 High Performance Arithmetic 3.6 Case Study: Calculator Arithmetic Using Binary Coded Decimal
Chapter 3: Arithmetic 3-3 Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Computer Arithmetic Using number representations from Chapter 2, we will explore four basic arithmetic operations: addition, subtraction, multiplication, division. Significant issues include: fixed point vs. floating point arithmetic, overflow and underflow, handling of signed numbers, and perfor- mance. We look first at fixed point arithmetic, and then at floating point arithmetic.

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

View Full Document
Chapter 3: Arithmetic 3-4 Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Number Circle for 3-Bit Two’s Complement Numbers Numbers can be added or subtracted by traversing the number circle clockwise for addition and counterclockwise for subtraction. Overflow occurs when a transition is made from +3 to -4 while pro- ceeding around the number circle when adding, or from -4 to +3 while subtracting. 100 010 110 000 111 101 011 001 0 1 2 3 -4 -3 -2 -1 Adding numbers Subtracting numbers
Chapter 3: Arithmetic 3-5 Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Overflow Overflow occurs when adding two positive numbers produces a negative result, or when adding two negative numbers produces a positive result. Adding operands of unlike signs never produces an overflow. Notice that discarding the carry out of the most significant bit dur- ing two’s complement addition is a normal occurrence, and does not by itself indicate overflow. • As an example of overflow, consider adding (80 + 80 = 160) 10 , which produces a result of -96 10 in an 8-bit two’s complement format: 01010000 = 80 + 01010000 = 80 ---------- 10100000 = -96 ( not 160 because the sign bit is 1.)

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

View Full Document
Chapter 3: Arithmetic 3-6 Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Ripple Carry Adder Two binary numbers A and B are added from right to left, creating a sum and a carry at the outputs of each full adder for each bit po- sition. Full adder b 0 a 0 s 0 Full adder b 1 a 1 s 1 Full adder b 2 a 2 s 2 Full adder b 3 a 3 c 4 s 3 0 c 0 c 1 c 2 c 3
Chapter 3: Arithmetic 3-7 Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Constructing Larger Adders A 16-bit adder can be made up of a cascade of four 4-bit ripple- carry adders.

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 42

Ch03POCA - 3-1 Chapter 3 Arithmetic Principles of Computer...

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

View Full Document
Ask a homework question - tutors are online