[Home]Integer Numbers

Contents | (Visit Preferences to set your user name.) | Related To Integer Numbers | RecentChanges | Preferences | Index | Login | Logout

Featured: Featured Stories | Picture Gallery

2004 Cicada Watch | Comments On Civil Jury Instructions On Initial Interest Confusion
Google
Chat11.com Web Bible11.com MyBibleCenter.com
Sponsored by
[Baking America]

Cover of ISBN 1931412065

500 Low-Carb Recipes
More About This Book

Cover of ISBN 159233041X

15 Minute Low-Carb Recipes
More About This Book

Integer Numbers

Subjects > ... > [[]]


Integer numbers are whole numbers; they are always represented exactly (without a decimal point) in the computer word: -3, 0, 379, etc. For instance, 5 (decimal) is represented exactly by 101 (binary) in the computer. Since that's binary, the rightmost bit represents 2-to-the-zeroth power, or "one". Since it's "on" in this example, we have a value of "one". The next binary digit to the left represents 2 to the 1st power, or "two"; but it's off, so its value is zero. The leftmost bit represents 2 to the 2nd power, or "four". Since it's "on", we add four to the value. One plus four is five, which is why "101" in binary is "5" decimal... Exactly.

All positive, non-zero integer numbers are represented in this manner. There are differences in the way zero and negative numbers are represented, depending upon whether a ones complement , twos complement , or sign-magnitude system was implemented.



ONES COMPLEMENT

Negative X is obtained by inverting each bit of X; i.e.,

-X = not(X)

The leading bit of a number is the sign bit.  Positive numbers have a zero as the leading bit; negative numbers have a one as the leading bit.

One consequence of this is that there are two values for zero: +0 and -0.

For example, for a four-bit number (remember, the leading -- that is, leftmost -- bit is a sign bit):
 
Binary: 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
Decimal:  +0 +1 +2 +3 +4 +5 +6 +7 -7 -6 -5 -4 -3 -2 -1 -0



TWOS COMPLEMENT

Negative X is obtained by inverting each bit of X, and then adding one; i.e.,

-X = not(X)+1

The leading bit of a number is the sign bit.  Positive numbers have a zero as the leading bit; negative numbers have a one as the leading bit.

*[http://www.weblocal.com.br/hospedagem.htm Hospedagem de Sites] *[http://www.weblocal.com.br/ Hospedagem] *[http://www.weblocal.com.br/Servidor_Dedicado.htm Servidor Dedicado]

There is only one value for zero: all bits are zero (as opposed to the system used for One's Complement).

For example, for a four-bit number (remember, the leading -- that is, leftmost -- bit is a sign bit):
 
Binary: 0000 0001 0010 0011 0100 0101 0110 0111 1000
1001 1010 1011 1100 1101 1110 1111
Decimal:  0 +1 +2 +3 +4 +5 +6 +7 -8
-7 -6 -5 -4 -3 -2 -1

 Note that the range of negative numbers, and their values, are slightly different from one's complement.



SIGN-MAGNITUDE

This is the simplest way to represent negative numbers.  Numbers have the leading bit signify positive (0) or negative (1), while the following bits are the magnitude of the number.

Binary: 0000 0001 0010 0011 0100 0101 0110 0111 1000
1001 1010 1011 1100 1101 1110 1111
Decimal:  +0 +1 +2 +3 +4 +5 +6 +7 -0
-1 -2 -3 -4 -5 -6 -7




See also Recipes , Recipe Books , Recipe Tips ...

Used by permission of Direct Response Technologies, Inc.

Cover of ISBN 0471267570

The Low-Carb Comfort Food Cookbook
More About This Book



Contents | (Visit Preferences to set your user name.) | Related To Integer Numbers | RecentChanges | Preferences | Index | Login | Logout
Edit this bookstore.mybiblecenter.com page | View other versions
Last edited April 8, 2007 2:56 am (diff)
Search:
Sign up for PayPal and start accepting credit card payments
instantly.
Bobsgear - Get A Free Enterrpise Wiki Space!
Review: The Bobsgear Project was started to develop a variety of Confluence plugins. This installation of the Confluence Enterprise wiki includes flexible attachments, many Confluence plugins, personal blogs, interesting articles, and more. Bobsgear already has spaces related to politics, art and photography wiki, technical issues wiki, ediscovery wiki, health, Christian theology and Sabbath School wiki, the bible, book reviews, and quotations. Bobsgear allows free signup, and invites anyone to create a free hosted Confluence wiki space.


NEW USERS CLICK HERE! for a quick introduction to Wiki.

 

 Interested in Live From Chapel Perilous/BottomRightAd1?
686 total hits since 8/2011
Recently accessed pages: Affiliate Programs Calendar Challenges And Strategy - Reasons For This Memo Durian Fruit Esther Williams GNOSIS HomePages How To Create A CGI Executable That Is A .NET Console Application Insurance Quotation 2004 - GMAC Music/TopAd1 Possible Negative Effects Of Herbs And Natural Treatments Seventh-Day Adventist Elder Guide To Elder's Support Of Literature Ministry Stretching FAQ 4.6 - Duration, Counting, And Repetition This Application Has Failed To Start Because The Application Configuration Is Incorrect

Elapsed:1