COMP 273 Lecture Notes - Lecture 1: Floating Point, Signed Number Representations, Odometer

80 views7 pages

Document Summary

To motivate our representation of negative numbers, let me take you back to your childhood again. Remember driving in your parent"s car and looking at the odometer. 1 remember the excitement you felt when the odometer turned from 009999 to 010000. Even more exciting was to see the odometer go from 999999 to 000000, if you were so lucky. This odometer model turns out to be the key to how computers represent negative numbers. If we are working with six digit decimal numbers only, then we might say that 999999 behaves the same as -1. The reason is that if we add 1 to 999999 then we get 000000 which is zero. Notice that we are ignoring a seventh digit in the sum (a carry over). We do so because we are restricting ourselves to six digits. Let"s look for the number that, when added to 328769, gives us 000000. By inspection, we can determine this number to be 671231.

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