sponsored by
OSdata.com: assembly language 

OSdata.com

Assembly Language

binary integer arithmetic

    This web page examines integer arithmetic instructions in assembly language. Specific examples of instructions from various processors are used to illustrate the general nature of assembly language.

Google


OSdata.com is used in more than 300 colleges and universities around the world

Find out how to get similar high web traffic and search engine placement.

For those with high speed connections, the very large single file summary is still on line.

integer arithmetic

    See also binary integer data representations.

    For most processors, integer arithmetic is faster than floating point arithmetic. This can be reversed in special cases such digital signal processors.

    The basic four integer arithmetic operations are addition, subtraction, multiplication, and division. Arithmetic operations can be signed or unsigned (unsigned is useful for effective address computations). Some older processors don’t include hardware multiplication and division. Some processors don’t include actual multiplication or division hardware, instead looking up the answer in a massive table of results embedded in the processor.

    A specialized, but common, form of addition is an increment instruction, which adds one to the contents of a register or memory location. For address computations, “increment” may mean the addition of a constant other than one. Some processors have “short” or “quick” addition instructions that extend increment to include a small range of positive values.

    A specialized, but common, form of subtraction is an decrement instruction, which subtracts one from the contents of a register or memory location. For address computations, “decrement” may mean the subtraction of a constant other than one. Some processors have “short” or “quick” subtraction instructions that extend decrement to include a small range of values.

    Compare instructions are used to examine one or more integers non-destructively. These are usually implemented by performing a subtraction in some shadow register or accumulator and then setting flags accordingly. Compare instructions can compare two integers, or can compare a single integer to zero. Triadic compare instructions compare a test value to an upper and lower limit, which can be useful for bounds and range checking.

    Some processors have specific hardware support for large multi-byte integer arithmetic. Even if there is no specific support, generally carry and borrow flags can be used to implement software multi-byte arithmetic routines.

    Some processors have other special integer arithmetic operations. A clear instruction sets a register or memory location to zero. Some processors have special instructions for setting a register to a special value (such as pi) with additional guard bits also being set appropriately. A sign extend operation takes a small value and sign extends it to a larger storage format (such as byte to word). An arithmetic complement gives the arithmetic complement of a number (one’s complement). An arithmetic negate gives the arithmetic inverse of a number (subtract from zero; two’s complement).

For those with high speed connections, the very large single file summary is still on line.


OSdata.com is used in more than 300 colleges and universities around the world

Read details here.

Some or all of the material on this web page appears in the
free downloadable college text book on computer programming.

Curve left spacer Curve right
thank you for your support.
All emblems are now available on:
Posters, Prints, Apparel, Baby, Housewares, Hats, Bags, Stickers, Buttons, Magnets & More!


run your ad here


Donate now
or the mouse dies!!!

OSdata.com is a visitor supported educational web site

To donate, click here.

Note: Please mail donations to: Milo, PO Box 1361, Tustin, Calif, 92781, USA. Or use the link above to donate via credit cards.


    A web site on dozens of operating systems simply can’t be maintained by one person. This is a cooperative effort. If you spot an error in fact, grammar, syntax, or spelling, or a broken link, or have additional information, commentary, or constructive criticism, please e-mail Milo. If you have any extra copies of docs, manuals, or other materials that can assist in accuracy and completeness, please send them to Milo, PO Box 1361, Tustin, CA, USA, 92781.

    Click here for our privacy policy.


previous page next page
previous page next page

home page

two levels up

special topics

one level up

peer level


Made with Macintosh

    This web site handcrafted on Macintosh computers using Tom Bender’s Tex-Edit Plus and served using FreeBSD .

Viewable With Any Browser


    Names and logos of various OSs are trademarks of their respective owners.

    Copyright © 2000, 2001 Milo

    Last Updated: March 26, 2001

    Created: February 21, 2001 (from machcode.htm)


OSdata.com
osdata.com
OSdata.com team support
  logo design
michaelm.com
michaelm.com
web hosting

KMThost.com
hemp clothing
hempstar.com
hempStar.com
recording studio
casoundstudios
casoundstudios
cleanse
hempstar.com
ezwaterflo.com
spiritual support
Pr Ntr Kmt
Pr Ntr Kmt .org
 
web hosting provided by: KMThost.com
The author of this website can help you get high search engine placement.

ancient Egyptian marriages and weddings


previous page next page
previous page next page