Java Reference
In-Depth Information
where d isthedigit, B isthebaseorradix,and C isthezero-basedcolumn
number,startingfromrighttoleft.Inthismanner,thevalueofamulti-digit
positiveintegerto n digitscanbeexpressedasasumofthedigitvalues:
dB d B d B
n
+
n
1
+
n
2
+
....
+
dB
0
n
n
1
n
2
0
where d i ( i =0,..., n )isthevalueofthedigitand B isthebaseorradixofthe
numbersystem.Thisrepresentationcanbeextendedtorepresentfrac-
tionalvalues.Recallingthat
1
x
n
=
n
x
wecanextendthesequencetotherightoftheradixpoint,asfollows:
1
2
.
+
dB dB
+
....
n
1
n
2
Inthedecimalsystem,thevalueofeachdigittotherightofthedecimal
pointiscalculatedas1/10,1/100,1/1000,andsoon.Thevalueofeachsuc-
cessivedigitofabinaryfractionisthereciprocalofapowerof2,hence
thesequence:1/2,1/4,1/8,1/16,etc. Figure20-2 showsthepositional
weight of the integer and the fractional digits in a binary number.
INTEGER PART
2 = 128
2=64
2=32
2=16
2=8
2=4
2=2
2=1
7
6
5
4
3
2
1
0
radix point
11111111 11111111
FRACTIONAL PART
.500
-1
-2
-3
-4
-5
-6
-7
-8
1/2
2
.250
1/4
2
.125
1/8
2
.0625
1/16
2
.03125
1/32
2
.015625
1/64
2
.0078125
1/128
2
.00390625
1/256
2
Figure 20-2 Positional Weights in a Binary Fraction
 
Search WWH ::




Custom Search