58Chapter 3Data Representationdecimal system, a sign (+ or ±) is placed before a number’s value, thoughthe positive sign is often assumed. The sign represents the ordering, andthe digits represent the magnitude of the number. The classic number linelooks something like this, in which a negative sign meant that the numberwas to the left of zero and the positive number was to the right of zero.Performing addition and subtraction with signed integer numbers can bedescribed as moving a certain number of units in one direction or another.To add two numbers you find the first number on the scale and move inthe direction of the sign of the second as many units as specified. Subtrac-tion was done in a similar way, moving along the number line as dictatedby the sign and the operation. In grade school you soon graduated todoing addition and subtraction without using the number line.There is a problem with the sign-magnitude representation: There aretwo representations of zero. There is plus zero and minus zero. The idea of
This is the end of the preview.
access the rest of the document.