# Fixed point arithmetic  (Page 3/4)

 Page 3 / 4

In the 2's complement fractional representation, an $N$ bit binary word can represent $2^{N}$ equally space numbers from $\frac{-2^{(N-1)}}{2^{(N-1)}}=1$ to $\frac{2^{-(N-1)}}{2^{(N-1)}}=1-2^{(N-1)}$ .

For example, we interpret an 8-bit binary word ${b}_{7}{b}_{6}{b}_{5}{b}_{4}{b}_{3}{b}_{2}{b}_{1}{b}_{0}$ as a fractional number $x=\frac{-({b}_{7}2^{7})+{b}_{6}2^{6}++{b}_{1}\times 2+{b}_{0}}{2^{7}}=(-({b}_{7})+\sum_{i=0}^{6} 2^{(i-7)}{b}_{i})\in \left[-1 , 1-2^{-7}\right]$

This representation is also referred as Q-format . We can think of having an implied binary digit right after the MSB. If we have an $N$ -bit binary word with MSB as the sign bit, we have $N-1$ bits to represent the fraction. We say the number has Q-( $N-1$ ) format. For example, in the example, $x$ is a Q-7 number. In C6211, it is easiest to handle Q-15 numbers represented by each 16bit binary word, because the multiplication of two Q-15 numbers results in a Q-30 number that can still be stored ina 32-bit wide register of C6211. The programmer needs to keep track of the implied binary point when manipulatingQ-format numbers.

(Q format): What are the decimal fractional numbers corresponding to the Q-7 format binary numbers; $01001101$ , $11100100$ , $01111001$ , and $10001011$ ?

Intentionally left blank.

## Two's complement arithmetic

The convenience of 2's compliment format comes from the ability to represent negative numbers and computesubtraction using the same algorithm as a binary addition. The C62x processor has instructions to add, subtract andmultiply numbers in the 2's compliment format. Because, in most digital signal processing algorithms, Q-15 format ismost easy to implement on C62x processors, we only focus on the arithmetic operations on Q-15 numbers in the following.

The addition of two binary numbers is computed in the same way as we compute the sum of two decimal numbers.Using the relation $0+0=0$ , $0+1=1+0=1$ and $1+1=10$ , we can easily compute the sum of two binary numbers. The C62x instruction ADD performs this binary addition on different operands.

However, care must be taken when adding binary numbers. Because each Q-15 number can represent numbers in therange $\left[-1 , 1-2^{15}\right]$ , if the result of summing two Q-15 numbers is not in this range, we cannot represent the result in theQ-15 format. When this happens, we say an overflow has occurred. Unless carefully handled, the overflow makes the result incorrect.Therefore, it is really important to prevent overflows from occurring when implementing DSP algorithms. One wayof avoiding overflow is to scale all the numbers down by a constant factor, effectively making all the numbers verysmall, so that any summation would give results in the $\left[-1 , 1\right)$ range. This scaling is necessary and it is important to figure out how muchscaling is necessary to avoid overflow. Because scaling results in loss of effective number of digits, increasingquantization errors, we usually need to find the minimum amount of scaling to prevent overflow.

Another way of handling the overflow (and underflow) is saturation . If the result is out of the range that can be properly represented in the given datasize, the value is saturated, meaning that the value closest to the true result is taken in the rangerepresentable. Such instructions as SADD , SSUB perform the operations followed by saturation.

what is a good calculator for all algebra; would a Casio fx 260 work with all algebra equations? please name the cheapest, thanks.
a perfect square v²+2v+_
kkk nice
algebra 2 Inequalities:If equation 2 = 0 it is an open set?
or infinite solutions?
Kim
y=10×
if |A| not equal to 0 and order of A is n prove that adj (adj A = |A|
rolling four fair dice and getting an even number an all four dice
Kristine 2*2*2=8
Differences Between Laspeyres and Paasche Indices
No. 7x -4y is simplified from 4x + (3y + 3x) -7y
is it 3×y ?
J, combine like terms 7x-4y
im not good at math so would this help me
how did I we'll learn this
f(x)= 2|x+5| find f(-6)
Need to simplify the expresin. 3/7 (x+y)-1/7 (x-1)=
. After 3 months on a diet, Lisa had lost 12% of her original weight. She lost 21 pounds. What was Lisa's original weight?
what is nanomaterials​ and their applications of sensors.
what is nano technology
what is system testing?
preparation of nanomaterial
Yes, Nanotechnology has a very fast field of applications and their is always something new to do with it...
what is system testing
what is the application of nanotechnology?
Stotaw
In this morden time nanotechnology used in many field . 1-Electronics-manufacturad IC ,RAM,MRAM,solar panel etc 2-Helth and Medical-Nanomedicine,Drug Dilivery for cancer treatment etc 3- Atomobile -MEMS, Coating on car etc. and may other field for details you can check at Google
Azam
anybody can imagine what will be happen after 100 years from now in nano tech world
Prasenjit
after 100 year this will be not nanotechnology maybe this technology name will be change . maybe aftet 100 year . we work on electron lable practically about its properties and behaviour by the different instruments
Azam
name doesn't matter , whatever it will be change... I'm taking about effect on circumstances of the microscopic world
Prasenjit
how hard could it be to apply nanotechnology against viral infections such HIV or Ebola?
Damian
silver nanoparticles could handle the job?
Damian
not now but maybe in future only AgNP maybe any other nanomaterials
Azam
can nanotechnology change the direction of the face of the world
At high concentrations (>0.01 M), the relation between absorptivity coefficient and absorbance is no longer linear. This is due to the electrostatic interactions between the quantum dots in close proximity. If the concentration of the solution is high, another effect that is seen is the scattering of light from the large number of quantum dots. This assumption only works at low concentrations of the analyte. Presence of stray light.
the Beer law works very well for dilute solutions but fails for very high concentrations. why?
how did you get the value of 2000N.What calculations are needed to arrive at it
where are the solutions?
where are the solutions?