# 2.2 Module 3: computer arithmetic  (Page 3/3)

 Page 3 / 3

So: -(-128) = -128.

Because 128 is out of the range of signed 8bits numbers.

Addition and Subtraction is done using following steps:

• Monitor sign bit for overflow
• Take twos compliment of subtrahend and add to minuend ,i.e. a - b = a + (-b)

## 3.3 multiplying positive numbers:

The multiplying is done using following steps:

• Work out partial product for each digit
• Take care with place value (column)

## Solution 1:

• Convert to positive if required
• Multiply as above
• If signs were different, negate answer

## Solution 2:

• Booth’s algorithm:

Example of Booth’s Algorithm:

## 3.5 division:

• More complex than multiplication
• Negative numbers are really bad!
• Based on long division
• (for more detail, reference to Computer Organization and Architecture, William Stalling)

## 4.1 principles

We can represent a real number in the form

$±S×{B}^{±E}$

This number can be stored in a binary word with three fields:

• Sign: plus or minus
• Significant: S
• Exponent: E.

(A fixed value, called the bias, is subtracted from the biased exponent field to get the true exponent value (E). Typically, the bias equal ${2}^{k-1}-1$ , where k is the number of bits in the binary exponent)

• The base B is implicit and need not be stored because it is the same for all numbers.

## 4.2 ieee standard for binary floating-point representation

The most important floating-point representation is defined in IEEE Standard 754 [EEE8]. This standard was developed to facilitate the portability of programs from one processor to another and to encourage the development of sophisticated, numerically oriented programs. The standard has been widely adopted and is used on virtually all contemporary processors and arithmetic coprocessors.

The IEEE standard defines both a 32-bit (Single-precision) and a 64-bit (Double-precision) double format with 8-bit and 11-bit exponents, respectively. Binary floating-point numbers are stored in a form where the MSB is the sign bit, exponent is the biased exponent, and "fraction" is the significand. The implied base (B) is 2.

Not all bit patterns in the IEEE formats are interpreted in die usual way; instead, some bit patterns are used to represent special values. Three special cases arise:

1. if exponent is 0 and fraction is 0, the number is ±0 (depending on the sign bit)
2. if exponent = ${2}^{e}$ -1 and fraction is 0, the number is ±infinity (again depending on the sign bit), and
3. if exponent = ${2}^{e}$ -1 and fraction is not 0, the number being represented is not a number (NaN).

This can be summarized as:

Single-precision 32 bit

A single-precision binary floating-point number is stored in 32 bits.

The number has value v:

v = s × ${2}^{e}$ × m

Where

s = +1 (positive numbers) when the sign bit is 0

s = −1 (negative numbers) when the sign bit is 1

e = Exp − 127 (in other words the exponent is stored with 127 added to it, also called "biased with 127")

m = 1.fraction in binary (that is, the significand is the binary number 1 followed by the radix point followed by the binary bits of the fraction). Therefore, 1 ≤ m<2.

In the example shown above:

S=1

E= 011111100(2) -127 = -3

M=1.01 (in binary, which is 1.25 in decimal).

The represented number is: +1.25 × 2−3 = +0.15625.

## 5. floating-point arithmetic

The basic operations for floating-point $\mathrm{X1}=\mathrm{M1}\ast {R}^{\mathrm{E1}}$ and $\mathrm{X2}=\mathrm{M2}\ast {R}^{\mathrm{E2}}$

• $\mathrm{X1}±\mathrm{X2}=\left(\mathrm{M1}\ast {R}^{\mathrm{E1}-\mathrm{E2}}\right){R}^{\mathrm{E2}}$ (assume E1  E2)
• $\mathrm{X1}\ast \mathrm{X2}=\left(\mathrm{M1}\ast \mathrm{M2}\right){R}^{\mathrm{E1}+\mathrm{E2}}$
• $\mathrm{X1}/\mathrm{X2}=\left(\mathrm{M1}/\mathrm{M2}\right){R}^{\mathrm{E1}-\mathrm{E2}}$

For addi­tion and subtraction, it is necessary lo ensure that both operands have the same exponent value. I his may require shifting the radix point on one of the operands to achieve alignment. Multiplication and division are more straightforward.

A floating-point operation may produce one of these conditions:

• Exponent overflow: A positive exponent exceeds the maximum possible expo­nent value. In some systems, this may be designated as
• Exponent underflow: A negative exponent is less than the minimum possible exponent value (e.g.. -200 is less than -127). This means that the number is too small to be represented, and it may be reported as 0.
• Significand underflow: In the process of aligning significands, digits may flow off the right end of the significand. Some form of rounding is required.
• Significand overflow: The addition of two significands of the same sign may result in a carry out of the most significant bit. This can be fixed by realign­ment.

Do somebody tell me a best nano engineering book for beginners?
what is fullerene does it is used to make bukky balls
are you nano engineer ?
s.
what is the Synthesis, properties,and applications of carbon nano chemistry
so some one know about replacing silicon atom with phosphorous in semiconductors device?
Yeah, it is a pain to say the least. You basically have to heat the substarte up to around 1000 degrees celcius then pass phosphene gas over top of it, which is explosive and toxic by the way, under very low pressure.
Harper
how to fabricate graphene ink ?
for screen printed electrodes ?
SUYASH
What is lattice structure?
of graphene you mean?
Ebrahim
or in general
Ebrahim
in general
s.
Graphene has a hexagonal structure
tahir
On having this app for quite a bit time, Haven't realised there's a chat room in it.
Cied
what is biological synthesis of nanoparticles
what's the easiest and fastest way to the synthesize AgNP?
China
Cied
types of nano material
I start with an easy one. carbon nanotubes woven into a long filament like a string
Porter
many many of nanotubes
Porter
what is the k.e before it land
Yasmin
what is the function of carbon nanotubes?
Cesar
I'm interested in nanotube
Uday
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
Hello
Uday
I'm interested in Nanotube
Uday
this technology will not going on for the long time , so I'm thinking about femtotechnology 10^-15
Prasenjit
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.
how did you get the value of 2000N.What calculations are needed to arrive at it
Privacy Information Security Software Version 1.1a
Good
Got questions? Join the online conversation and get instant answers!