CMPSC 64 Chapter Notes - Chapter 3: Multiplication, Operand, Negative Number

40 views3 pages
21 Mar 2018
School
Course
Professor

Document Summary

In addition, digits are added bit by bit from right to left, with carries passed to the next digit to the left. Subtraction uses addition: the appropriate operand is simply negated before being added. Add the two"s complement representation of the number. No overflow can occur when adding positive and negative operands. No overflow can occur when subtracting operands of the same sign. Adding two positive numbers and the sum is negative, or vice versa. A carry out occurred into the sign bit. Subtracting a negative number from a positive number and the result is negative, or subtracting a positive number from a negative number and get a positive result. Unsigned integers are commonly used for memory addresses where overflows are ignored. Mips offers two kinds of arithmetic instructions to ignore or recognize overflow: Add (add), add immediate (addi), and subtract (sub) cause exceptions on overflow.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents