Negative Numbers An alternative way to find the 2's complement Starting at the right 1. Copy bits until you reach the first Flip all the remaining bits (14) (-14) (-14) (14)
Floating Point Numbers Positional Notation Redux ½ ¼ ⅛ Thus = ½ + ⅛ = 5⅜ And _
Floating Point Numbers Another Darn Notation Excess value notation E.g. with 3 bits we can represent 8 things, the excess value is half of that or 4. The idea is that the number that you see appears 4 greater than it really is!!??? Thus000(0) -> (3) -> (4) -> 0 111(7) -> 3
Floating Point Numbers So how is (5⅜ 10 ) actually stored. In a way similar to scientific notation. For example, we might store 5⅜ in scientific notation as follows: x 10 1 where the important parts are exponent (excess 4) [e below] fractional part (mantissa) [m] sign [s] Now in the computer we have s eee mmmm for 8 bits and > x 2 3 -> truncation error
Floating Point Numbers Decode the following 8 bit representation of a floating point number – sign bit -> negative 010 – exponent -> x 2 -2 or excess Now, = -( ) or = -( ) =
Floating Point Numbers Encode the following number as an 8 bit representation of a floating point number. 3 = now consider < 2 -1 and 2 -2 so subtr which leaves < 2 -4 so subtr which leaves Thus = = x 2 2 The exponent 2 is 110(6) in excess 4 notation The final form is