Java Reference
In-Depth Information
base or radix ofthesystem.Thebaseofthedecimalsystemis10,thebase
of the binary system is 2, and the base of the hexadecimal system is 16.
In radix-positional terms a decimal number can be expressed as a
sum-of-digits expressed by the formula
i
d
×
10
for 0
d
9 (
d
an integer)
i
i
i
The summation formula for a binary radix, positional representation is
as follows
i
b
×
2f r 0 r1
b
=
i
i
whered i andb i arethei th decimalandbinarydigits,respectively,asordered
from right to left, starting at the 0 position.
Types of Numbers
By the adoption of special representations for different types of numbers
theusefulnessofapositionalnumbersystemcanbeextendedbeyondthe
simple counting function.
Whole numbers
Thedigitsofanumbersystem,calledthepositiveintegersor naturalnum-
bers ,areanorderedsetofsymbols.Thenotionofanorderedsetmeansthat
the numerical symbols are assigned a predetermined sequence. A posi-
tionalsystemofnumbersalsorequiresaspecialdigit,namedzero.Thespe-
cialsymbol0,byitself,representsnothing.However,0assumesacardinal
function when it is combined with other digits, for instance, 10 or 30. The
wholenumbers arethesetofnaturalnumbers,includingthenumberzero.
Signed numbers
Anumbersystemcanalsobeusedtorepresentdirection.Wegenerallyuse
the+and-signstorepresentoppositenumericaldirections.Thetypicalil-
lustration for a set of signed numbers is as follows
-9 -8 -7 -6 -5 -4 -3 -2 -1 0 +1 +2 +3 +4 +5 +6 +7 +8 +9
negative numbers <—
zero
—> positive numbers
The number zero, which separates the positive and the negative num-
bers, has no sign of its own. Although in some binary encodings, which
Search WWH ::




Custom Search