Integer Representation
Integer Representation
Integer Representation
Integer x -x
000 zero 111 -0
001 one 110 -1
010 two 101 -2
011 three 100 -3
+
Ones Complement
Uses the most significant bit as a sign bit
Differs from sign-magnitude representation in the way that the other
bits are interpreted
This procedure will not work for twos complement negative integers
Rule is to move the sign bit to the new leftmost position and fill in with
copies of the sign bit
For positive numbers, fill in with zeros, and for negative numbers, fill in
with ones
This is called sign extension
Addition
Overflow
OVERFLOW RULE:
SUBTRACTION RULE:
2
Review Questions
6
Review Questions
7
8
Fixed-Point Representation
Limitations:
Very large numbers cannot be represented nor can very small fractions
The fractional part of the quotient in a division of two large numbers could
be lost
+
Normalization
To simplify operations on floating-point numbers, it is typically required that
they be normalized.
If the base is known we need only store the sign, fractional part (called the
significand) and exponent.
+
Normalization
A normalized number is one in which the most
significant digit of the significand is nonzero.
Forbase 2 representation, a normalized number is
therefore one in which the most significant bit of
the significand is one.
1011.11 is normalized to 0.101111 x 24