Signed binary fractions
 


Signed binary fractions are formed much like signed integers. We will work with a single digit to the left of the decimal point, and this will represent the number -1 (= -(20)). The rest of the representation of the fraction remains unchanged. Therefore this leftmost bit represents a sign bit just as with two's complement integers. If this bit is set, the number is negative, otherwise the number is positive. The largest positive number that can be represented is still 1-2-m but the largest negative number is -1. The resolution is still 1-2-m.


There is a terminology for naming the resolution of signed fractions. If there are m bits to the right of the decimal point, the number is said to be in Qm format. For a 16 bit number (15 bits to the right of the decimal point) this results in Q15 notation.





















Convert 1.100 1001 from binary to decimal
Convert 1.111 1111 from binary to decimal 
Convert -0.75 from decimal to a binary fraction 
Convert -0.65625 from decimal to a binary fraction 
Approximate -0.9 as a binary fraction (use 8 bits) 

 


Signed binary fractions are easily extended to include all numbers by representing the number to the left of the decimal point as a 2's complement integer, and the number to the right of the decimal point as a positive fraction. Thus




-6.62510 = (-7+0.375)10 = 1001.0112


Note, that as with two's complement integers, the leftmost digit can be repeated any number of times without affecting the value of the number.

(c) Shilpa Sayura Foundation 2006-2017