CMPSC 64 Lecture Notes - Lecture 3: Instruction Register, Program Counter, Multiplication Algorithm

57 views5 pages
21 Mar 2018
School
Course
Professor

Document Summary

Take the unsigned (abs) value and convert it to binary. In two"s complement, if the number"s most significant bit is 1, then that means it is a negative number, and if it"s 0, then the number is positive. When we talk of twos complement, we must also mention the number of bits involved. The range represented by number of bits differs between positive and negative binary numbers. 0 to +2% 1 for positive numbers. 2%() to +2%() 1 for twos complement negative numbers. Apply the mathematical principle of carrying over numbers in addition. Black box perspective of any n-bit binary adder. For unsigned (positive) numbers, cout indicates if the result did not fit all the way into the number of bits alloted. Could be used as an error condition for software. The carry bit/flag works only for unsigned (positive) numbers.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents