<<

WHH ƒeries r€ QHHH gomputer ƒystems

he„e „‰€iƒ gyx†i‚ƒsyx

€rogr—mmer9s quide

efghi

r€ €—rt xoF QPTSHEWHHIS

€rinted in FƒFeF IWVW

ƒe™ond idition

iIHVW „he inform—tion ™ont—ined in this do ™ument is su˜ je™t to ™h—nge

without noti™eF

ri‡vi„„E€egue‚h weuiƒ xy ‡e‚‚ex„‰ yp ex‰

usxh ‡s„r ‚iqe‚h „y „rsƒ we„i‚sevD sxgv hsxqD

f „ xy„ vsws„ih „yD „ri sw€vsih ‡e‚‚ex„siƒ yp

wi‚grex„efsvs„‰ exh ps„xiƒƒ py‚ e €e‚„sg ve‚

€ ‚€yƒiF rewlettE€—™k—rd sh—ll not ˜ e li—˜le for errors

™ont—ined herein or use of this m—teri—lF

rewlettE€—™k—rd —ssumes no resp onsi˜ilit y for the use or

reli—˜ilit y of its softw—re on equipment th—t is not furnished ˜y

rewlettE€—™k—rdF

„his do ™ument ™ont—ins propriet—ry inform—tion whi™his

prote™ted ˜y ™opyrightF ell rights —re reservedF xo p—rt of

this do ™umentm—y ˜ e photo ™opiedD repro du™edD or tr—nsl—ted

to —nother l—ngu—ge without the prior written ™onsentof

rewlettE€—™k—rd gomp—nyF

™

gopyright  IWVW ˜y rewlettE€—™k—rd gomp—ny „he following t—˜le lists the printings of this do ™umentD together

€rint ristory

with the resp e™tive rele—se d—tes for e—™h editionF „he softw—re

version indi™—tes the version of the softw—re pro du™t —t the time

this do ™umentw—s issuedF w—ny pro du™t rele—ses do not require

™h—nges to the do ™umentF „hereforeD do not exp e™t — oneEtoEone

™orresp onden™e ˜ etween pro du™t rele—ses —nd do ™ument editionsF

idition h—te ƒoftw—re

†ersion

pirst idition xovem˜ er IWVU eFHIFHH

p d—te I tuly IWVV eFIHFHH

ƒe™ond idition y™to˜ er IWVW eFQHFHH

iii iv „he h—t— „yp es gonversion €rogr—mmer9s w—nu—l is intended for

€ref—™e

w€i ˆv progr—mmers who —re exp erien™ed in one or more highElevel

progr—mming l—ngu—gesF „he purp ose of the m—nu—l is to help the

progr—mmer who needs to re™eive —nd p—ss d—t— —™ross l—ngu—ges or

progr—mming environmentsF

„his guide is p—rt of the €rogr—mmer ƒeriesF yther m—nu—ls in the

series —re depi™ted in the do ™ument—tion m—p —t the front of the

m—nu—lF „he m—nu—ls for sp e™i™ progr—mming l—ngu—ges m—y˜e

useful —s wellY the most ™ommon —re listed ˜ elowX

r€ fusiness feƒsgGˆv ‚eferen™e w—nu—l @QPUISEWHHHIAF

r€ g €rogr—mmer9s quide @WPRQREWHHHPAD r€ g ‚eferen™e

w—nu—l @WPRQREWHHHIAD r€ gGˆv ‚eferen™e w—nu—l ƒupplement

@QISHTEWHHHIAD —nd r€ gGˆv vi˜r—ry ‚eferen™e w—nu—l

ƒupplement @QHHPTEWHHHIAF

r€ gyfyv ssGˆv €rogr—mmer9s quide @QISHHEWHHHPA —nd

gyfyv ss ‚eferen™e w—nu—l @QISHHEWHHHIA —nd gyfyv ssGˆv

‚eferen™e w—nu—l ƒupplement @QISHHEWHHHSAF

r€ py‚„‚ex UUGˆv ‚eferen™e w—nu—l @QISHIEWHHIHA —nd r€

py‚„‚ex UUGˆv €rogr—mmer9s quide @QISHIEWHHIIAF

r€ €—s™—l ‚eferen™e w—nu—l @QISHPEWHHHIA —nd r€ €—s™—l

€rogr—mmer9s quide @QISHPEWHHHPAF

r€ ‚€qGˆv €rogr—mmer9s quide @QHQIVEWHHHIA —nd r€ ‚€q

‚eferen™e w—nu—l @QHQIVEWHHHQAF

gompiler vi˜r—ryGˆv ‚eferen™e w—nu—l @QPTSHEWHHPWA m—y —lso ˜ e

usefulF

gh—pter ID sntro du™tionD gives —n overview of the m—nu—l —nd of

the topi™ of d—t— typ esD their form—tD stor—geD —nd ™onversionF st

expl—ins wh—t primitive d—t— typ es —re re™ognized ˜y w€i ˆv —nd

its su˜systemsD why d—t— ™onversion m—y ˜ e ne™ess—ryD —nd the

dieren™es in d—t— represent—tion ˜ etween the x—tive wo de —nd

gomp—t—˜ilit y wo de progr—mming environments in w€i ˆvF

gh—pter PD porm—tting h—t— „yp esD presents the form—ts of the

v—rious d—t— typ es supp orted on w€i ˆv —nd its su˜systemsF

fit form—ts —re pi™turedD eld ˜ ound—ries givenD —nd form—tting

™onventions expl—inedF e t—˜le ™omp—res the ™orresp onden™e of

primitiv e d—t— typ es —™ross system intrinsi™s —nd progr—mming

l—ngu—gesF

gh—pter QD gonverting h—t— „yp esD t—kes e—™h of the primitive d—t—

typ esD one ˜y oneD —nd gives some suggestions for ™onverting to e—™h

of the other d—t— typ esF

epp endix eD eƒgs s —nd ifghsg go de †—luesD shows the ™h—r—™ter

™o de v—lues with their de™im—lD o ™t—lD —nd hex—de™im—l equiv—lentsF

v st would ˜ e most useful to skim the entire m—nu—l on™eD then lo ok up

sp e™i™ topi™s —s neededF „he „—˜le of pigures lists the v—rious ˜it

form—t m—psF vo ok —t the „—˜le of gontentsD „—˜le of „—˜lesD —nd

index for other sp e™i™ topi™sF

vi gontents

IF sntro du™tion

row ho the €rogr—mmer —nd the gomputer

gommuni™—te h—t—c F F F F F F F F F F F F F IEI

hening h—t— „yp es F F F F F F F F F F F F F F IEP

€rimitive h—t— „yp es F F F F F F F F F F F F F IEP

sntrinsi™ h—t— „yp es F F F F F F F F F F F F F IEP

v—ngu—ge h—t— „yp es F F F F F F F F F F F F F IEQ

porm—tting h—t— „yp es F F F F F F F F F F F F F IEQ

€rogr—mming invironment F F F F F F F F F F IEQ

€rogr—mming v—ngu—ges F F F F F F F F F F F IER

gonverting h—t— „yp es F F F F F F F F F F F F F IES

sing hierent„yp es „ogether F F F F F F F F IES

€—ssing fetween €rogr—mming invironments F F IES

€—ssing e™ross €rogr—mming v—ngu—ges F F F F F IES

PF porm—tting h—t— „yp es

‚e™ognizing €rimitive h—t— „yp es F F F F F F F F PEI

gh—r—™ter F F F F F F F F F F F F F F F F F F PEP

eƒgs s F F F F F F F F F F F F F F F F F F PEP

ifghsg F F F F F F F F F F F F F F F F F PEQ

xumeri™ F F F F F F F F F F F F F F F F F F F PER

snteger F F F F F F F F F F F F F F F F F F PER

nsigned snteger F F F F F F F F F F F F F PER

ƒigned snteger F F F F F F F F F F F F F F PES

‚e—l F F F F F F F F F F F F F F F F F F F PEU

siii or r€QHHH porm—t F F F F F F F F F PEV

ƒingle or hou˜le €re™ision F F F F F F F F F PEV

pields of — ‚e—l xum˜er F F F F F F F F F F PEV

siii ‚e—l xum˜er porm—t F F F F F F F F PEW

siii gonversion ix—mple F F F F F F F F F PEIH

r€QHHH ‚e—l xum˜er porm—t F F F F F F F PEIP

he™im—ls F F F F F F F F F F F F F F F F F PEIR

€—™ked he™im—l porm—t F F F F F F F F F F PEIS

np—™ked he™im—l porm—t F F F F F F F F F PEIT

plo—tingE€oint he™im—l porm—t F F F F F F F PEIT

porm—tting h—t— in €rogr—ms F F F F F F F F F F PEIW

xw —nd gw €rogr—mming invironments F F F F PEIW

€rogr—mming v—ngu—ges F F F F F F F F F F F PEPH

v—ngu—ge xotes F F F F F F F F F F F F F F PEPP

sntrinsi™s F F F F F F F F F F F F F F F F PEPP

r€ fusiness feƒsgGˆv F F F F F F F F F PEPP

r€ gGˆv F F F F F F F F F F F F F F F F PEPP

gontentsEI r€ gyfyv s sGˆv F F F F F F F F F F F F PEPQ

r€ py‚„‚ex UUGˆv F F F F F F F F F F PEPR

r€ €—s™—lGˆv F F F F F F F F F F F F F F PEPR

QF gonverting h—t— „yp es

€—ssing h—t— F F F F F F F F F F F F F F F F F QEI

gonverting from gh—r—™terX F F F F F F F F F F F QEP

„o yther gh—r—™ter F F F F F F F F F F F F F F QEP

fetween eƒgs s —nd ifghsg F F F F F F F F QEP

fetween x—tive v—ngu—ges F F F F F F F F F QEP

fetween xumeri™ porm—ts F F F F F F F F F F QEQ

„osnteger F F F F F F F F F F F F F F F F F F QER

„o ‚e—l F F F F F F F F F F F F F F F F F F F QER

„o€—™ked he™im—l F F F F F F F F F F F F F F QES

gonverting from snteger F F F F F F F F F F F F F QES

„o gh—r—™ter F F F F F F F F F F F F F F F F QES

„o yther snteger F F F F F F F F F F F F F F F QET

„o ‚e—l F F F F F F F F F F F F F F F F F F F QET

„o€—™ked he™im—l F F F F F F F F F F F F F F QET

gonverting prom ‚e—l F F F F F F F F F F F F F F QET

„o gh—r—™ter F F F F F F F F F F F F F F F F QET

„osnteger F F F F F F F F F F F F F F F F F F QET

„o yther ‚e—l F F F F F F F F F F F F F F F F QEU

yverow —nd nderowF F F F F F F F F F F QEV

e™™ur—™y F F F F F F F F F F F F F F F F F QEV

„run™—ting F F F F F F F F F F F F F F F F QEV

„o€—™ked he™im—l F F F F F F F F F F F F F F QEV

gonverting from €—™ked he™im—l F F F F F F F F F QEW

„o gh—r—™ter F F F F F F F F F F F F F F F F QEW

„osnteger F F F F F F F F F F F F F F F F F F QEW

„o ‚e—l F F F F F F F F F F F F F F F F F F F QEW

„o yther he™im—ls F F F F F F F F F F F F F F QEIH

eF eƒgs s —nd ifghsg go de †—lues

sndex

gontentsEP pigures

PEIF fit porm—tX eƒgs s gh—r—™ter F F F F F F F F F PEQ

PEPF fit porm—tX ifghsg gh—r—™ter F F F F F F F F PEQ

PEQF fit porm—tX QPEfit snteger F F F F F F F F F F PEU

PERF fit porm—tX ƒingleE€re™ision ‚e—l in siii

plo—tingE€oint xot—tion F F F F F F F F F F PEII

PESF fit porm—tX hou˜leE€re™ision ‚e—l in siii

plo—tingE€oint xot—tion F F F F F F F F F F PEIP

PETF fit porm—tX ƒingleE€re™ision ‚e—l in r€QHHH

plo—tingEp oint xot—tion F F F F F F F F F F PEIQ

PEUF fit porm—tX hou˜leE€re™ision ‚e—l in r€QHHH

plo—tingEp oint xot—tion F F F F F F F F F F PEIR

PEVF fit porm—tX fgh xi˜˜le F F F F F F F F F F F PEIS

PEWF fit porm—tX €—™ked he™im—l F F F F F F F F F F PEIT

PEIHF fit porm—tX plo—tingE€oint he™im—l F F F F F F PEIV

PEIIF fit porm—tX ƒhort plo—tingE€oint he™im—l F F F F PEIV

„—˜les

IEIF v—ngu—ges ƒupp orted on w€i ˆv F F F F F F F IER

PEIF w€i ˆv snteger „yp es F F F F F F F F F F F F PER

PEPF ‚—nges —nd e™™ur—™ies for plo—tingE€oint ‚e—l

xum˜ ers F F F F F F F F F F F F F F F F F PEV

PEQF hetermining the f—seE„en iquiv—lent of —n siii

‚e—l xum˜er F F F F F F F F F F F F F F F PEII

PERF ‚—nge —nd €re™ision for plo—tingE€oint he™im—ls F PEIU

PESF gorresp onden™e of h—t— „yp es e™ross v—ngu—gesX

sntrinsi™sD feƒsgD —nd g F F F F F F F F F F PEPH

PETF gorresp onden™e of h—t— „yp es e™ross v—ngu—gesX

gyfyvD py‚„‚exD —nd €—s™—l F F F F F F PEPI

eEIF eƒgs sGifghsg gh—r—™ter ƒets F F F F F F F F eEP

gontentsEQ

I

sntrodu™tion

„his ™h—pter gives you ˜—™kground on ™re—ting —nd re™eiving d—t— in

forms th—t your progr—m —nd the op er—ting system underst—ndF st

presents d—t— typ es dened ˜y the designers of WHH ƒeries r€ QHHH

gomputer ƒystemsD —nd the prop er form—t for those typ esF

„he ™omputer ™—n re™eive inform—tionD m—nipul—te itD —nd store

row ho the

itF st ™—n —™™ess stored inform—tionD re—d itD —nd send it outF ell

€rogr—mmer —nd the

inform—tion is represented in the ™omputer ˜y ™om˜in—tions of ones

gomputer

—nd zerosD e—™h one ™—lled — ˜in—ry ˜itF

gommuni™—te h—t—c

„ext ™h—r—™ters —nd numeri™ v—lues —re p—ssed in —nd out of the

™omputer —s — sequen™e of ˜its in xedEsized ™hunks ™—lled wordsF

rewlettE€—™k—rd €re™ision er™hite™ture @r€E€eA design is ˜—sed on —

QPE˜it @RE˜yteA wordF

‚egisters —re designed to hold one QPE˜it word of d—t—F fe™—use

they —re f—st ˜ut ™ostlyD registers typi™—lly hold only the d—t— ˜ eing

™urrently pro ™essed —nd the most frequently used simple m—™hine

instru™tionsF

„he designers —lso dene wh—t typ es of d—t— the system will

re™ognize —nd how e—™htyp e is to ˜ e form—ttedF „his w—yD the

system —nd the progr—mmer ™—n —™™ess —nd p—ss d—t— in ™omplete

—nd me—ningful ˜lo ™ksF „he progr—mmer often uses — highElevel

l—ngu—ge ™ompiler to tr—nsl—te ˜ etween the system —nd userF

sntrodu™tion IEI „he designers of the ™omputer dene ™ert—in primitive system d—t—

hefining h—t— „ypes

typ es in order to re™eive inputD store or m—nipul—te d—t—D —nd return

inform—tion in — predi™t—˜le w—yF

row — pro ™ess will use d—t— input dep ends on the ™ontextF sf —

pro ™ess requires — ™ert—in d—t— typ eD it will —ttempt to interpret input

—s th—t typ eF por ex—mpleD if you p—ss QP ˜in—ry ˜its to —n intrinsi™

p—r—meter th—t requires — le —ddressD it m—y —ttempt to —™™ess the

™ell —t th—t lo ™—tion in memoryFsfyou p—ss the s—me QP ˜its to —

p—r—meter th—t requires — ™h—r—™ter —rr—yDitm—y print — fourEletter

wordF sf you p—ss the s—me QP ˜its to — p—r—meter th—t requires —

TRE˜it o—tingEp oint re—l v—lueD you m—y ™—use —n error or progr—m

—˜ ortF

„he r€E€e instru™tion is designed to op er—te on ™ert—in

€rimitive h—t— „ypes

fund—ment—l d—t— typ esF „he follo wing d—t— typ es —re re™ognized ˜y

w€i ˆv —nd its su˜systemsX

gh—r—™tersF

„he follo wing numeri™ typ esX

sntegersF

‚e—l num˜ ers @in o—tingEp oint not—tionAF

he™im—lF

elthough de™im—l is not re—lly — system primitivetyp eD it is

xote

in™luded in this m—nu—l ˜ e™—use it is so widely used on w€i ˆvF

plo—tingEp oint de™im—ls —re used ˜y feƒsgY p—™ked —nd unp—™ked

de™im—ls —re used ˜y gyfyv —nd ‚€qF

„he ™ompilers of highElevel l—ngu—ges running on w€i ˆv h—ve

sntrinsi™ h—t— „ypes

me™h—nisms to —™™ess the systemEdened pro ™edures ™—lled intrinsi™sF

w€i ˆv intrinsi™ p—r—meters re™ognize the follo wing d—t— typ esX

eddress @ dAF

err—y@e AF

fo ole—n @ f AF

gh—r—™ter @ g AF

sntegersX ƒigned @ s A —nd nsigned @ AF

‚e—l @ ‚ AF

‚e™ord @ ‚e™ AF

gh—r—™terD integerD —nd re—l num˜ ers —re system primitiv e typ esF

eddress —nd fo ole—n typ es —re num˜ ers with sp e™i—l usesF err—y —nd

re™ord —re stru™tures th—t group d—t—F

IEP sntrodu™tion ƒome highElevel progr—mming l—ngu—ges running on w€i ˆv dene

v—ngu—ge h—t— „ypes

their own d—t— typ es ˜—sed on the primitivetyp esF „he l—ngu—ge

™ompiler m—kes —ny ne™ess—ry ™onversions ˜ etween the primitive d—t—

typ es —nd the l—ngu—geEdep endent d—t— typ esF „his ™onversion is

tr—nsp—rent to the progr—mmerF „hese typ es —re des™ri˜ ed in the

—ppropri—te l—ngu—ge m—nu—ls in the v—ngu—ge w—nu—l ƒeriesF

v—ngu—ges m—y simply ren—me the primitivetyp eD like the integerD

— system typ e ™ommon to —ll l—ngu—gesF v—ngu—ges m—y use the

system typ es —s ˜uilding ˜lo ™ks to ™re—te — more ™omplex d—t—

stru™tureF por ex—mpleD the —rr—y is not — primitiv e typ eD ˜ut is

dened ˜y progr—mming l—ngu—ges —s — ™onne™ted group of d—t—D —ll

of the s—me typ eF

„he designers of the ™omputer sp e™ify sp e™i™ form—ts for e—™h d—t—

porm—tting h—t—

typ e so the ™omputer ™—n —™™ess or output — sequen™e of ˜its in —

„ypes

predi™t—˜le w—yF

„he form—t sp e™ies —lignment —nd sizeF „he —lignment predi™ts the

@st—rtingA ˜ ound—ryY it tells where — me—ningful unit of inform—tion

˜ eginsF „he size tells the length of the unit of inform—tionY it predi™ts

the endF

„he prop er form—t for — d—t— typ e dep ends on two f—™torsX

€rogr—mming environmentF

€rogr—mming l—ngu—geF

w€i ˆv supp orts two progr—mming environmentsX x—tive wo de

€rogr—mming

@xwA —nd gomp—ti˜ilty wo de @gwAF e progr—m ™—n ˜ e designed

invironment

to run in xw or in gwD or to swit™h ˜—™k —nd forth ˜ etween

su˜routines in e—™h of themF

xw t—kes full —dv—nt—ge of rewlettE€—™k—rd €re™ision er™hite™ture

@r€E€eAD whi™h is ˜—sed on — QPE˜it wordF gw emul—tes the w€i

†Gi op er—ting systemD whi™h is ˜—sed on — ITE˜it wordF

sn this m—nu—lD —ssume th—t d—t— typ es —re w€i ˆv xw d—t— typ esD

xote

unless gw is sp e™i™—lly mentionedF

sntrodu™tion IEQ i—™henvironment supp orts its own highElevel l—ngu—ges —nd

€rogr—mming

™ompilersF wost —re shown in „—˜le IEIF

v—ngu—ges

„—˜le IEIF v—ngu—ges ƒupported on w€i ˆv

x—tivewode gomp—ti˜ility wo de

r€ fusiness feƒsgGˆv r€ fusiness feƒsgG†

r€ gGˆv

r€ gyfyv s sGˆv gyfyv s sG†

r€ py‚„‚ex TTG†

r€ py‚„‚ex UUGˆv r€ py‚„‚ex UUG†

r€ €—s™—lGˆv r€ €—s™—lG†

r€ ‚€qGˆv ‚€qG†

ƒ€vG†

por l—ngu—geEsp e™i™ d—t— typ es —nd form—tting ™onventionsD ™onsult

the —ppropri—te l—ngu—ge m—nu—lF

r€ fusiness feƒsgGˆv ‚eferen™e w—nu—l @QPUISEWHHHIA

r€ g ‚eferen™e w—nu—l @WPRQREWHHHIA —nd r€ gGˆv ‚eferen™e

w—nu—l ƒupplement @QISHTEWHHHIA

r€ gyfyv ssGˆv €rogr—mmer9s quide @QISHHEWHHHPA

gyfyv ss ‚eferen™e w—nu—l @QISHHEWHHHIA —nd gyfyv ssGˆv

‚eferen™e w—nu—l ƒupplement @QISHHEWHHHSA

r€ py‚„‚ex UUGˆv ‚eferen™e w—nu—l @QISHIEWHHIHA

r€ py‚„‚ex UUGˆv €rogr—mmer9s quide @QISHIEWHHHPA

r€ €—s™—l ‚eferen™e w—nu—l @QISHPEWHHHIA

r€ €—s™—l €rogr—mmer9s quide @QISHPEWHHHPA

IER sntrodu™tion ‰ou m—yw—ntto™h—nge the form of inform—tionF h—t— output ™—n

gonverting h—t—

˜ e ™re—ted ˜y one w€i pro ™ess th—t ™—nnot ˜ e used in —nother

„ypes

without tr—nsl—tion or ™onversionF €l—n for ™onversion if you p—ss

d—t— to ˜ e used in the following situ—tionsX

with d—t— of —nother typ e

˜etween progr—mming environments

—™ross progr—mming l—ngu—ges

v—ngu—ge ™omm—ndsD system intrinsi™sD —nd ™ompiler li˜r—ry routines

help you ™onvert ˜ etween typ es —nd form—tsF

‰ou m—y need to m—ke dierenttyp es of d—t— together ™omp—ti˜le to

sing hifferent „ypes

use them in — progr—mF por ex—mpleD to ™—l™ul—te the tot—l ™ost of —

„ogether

pro du™tD you m—y need to multiply — pri™e ˜y the num˜ er soldF sf the

pri™e is stored —s eƒgs s d—t— typ e —nd the num˜ er sold is stored —s

integerD one of them will h—ve to ˜ e ™onverted to the s—me d—t— typ e

—s the otherF

ƒu˜routines —re —lre—dy —v—il—˜le for m—ny ™ommon ™onversionsF

„here —re —lso intrinsi™s —t the system levelD —nd ™omm—nds within

progr—mming l—ngu—ges to ™onvertF

gh—pter P denes the xw primitivetyp es —nd provides their ˜it

m—psF gh—pter Q gives some ™onversion metho dsF

w€i †Gi —nd w€i ˆv in gomp—ti˜ility wo de @w€i ˆv gwA

€—ssing fetween

—re ˜—sed on — ITE˜it wordY w€i ˆv in x—tive wo de @w€i ˆv

€rogr—mming

xwA is ˜—sed on — QPE˜it wordF ƒome d—t— typ es —re represented

invironments

dierentlyFpor ex—mpleD — re—l num˜ er in — gwE™ompiled progr—m

willD ˜y def—ultD ˜ e in r€QHHH form—tF „he s—me re—l v—lue in —n

xwE™ompiled progr—m willD ˜y def—ultD ˜ e in siii form—tF

sf ™onversion is ne™ess—ryD ™onsider reE™ompiling routinesD writing

su˜routines to reform—tD or using system intrinsi™sF

„he highElevel l—ngu—ges do not —ll re™ognize the s—me primitive d—t—

€—ssing e™ross

typ esF gyfyv uses the de™im—l d—t— typ eD whi™h is not re™ognized

€rogr—mming

˜y€—s™—lY howeverD the o—tingEp oint re—l num˜er typ e is mutu—lly

v—ngu—ges

understo o d ˜y€—s™—l —nd w€i ˆvD ˜ut is not re™ognized ˜y

gyfyvF

v—ngu—ges m—y dene their own ™omplex d—t— typ es th—t ™—nnot ˜ e

interpreted ˜y other l—ngu—gesF sf you p—ss d—t— ˜ etween routines

th—t do not use the s—me typ es or form—tsD you lose integrity —nd

me—ningF „he re™eiving routine m—y not ˜ e —˜le to re—d the d—t— —t

—llF st m—y divide the ˜its it re—ds into the wrong size ™hunksF st m—y

interpret the —rr—ngement of ˜its ˜y its own form—tting ™onventionsF

„he result ™ould ˜ e ™ompletely dierent inform—tion th—n you

intendedF

sntrodu™tion IES ‰ou must pl—n for ™onversion if — progr—m uses — su˜routine written

in — l—ngu—ge with in™omp—ti˜le typ esF ƒome l—ngu—ges h—ve

™omm—nds th—t tr—nsl—te dire™tly —s d—t— is re—d in —nd written outF

‰ou m—y need to write — routine to tr—nsform the d—t— indire™tlyF

‚emem˜ er th—t —ll the d—t— used in —ny w€i l—ngu—ge is — primitive

d—t— typ e or is ˜—sed on — primitivetyp eF ‰ou ™ould write one

routine to tr—nsl—te d—t— from the rst l—ngu—ge typ es into primitive

system typ esD —nd then —nother routine to tr—nsl—te those system

typ es into — form the se™ond l—ngu—ge ™—n useF

IET sntrodu™tion P

porm—tting h—t— „ypes

„his ™h—pter helps you underst—nd the d—t— typ es supp orted on

w€i ˆvF „he rst p—rt of the ™h—pter denes —nd des™ri˜ es the

primitiv e d—t— typ es re™ognized ˜y w€i ˆv x—tive wo de systems

—nd su˜systemsD in™luding ˜it form—ts —nd —lignmentsF „he se™ond

p—rt des™ri˜ es some form—tting ™onsider—tions in w€i ˆv supp orted

progr—mming l—ngu—ges —nd environmentsF

h—t— is —n —˜str—™tion of inform—tionF h—t— must ˜ e stru™tured in —

‚e™ognizing

form th—t the ™omputer is designed to pro ™essY d—t— ™onversion is the

€rimitive h—t— „ypes

tr—nsl—tion of inform—tion to — form —™™ept—˜le to the ™omputerF

„he WHH ƒeries r€ QHHH gomputer ƒystems instru™tion set is

designed to op er—te on ™ert—in fund—ment—l d—t— typ esF „he follo wing

d—t— typ es —re re™ognized ˜y w€i ˆv —nd its su˜systemsX

gh—r—™tersF

„he follo wing numeri™ typ esX

sntegersF

‚e—l num˜ ers @in o—ting p oint not—tionAF

he™im—lsX p—™kedD unp—™kedD —nd o—tingEp ointF

elthough de™im—l is not re—lly — system primitivetyp eD it is

xote

in™luded in this m—nu—l ˜ e™—use it is so widely used on w€i ˆvF

plo—tingEp oint de™im—ls —re used ˜y feƒsgY p—™ked —nd unp—™ked

de™im—ls —re used ˜y gyfyv —nd ‚€qF

i—™h d—t— typ e requires — sp e™i™ ˜it form—tF sn this m—nu—lD ˜it

elds —re des™ri˜ ed —s @ ˜it X length AD where ˜it is the rst ˜it in the

eld —nd length is the num˜ er of ™onse™utive ˜its in the eldF por

ex—mpleD ’˜its @IQXQA4 refers to ˜its IQD IRD —nd ISF fit H is the most

signi™—nt ˜itF

porm—tting h—t— „ypes PEI gh—r—™ter ™o de form—ts —re primitive d—t— typ esF gh—r—™ters —re the

gh—r—™ter

lettersD num˜ ersD —nd sym˜ ols on your key˜ o—rdF „he ™omputer

rel—tes e—™h —lph—numeri™ ™h—r—™ter to —n VE˜it @one ˜yteA ˜in—ry

num˜ erD —™™ording to — ™orresp onden™e ™o deF ƒome of the ™h—r—™ters

—re e—sily displ—y—˜leD like C D c D V D —nd z Y some —re notD like — ˜l—nk

sp—™e or the ™—rri—ge returnF

w€i supp orts the two ™ommon emeri™—n inglish ™h—r—™ter ™o desX

eƒgs s @emeri™—n ƒt—nd—rd go de for snform—tion snter™h—ngeA —nd

ifghsg @ixtended fin—ry go ded he™im—l snter™h—nge go deAF

ƒever—l n—tur—l l—ngu—ge typ es —re —lso supp ortedF ƒee epp endix e

for eƒgs s —nd ifghsg ™o des —nd equiv—lentsF

gh—r—™ter d—t— typ es —re useful for storing strings of sym˜ ols like

n—mesD —ddressesD or identi™—tion num˜ ersD —nd for re—ding the

key˜ o—rd or writing to the s™reenF ‚emem˜ erD v—ri—˜les s—ved —s

d—t— typ e ™h—r—™ter —re re™ognized ˜y the ™omputer —s sym˜ olsD not

—s numeri™ v—luesF

eƒgss

w€i —nd its su˜systems use eƒgs s d—t— typ e to represent™h—r—™ter

d—t—F eƒgs s is the form—t —dopted ˜y exƒsD the emeri™—n x—tion—l

ƒt—nd—rds snstituteF wost w€i interf—™es use eƒgs s to —™™ept or

return ™h—r—™ter d—t—F

epp endix e shows the eƒgs s —nd ifghsg ™h—r—™ter ™o de v—luesD

—long with their de™im—lD o ™t—lD —nd hex—de™im—l equiv—lentsF

eƒgs s is used in this guide —s the n—me of — d—t— typ eF eƒgs s d—t—

typ e ™orresp onds to the eƒgs s ™h—r—™ter ™o de form—tF „he ™o des for

˜yte v—lues in the r—nge H to IPU ™onform to the eƒgs s st—nd—rd

form—tF fyte v—lues in the r—nge IPV to PSS —re interpreted using

rewlettE€—™k—rd9s extended ‚ywexV ™h—r—™ter setF w€i ˆv —nd

its su˜systems use v—lues in this r—nge to supp ort extended @VE˜itA

™h—r—™ter setsF

PEP porm—tting h—t— „ypes pigure PEI shows the eƒgs s d—t— typ e ˜it form—tF

pigure PEIF fit porm—tX eƒgss gh—r—™ter

ifghsg

ifghsg is —nother ™o ding form—t widely used in the ™omputer

industry for ™h—r—™ter d—t—F vike eƒgs sD it is ˜—sed on the ˜yteF

ifghsg is used in this guide —s the n—me of — d—t— typ eF ifghsg

d—t— typ e ™orresp onds to ifghsg ™h—r—™ter ™o de form—t for ˜yte

v—lues in the r—nge H to PSSF

epp endix e shows the eƒgs s —nd ifghsg ™h—r—™ter ™o de v—luesD

—long with their de™im—lD o ™t—lD —nd hex—de™im—l equiv—lentsF

pigure PEP shows the ˜it form—t for ifghsg d—t— typ eF

pigure PEPF fit porm—tX ifghsg gh—r—™ter

porm—tting h—t— „ypes PEQ w€i ˆv su˜systems supp ort three primitiv e d—t— typ es for num˜ ersX

xumeri™

sntegerF

‚e—lF

he™im—lF

snteger

en integer is —ny p ositiv e or neg—tive whole num˜ erD in™luding zeroF

sntegers —re useful for ™ounting —nd for in™rementing in lo opsF ƒigned

integers —re — useful form for ex™h—nging numeri™ d—t— ˜ etween

l—ngu—gesF

w€i ˆv integers ™—n ˜ e VD ITD QPD or TR ˜its longF „hey ™—n ˜ e

unsigned or signed @C or AF ƒigned integers —re represented in twos

™omplement formF

„—˜le PEIF w€i ˆv snteger „ypes

ƒize „yp e ‚—nge ƒtored etX

VE˜itX unsigned H to PSS ˜yte —ddresses

ITE˜itX signed QPDUTV to QPDUTU h—lfEw ord —ddresses

unsigned H to TSDSQS h—lfEw ord —ddresses

QPE˜itX signed PDIRUDRVQDTRV to PDIRUDRVQDTRU word —ddresses

unsigned H to RDPWRDWTUDPWS word —ddresses

„he ™h—rt ˜ elow shows the represent—tion of the whole num˜er

@˜—seEtenA UQ —s —n unsigned integerD — signed p ositiv e num˜ erD —nd —

signed neg—tive num˜ erF

nsigned ƒigned

€ositive xeg—tive

@UQA @CUQA @UQA

HIHHIHHI HIHHIHHI IHIIHIII

nsigned sntegerF nsigned integers —re stored in the ™omputer in

their ˜—seEtwo formF sf you —re re—ding or writing unsigned integers

in — l—ngu—geD the ™ompiler ™onverts for youD —™™ording to the

form—tting ™onventions of the individu—l l—ngu—geF

n

en unsigned n E˜it num˜ er ™—n represent—nyv—lue from H to P IF

PER porm—tting h—t— „ypes ‚e—ding —n nsigned sntegerX yne metho d of re—ding —n unsigned

integer —s — ˜—seEten v—lue is to ™onsider the ˜its —s ™olumns whose

v—lues —re p owers of twoF „he rightmost @le—st signi™—ntA ˜it is the

H

units ™olumn —nd h—s — weightofP D or IF qoing tow—rd the left @the

most signi™—nt ˜itAD the ™olumns h—ve progressively gre—ter weightX

H I P n EI

P DP DP D FFF P F „he de™im—lE˜—sed v—lue of unsigned ˜in—ry

num˜ ers is ™omputed ˜ymultiplying the v—lue in e—™h ™olumn ˜y the

weight of the ™olumnD —nd then —dding —ll the resultsF en unsigned

H Q T

integer represented with ones in the P DP D —nd P ™olumns —nd zeros

in —ll the other ™olumns would ˜ e ™omputed —s followsX

H Q T

IB@P A C IB@ P A C IB@P A a UQF

‡riting —n nsigned sntegerX yne metho d of m—nu—lly determining

the unsigned integer represent—tion of — ˜—seEten v—lue is to use

su™™essive su˜tr—™tionF por ex—mpleD the l—rgest p ower of P th—t

T

is less th—n or equ—l to the v—lue of de™im—lE˜—se UQ is P D or TRF

ƒu˜tr—™ting TR from UQ le—ves — rem—inder of WF „he l—rgest p ower of

Q

P th—t is less or equ—l th—n W is P D or VF ƒu˜tr—™ting V from W le—ves

— rem—inder of IF „he only p ower of P th—t is less th—n or equ—l to

H

IisP D or IF „his le—ves — rem—inder of HD so the ™omput—tion is

H Q

nishedF „husD UQ is represented in ˜in—ry with — I in the P D the P D

T

—nd the P ™olumns —nd — zero in —ll the othersF

ƒigned sntegerF ƒigned integers —re stored in the ™omputer in twos

™omplement formF sf you —re re—ding or writing signed integers in —

l—ngu—geD the ™ompiler ™onverts for youD —™™ording to the form—tting

™onventions of the individu—l l—ngu—geF

e signed n E˜it integer in twos ™omplement form ™—n represent—ny

n I n I

v—lue from @P AtoCP IF

‡hen the n E˜it p ositiv e integer i is —dded to its n E˜it integer

neg—tive @™omplementAD i D —nd ˜ oth —re in twos ™omplement formD

the result is —lw—ys —n n E˜it zeroF

‚e—ding — ƒigned sntegerX „he ™omputer represents ˜ oth p ositiv e

—nd neg—tive num˜ ers in twos ™omplement form mu™h the s—me

w—y th—t it would represent —n unsigned integerX ˜ eginning —t

the rightmost @le—st signi™—nt ˜itA —nd going tow—rd the leftD the

H I P n I

™olumns h—ve progressively gre—ter weightX P DP DP DFFFP F „he

only dieren™e is th—t the most signi™—nt ˜it of — twos ™omplement

n I

num˜er is neg—tive F „h—t isD it h—s — weightof @P AF

„o m—nu—lly ™onvert — signed integer in twos ™omplement form to

— ˜—seEten integerD you ™—n use the ™olumn metho d expl—ined in

nsigned sntegersD —˜ oveF roweverD you give the leftmost ™olumn of

n I

—twos ™omplementnum˜er — weightof @P AF

porm—tting h—t— „ypes PES sn the ex—mple ˜ elowD this metho d is used to interpret the signed

˜in—ry integers HIHIHIHI —nd IHIHIHIHD written in twos ™omplement

formD —s de™im—lE˜—sed integersX

@HIHIHIHIA a the sum ofX @IHIHIHIHA a the sum ofX

˜—se P ˜—se P

H H

@I x P A a I @H x P A a H

I I

@H x P A a H @I x P A a P

P P

@I x P A a R @H x P A a H

Q Q

@H x P A a H @I x P A a V

R R

@I x P A a IT @H x P A a H

S S

@H x P A a H @I x P A a QP

T T

@I x P A a TR @H x P A a H

U U

@H x @P AA a H @I x @P AA a IPV

@HIHIHIHIA a VS —nd @IHIHIHIHA a VT

˜—se P ˜—se IH ˜—se P ˜—se IH

‡riting — ƒigned sntegerX gonverting — signed ˜—seEten num˜er to

twos ™omplement form is not di™ultF

‰ou ™—n represent the p ositive signed integers just —s expl—ined in

nsigned sntegersD —˜ oveF

‰ou ™—n represent — neg—tive integer qui™kly —nd e—sily using the

follo wing te™hniqueD whi™h t—kes —dv—nt—ge of the prop erties of ˜in—ry

num˜ ersX pirstD ignoring the signD represent the v—lue —s —n unsigned

˜in—ry integerF xextD reverse —ll the Hs —nd IsF pin—llyD —dd I to the

resultF „husD the twos ™omplement of IHIHIHIH is @HIHIHIHI C IAD or

HIHIHIIHF

‰ou ™—n ™he™kyour ™onversion ˜y —dding the p ositiv e —nd neg—tive

num˜ ers @in twos ™omplement formA to see if they tot—l zeroF prom

the ex—mple —˜ oveD noti™e th—t —dding the VE˜it integer IHIHIHIH

to its twos ™omplementD HIHIHIIHD yields — WE˜it resultD IHHHHHHHHF

roweverD the system denes the result typ e to ˜ e VE˜it integer —nd

re™ognizes only the V zerosD so the result is zeroF

PET porm—tting h—t— „ypes pigure PEQ shows ˜it form—ts for the QPE˜it integer typ eF

pigure PEQF fit porm—tX QPEfit snteger

‚e—l

e re—l num˜er is — v—lue in the set of zero —nd the p ositiveor

neg—tive r—tion—l num˜ ersF ƒigned integers —nd fr—™tions —re

in™ludedD —lthough fr—™tions m—y ˜ e —pproxim—tedF sm—gin—ry

—nd ™omplex num˜ ers —re not in™luded in the set of re—l num˜ ersD

—lthough highElevel l—ngu—ges m—yh—ve ™onstru™ts for storing —nd

working with themF

„he re—l d—t— typ e is — useful form for representing very l—rge or

sm—ll v—luesF ƒp e™i—l form—ts —re reserved to represent zeroD innityD

—nd x—x @not — num˜ erAF

‚e—l d—t— typ e represents re—l num˜ ers ˜y using — typ e of

o—tingEp ointD or s™ienti™D not—tionF sn this not—tionD you gener—lly

express — very l—rge or very sm—ll num˜ er —s — fr—™tion multiplied

˜y—power of the num˜ er ˜—seF por ex—mpleD the ˜—seEten

R

num˜ er FHHHHPS ™ould ˜ e expressed —s CFPS B IH „he gener—l

o—tingEp ointD or s™ienti™ not—tionD form isX

ƒ p B @f BB ƒ iA

f e

whereX ƒ is the sign @C or A of the num˜ erF

f

p is the fr—™tion or m—ntiss—F

B is the sym˜ ol for multipli™—tionF

f the ˜—se is represented —s —n integerF

BB is the sym˜ ol for exp onenti—tionF

ƒ is the sign @C or A of the exp onentF

e

i the exp onentor™h—r—™teristi™ is

represented —s —n integerF

porm—tting h—t— „ypes PEU sn this m—nu—lD —ssume —ll represent—tions of o—tingEp oint re—l

xote

num˜ ers use —n integer ˜—se of IH @de™im—lE˜—sedD or ˜—seEtenA unless

otherwise indi™—tedF sntern—llyD the ™omputer uses — ˜—se of two @is

˜in—ryE˜—sedAD —nd the ™onversion is —pproxim—teF

‰ou ™—n represent re—l num˜ ers four w—ysF ‰ou ™—n ™ho ose either

in siii or r€QHHH form—t —nd use either singleEpre™ision or

dou˜leEpre™ision sizeF

siii or r€QHHH porm—tF w€i ˆv re™ognizes two form—ts for

storing o—tingEp oint re—l num˜ ersX siii —nd r€QHHHF €rogr—ms

™ompiled in xw use siii —s the def—ultF €rogr—ms ™ompiled in

gw use r€QHHHD the w€i ˆv emul—tion of the w€i †Gi system

o—tingEp oint form—tF xw progr—ms —™™essing r€QHHH d—t— must

either sp e™ify — sp e™i—l ™ompiler option or ™onvert gw d—t— to xw

˜ efore op er—tionsF

ƒingle or hou˜le €re™isionF ‰ou ™—n represent singleEpre™ision

@QPE˜itA or dou˜leEpre™ision @TRE˜itA re—l num˜ ers in ˜ oth siii —nd

r€QHHH not—tionF „—˜le PEP shows — summ—ry of the r—nge —nd

—™™ur—™y of e—™hF

„—˜le PEPF ‚—nges —nd e™™ur—™ies for plo—tingE€oint ‚e—l xum˜ers

siii r€QHHH

ƒingle pre™isionX

e™™ur—™y @in de™im—l digitsA UFP TFW

‚—nge QFRiQV to IFRi RS IFPUiUU to VFTi UV

H H

CIFRi RS to CQFRiQV CVFTi UV to CIFPiUU

hou˜le pre™isionX

e™™ur—™y @in de™im—l digitsA ISFW ITFS

‚—nge IFViQHV to RFWi QPR IFPiUU to VFTi UV

H H

CRFWi QPR to CIFViQHV CVFTi UV to CIFPiUU

xoteX †—lues in this t—˜le —re roundedF

pields of — ‚e—l xum˜erF sn w€i ˆv form—tD re—l num˜ ers h—ve

three eldsX

ƒignF

w—ntiss—F

ixp onentF

hierent represent—tions of re—l num˜ ers h—ve the three elds —ligned

on dierent ˜ ound—riesF sn —ll form—tsD the sign eld is the rst ˜itD

the m—ntiss— is in norm—lized formD —nd the exp onent is ˜i—sedF

„he sign eldD ˜it @HXIAD is H if num˜ er is p ositiv eD I if neg—tiveF

PEV porm—tting h—t— „ypes w—ntiss—s —re represented in norm—lized formF „h—t isD the

le—ding one is stripp ed —nd ˜in—ry p oint is not expli™itly

expressedF i—™h expressed m—ntiss—D thenD h—s —n implied le—ding

one —nd ˜in—ry p ointF por ex—mpleD — m—ntiss— represented

˜y IHIHIHIHIHIHIHIHIHIHIHI is interpreted —s the v—lue

IFIHIHIHIHIHIHIHIHIHIHIHIF

„he exp onents of re—l num˜ ers —re ˜i—sedF „his me—ns th—t ˜ oth

p ositiv e —nd neg—tive true exp onents —re represented using only

unsigned ˜in—ry integersF „he ˜i—s —mountD or ex™essD is the

dieren™e ˜ etween the true exp onent —nd the represented exp onentF

„he neg—tive true exp onents ™orresp ond to the lower r—nge of the

represented exp onentsF „he p ositiv e true exp onents ™orresp ond to

the upp er r—nge of the represented exp onentsF „he true exp onent

zero ™orresp onds to the midp oint in the r—nge of the represented

exp onentsF por ex—mpleD ™onsider —n exp onent eld n ˜its long where

the true exp onentis„ D the represented exp onentisi D —nd the ˜i—s

„ i ˜ i „ C˜

is ˜ Fpor —ny re—l num˜er x D thenD x a x D —nd x a x F

ixp onent elds of —ll zeros or —ll ones —re reservedF sf the exp onent

of — o—tingEp ointnum˜ er is —ll zeros —nd the m—ntiss— is zeroD the

num˜ er is reg—rded —s zeroF sf the exp onent of — o—tingEp oint

num˜ er is —ll zeros —nd the m—ntiss— is not —ll zeroD the num˜er is

reg—rded —s denorm—lizedF sf the exp onent of — o—tingEp ointnum˜er

is —ll ones —nd the m—ntiss— is zeroD the num˜ er is reg—rded —s —

signed innityF sf the exp onent is —ll ones —nd the m—ntiss— is not

zeroD the interpret—tion is x—x @xotE—Exum˜ erD undenedAF

sf —ny pro ™ess —ttempts to op er—te on —n innity or — x—xD — system

tr—p m—y o ™™ur —nd d—t— m—y ˜ e ™orruptedF snv—lid op er—tion is

sign—led when the sour™e is — sign—ling or — quiet x—xF „he result is

the destin—tion form—t9s l—rgest nite num˜ er with the sign of the

sour™eF

eny op er—tion th—t involves — sign—ling x—x or inv—lid op er—tion

returns — quiet x—x —s the result when no tr—p o ™™urs —nd —

o—tingEp oint result is to ˜ e deliveredF sf —n op er—tion is using one

or two quiet x—xs —s inputD it sign—ls no ex™eptionY howeverD if —

o—tingEp oint result is to ˜ e deliveredD — quiet x—x is returned th—t

is the s—me —s one of the input x—xsF

siii ‚e—l xum˜er porm—tF siii num˜ ers ™onform to the form—t

set up ˜y the snstitute of ile™tri™—l —nd ile™troni™s ingineers

—nd the emeri™—n x—tion—l ƒt—nd—rds snstitute @std USREIWVSAF

ƒingleEpre™ision num˜ ers —re one xw wordD —ligned on QPE˜it

˜ ound—riesF hou˜le pre™ision num˜ ers —re twoxwwordsD —ligned on

TRE˜it ˜ ound—riesF

sn this m—nu—lD ˜it elds —re des™ri˜ ed —s @ ˜it X length AD where ˜it is

xote

the rst ˜it in the eld —nd length is the num˜ er of ™onse™utive ˜its

in the eldF por ex—mpleD ’˜its @IIXQA4 refers to ˜its IID IPD —nd IQF

fit H is the most signi™—nt ˜itF

porm—tting h—t— „ypes PEW siii num˜ ers in w€i o—tingEp oint not—tion ™ont—in three eldsX

ƒignX „he sign eld is ˜it @HXIAD the rst ˜it of the rst

wordF e v—lue of H indi™—tes the num˜ er is p ositiv eD

—nd — v—lue of I indi™—tes the num˜ er is neg—tiveF

„he sign ˜it is the only dieren™e ˜ etween — re—l

num˜er v—lue —nd its neg—tiveF

ixp onentX „he singleEpre™ision exp onent eld is ˜its @IXVA

of the rst xw wordD —nd is ˜i—sed ˜y IPUF „he

dou˜leEpre™ision exp onent eld is ˜its @IXIIA of the

rst xw wordD —nd is ˜i—sed ˜y IHPQF

w—ntiss—X „he singleEpre™ision m—ntiss— eld is ˜its @WXPQAF „he

dou˜leEpre™ision m—ntiss— eld is ˜its @IPXSPAF w€i

stores the m—ntiss— —s norm—lized d—t— represented

—s — ˜in—ry num˜ er of PQ ˜its for the singleEpre™ision

form—tD —nd SP ˜itsD with —n —ssumed IF le—ding the

eldF

e previous se™tionD ’pields of — ‚e—l xum˜ er4D expl—ins ˜i—sed

exp onent —nd norm—lized m—ntiss—F

siii gonversion ix—mpleF gonsider ™onverting —n siii

singleEpre™ision o—tingEp ointnum˜er into — ˜—seEten num˜ er using

this formul—X

sign ixp onent IPU PQ

@EIA BP B @IFH C w—ntiss— C P A

whereX ƒign fit @HXIAD the sign eldD is H if

num˜ er is p ositiv eD I if neg—tiveF

B is the sym˜ ol for multipli™—tionF

ixp onent fits @IXVAD the exp onent eldD is the

˜i—sed represent—tion of the true

exp onentF

C is the sym˜ ol for —dditionF

w—ntiss— fits @WXPQA is the norm—lized form of

the m—ntiss—D or fr—™tionF

PQ

is —dded for roundingF

P

PEIH porm—tting h—t— „ypes „he @˜—seEtenA o—tingEp ointnum˜ er IHHFHH @hex—de™im—l 6RP™VHHHHA

is represented —s H IHHHHIHI IHHIHHHHHHHHHHHHHHHHHHHF sing the

formul—D we o˜t—in the ™orre™t result —s followsX

„—˜le PEQF

hetermining the f—seE„en iquiv—lent of —n siii ‚e—l

xum˜er

ƒ@ignA i@xp onentA w@—ntiss—A

a H IHHHHIHI IHHIHHHHHHHHHHHHHHHHHHH

ƒ iEIPU PQ

@IA BP B@IFHCwCP A

H IQQEIPU PQ

a I BP B IFHCWGIT CP

a I BTR B IFH C HFSTPS C FHHHHHHIIWPHWPW

a TR B IFSTPSHHIIHPHWPW

a IHH

pigure PER shows the ˜it form—t for o—tingEp oint re—l num˜ ers in

siii singleEpre™ision form—tF

pigure PERF

fit porm—tX ƒingleE€re™ision ‚e—l in siii plo—tingE€oint xot—tion

porm—tting h—t— „ypes PEII pigure PES shows the siii re—l num˜ er dou˜leEpre™ision ˜it form—tF

pigure PESF

fit porm—tX hou˜leE€re™ision ‚e—l in siii plo—tingE€oint xot—tion

r€QHHH ‚e—l xum˜er porm—tF ƒingleEpre™ision r€QHHH re—l num˜ ers

—re QP ˜its @P gw wordsAD —nd dou˜leEpre™ision —re TR ˜its @R gw

wordsAF ‡hen stored in memoryD r€QHHH re—ls —re —ligned on gw

word ˜ ound—riesF

sn this m—nu—lD ˜it elds —re des™ri˜ ed —s @ ˜it X length AD where ˜it is

xote

the rst ˜it in the eld —nd length is the num˜ er of ™onse™utive ˜its

in the eldF por ex—mpleD ’˜its @IIXQA4 refers to ˜its IID IPD —nd IQF

‚e—l num˜ ers in r€QHHH o—tingEp oint not—tion ™ont—in three eldsX

ƒignX „he sign eld is ˜it @HXIA of the rst wordF e v—lue

of H indi™—tes the num˜ er is p ositiv e —nd — v—lue of

I indi™—tes the num˜ er is neg—tiveF „he sign is the

only dieren™e ˜ etween — re—l num˜er v—lue —nd its

neg—tiveF

ixp onentX „he exp onent eld is ˜its @IXWA of the rst gw

word in the singleEpre™ision —nd dou˜leEpre™ision

form—tF „he represented exp onent r—nge is H to SIIF

ixp onents —re ˜i—sed ˜y CPSTF

w—ntiss—X „he m—ntiss— eld is ˜its @IHXTA of the rst gw

word —nd ˜its @HXITA of the other wordsF w€i

stores the m—ntiss— —s norm—lized d—t— of PP ˜its

for the singleEpre™ision form—tD —nd SR ˜its for the

dou˜leEpre™isionD with —n —sssumed IF le—ding the

eldF

e previous se™tionD ’pields of — ‚e—l xum˜ er4D expl—ins ˜i—sed

exp onent —nd norm—lized m—ntiss—F

PEIP porm—tting h—t— „ypes sn this m—nu—lD ˜it elds —re des™ri˜ ed —s @ ˜it X length AD where ˜it is

xote

the rst ˜it in the eld —nd length is the num˜ er of ™onse™utive ˜its

in the eldF por ex—mpleD ’˜its @IIXQA4 refers to ˜its IID IPD —nd IQF

fit H is the most signi™—nt ˜itF

pigure PET shows the r€QHHH re—l num˜ er singleEpre™ision ˜it form—tF

pigure PETF

fit porm—tX ƒingleE€re™ision ‚e—l in r€QHHH plo—tingEpoint xot—tion

porm—tting h—t— „ypes PEIQ pigure PEU shows the r€QHHH re—l num˜ er dou˜leEpre™ision ˜it

form—tF

pigure PEUF

fit porm—tX hou˜leE€re™ision ‚e—l in r€QHHH plo—tingEpoint xot—tion

he™im—ls

w€i † h—s system mi™ro ™o de instru™tions to h—ndle p—™ked

de™im—lsF por ™omp—ti˜ilityD w€i ˆv h—s ™ompiler li˜r—ry

pro ™edures th—t run in xw —nd emul—te the w€i † instru™tion setF

sn w€i ˆvD three l—ngu—ges use de™im—l typ esF gyfyv —nd ‚€q

use p—™ked or unp—™ked de™im—lsF feƒsg h—s its own typ eD the

o—tingEp oint de™im—lF

sn the de™im—l typ esD num˜ ers —re represented de™im—l digit ˜y

de™im—l digitF „he individu—l digits of the de™im—l num˜ er —re e—™h

represented in — fgh @fin—ry go ded he™im—lA ni˜˜leF i—™h ni˜˜le is

four ˜its longF

PEIR porm—tting h—t— „ypes pigure PEV shows the ˜it form—t for e—™h fgh ni˜˜le p ortion of —

de™im—lF

pigure PEVF fit porm—tX fgh xi˜˜le

€—™ked he™im—l porm—tF €—™ked de™im—ls representnum˜ ers with

fgh @fin—ry go ded he™im—lA ni˜˜lesF sn p—™ked de™im—lsD e—™h

de™im—l digit of the num˜ er is individu—lly represented ˜y — RE˜it

fghF

he™im—ls —re —lw—ys —n even num˜ er of ni˜˜les longF

pigure PEVD—˜oveD shows the ˜it form—t for e—™h fgh ni˜˜le p ortion

of — de™im—lF

„he rightmost @le—st signi™—ntA ni˜˜le is for the signF „here —re

three dened ni˜˜le ™om˜in—tions for the sign ni˜˜leF „he three

dened ™o des —reX

hex—de™im—l g @IIHHA for p ositive

hex—de™im—l h @IIHIA for neg—tive

hex—de™im—l p @IIIIA for unsigned

ƒin™e e—™h of the other ni˜˜les represents the de™im—l digits H

through WD the v—lid ni˜˜le ™om˜in—tions —re HHHH through IHHI for

—ll ˜ut the l—st ni˜˜leF

por ex—mpleD to represent SPDIWR —s — p—™ked de™im—l typ eD you

would use one ni˜˜le for e—™h of the ve digits —nd @the l—stA one for

the signX

HIHI HHIH HHHI IHHI HIHH IIHI

S P I W R haneg—tive

sn gyfyvD the €sg„ ‚i @€sgA ™l—use sp e™ies the p osition of the

de™im—l p ointF por ex—mpleD the €sg ™l—use WWW†WWD sp e™ies three

digits will ˜ e followed ˜y —n implied de™im—l p oint —nd two more

digitsF sf you p—ss the digits IPQRS to — v—ri—˜le dened with this

€sg ™l—useD its v—lue would ˜ e IPQFRSF

porm—tting h—t— „ypes PEIS sn gyfyv —nd ‚€qD using p—™ked de™im—l will pro˜—˜ly m—keyour

progr—m more e™ient th—n using unp—™kedF sf you do use unp—™ked

de™im—lD the ™ompiler usu—lly ™onverts to p—™ked for ™—l™ul—tionsF

pigure PEW shows the ˜it form—t for the p—™ked de™im—lF

pigure PEWF fit porm—tX €—™ked he™im—l

np—™ked he™im—l porm—tF gyfyv —nd ‚€q representnum˜ ers

with p—™ked —nd unp—™ked de™im—l typ esF por —n unp—™ked de™im—lD

e—™h de™im—l digit is one ˜yte longF np—™ked de™im—ls —re eƒgs s

™h—r—™tersD interpreted ˜y — ™orresp onden™e ™o deF „he ˜it form—t is

the eƒgs s ™h—r—™ter form—t in pigure PEIFpor more inform—tionD see

the notes on gyfyv —nd ‚€qD ’porm—tting h—t— in €rogr—ms4D

l—ter in this ™h—pterF

plo—tingE€oint he™im—l porm—tF r€ fusiness feƒsg represents

de™im—l —nd short de™im—l typ es in o—tingEp oint de™im—l not—tionF

„he o—tingEp oint de™im—l form is simil—r to the i not—tion used to

representvery sm—ll or very l—rge num˜ ersD —s when QFP i PU is used

PU

to represent the v—lue QFP x IH F „he feƒsg num˜ er is norm—lized

@see ˜ elowAF

e de™im—l in r€ fusiness feƒsgGˆv is TR ˜its longY — short de™im—l

is QP ˜its longF „—˜le PER D ˜ elowD shows — summ—ry of the r—nge —nd

—™™ur—™y of e—™hF

PEIT porm—tting h—t— „ypes „—˜le PERF ‚—nge —nd €re™ision for plo—tingE€oint he™im—ls

feƒsg he™im—l feƒsg ƒhort he™im—l

€re™isionX IP digits T digits

‚—ngeX WFWWWWWWWWWWWiSII through IFHHHHHHHHHHHi SII WFWWWWWiTQ through IFHHHHH iTQ

H H

IFHHHHHHHHHHHi SII through WFWWWWWWWWWWWiSII IFHHHHHi TQ through WFWWWWiTQ

„he represent—tion of the v—lue zero is — sp e™i—l ™—seF „o represent

the v—lue zeroD set —ll the ˜its to zeroF ƒin™e the num˜er is

norm—lizedD it is —ssumed th—t the m—ntiss— never ˜ egins with — zero

unless the v—lue of zero is intendedF

pields of feƒsg de™im—lsX plo—tingEp oint de™im—ls h—ve three eldsX

ixp onentF

w—ntiss—F

ƒignF

„he exp onent eld ™ont—ins — signed integerD represented in twos

™omplement formF „he de™im—l exp onent eld is the rst IH ˜itsD ˜its

@HXIHAD —nd r—nges from SII to CSIIF „he short de™im—l exp onent

eld is the rst seven ˜its @˜its HXUA —nd r—nges from TQ to CTQF

sn this m—nu—lD ˜it elds —re des™ri˜ ed —s @ ˜it X length AD where ˜it is

xote

the rst ˜it in the eld —nd length is the num˜ er of ™onse™utive ˜its

in the eldF por ex—mpleD ’˜its @IIXQA4 refers to ˜its IID IPD —nd IQF

fit H is the most signi™—nt ˜itF

sn the m—ntiss— eldD e—™h de™im—l digit of the num˜ er is individu—lly

represented ˜y — fgh @fin—ry go ded he™im—lA ni˜˜leF i—™h ni˜˜le

is four ˜its longF @ƒee pigure PEV FA ƒin™e e—™h ni˜˜le in this eld

represents the de™im—l digits H through WD the v—lid m—ntiss— ni˜˜le

™om˜in—tions —re HHHH through IHHIF

„he num˜ er is norm—lizedF „h—t isD

„he de™im—l p oint is impliedD or —ssumed to ˜ elongD immedi—tely

following the rst fgh digit of the m—ntiss— eldF

„he rst fgh of the m—ntiss— is never zeroD unless you intend to

represent the num˜ er zeroF

„he m—ntiss— eld of — TRE˜it de™im—l is ˜its @IPXRVAF st h—s the

™—p—™ity for IP digitsD e—™h represented in — RE˜it ni˜˜leF „he

m—ntiss— eld of — QPE˜it de™im—l is ˜its @VXPRAF st h—s the ™—p—™ity

for T digitsD e—™h represented in — RE˜it ni˜˜leF

porm—tting h—t— „ypes PEIU „he sign eld of — TRE˜it de™im—l is ˜its @THXRAD whi™h —re the four

le—st signi™—nt ˜itsD or the le—st signi™—nt fgh ni˜˜leF „he

hex—de™im—l v—lue g @IIHHA in the sign ni˜˜le indi™—tes the num˜er is

p ositiv eD —nd h @IIHIA indi™—tes the num˜ er is neg—tiveF

„he sign eld of — QPE˜it short de™im—l is the seventh ˜itD ˜it @UXIAF e

v—lue of H in the sign ˜it indi™—tes the num˜ er is p ositiv eD —nd — v—lue

of I indi™—tes the num˜ er is neg—tiveF

pigure PEIH shows the ˜it form—t for the o—tingEp oint de™im—lF

pigure PEIHF fit porm—tX plo—tingE€oint he™im—l

pigure PEII shows the ˜it form—t for the short o—tingEp oint de™im—lF

pigure PEIIF fit porm—tX ƒhort plo—tingE€oint he™im—l

PEIV porm—tting h—t— „ypes „he ™orre™t form—t for d—t— in — progr—m dep ends on the

porm—tting h—t— in

progr—mming environment —nd the progr—mming l—ngu—geF

€rogr—ms

w€i ˆv h—s two progr—mming environmentsX xw —nd gwF xw is

xw —nd gw

˜—sed on — QPE˜it wordF gw emul—tes w€i †Y ˜ oth —re ˜—sed on —

€rogr—mming

ITE˜it wordF sn xwD d—t— typ es —re —ligned on QPE˜it ˜ ound—riesD ˜y

invironments

def—ultD to improve p erform—n™eF w—ny stru™tures th—t —re —ligned on

QPE˜it ˜ ound—ries in w€i ˆv xw —re —ligned on ITE˜it ˜ ound—ries

in w€i †GiF

‰ou m—yh—ve to pl—n for —™™ur—te ™onversion in mixedEmo de

—ppli™—tionsF gomm—nds —nd ™ompiler options —re provided ˜y

supp orted l—ngu—ges to ™ontrol —lignmentF

por ex—mpleD in gyfyv you ™—n ™ho ose ™ompiler options for

QPE˜it xw st—nd—rd or ITE˜it gw st—nd—rd ˜ ound—riesF gho ose

gevvevsqxih or gevvevsqxih‘IT“ to sp e™ify —lignment in ™—lling

progr—msD —nd ™ho ose vsxuevvsqxih —nd vsxuevvsqxih‘IT“ to

sp e™ify progr—m def—ult —lignmentF

sn €—s™—l —nd py‚„‚exD ™ompiler options r€QHHH QP —nd

r€QHHH IT sp e™ify xw or gw st—nd—rd —lignment —nd re—l num˜er

form—tF por ex—mpleD ™ho osing r€QHHH IT will ™—use the ™ompiler

to —lign d—t— in re™ords on ITE˜it gw st—nd—rd ˜ ound—ries inste—d

of QPE˜it xw st—nd—rd ˜ ound—riesD —nd to form—t o—ting p oint re—l

num˜ ers in r€QHHH st—nd—rd not—tion inste—d of siii xw not—tion

th—t is st—nd—rd in xwF

por —n —ppli™—tion to use ˜ oth xw —nd gw —ligned d—t— lesD you

™ould sp e™ify the progr—m re™ord denitions to for™e —lignmenton

— stru™tureE˜yEstru™ture ˜—sisF por ex—mpleD syn™IT or syn™QP in

gyfyv D or 6—lignment6 in €—s™—l do es thisF

sn this m—nu—lD —ssume th—t d—t— typ es —re w€i ˆv x—tive wo de

d—t— typ es —nd xw —lignedF sf gw is me—ntD gw will ˜ e sp e™i™—lly

mentionedF

porm—tting h—t— „ypes PEIW „—˜le PES D followingD shows ™orresp onding d—t— typ es in the dierent

€rogr—mming

xw l—ngu—gesX

v—ngu—ges

„—˜le PESF

gorresponden™e of h—t— „ypes e™ross v—ngu—gesX

sntrinsi™sD feƒsgD —nd g

h—t— „yp e sntrinsi™s r€ fusiness r€ gGˆv

feƒsgGˆv

gh—r—™ter g 6 gre‚ or

dimension —s xƒsqxih

I™h—r—™ter gre‚

sntegerX IT xGe xƒsqxih

ITE˜it ƒry‚„ sx„

unsigned

sntegerX QP xGe xƒsqxih sx„

QPE˜it or xƒsqxih

unsigned vyxq sx„

sntegerX TR xGe xGe

TRE˜it

unsigned

sntegerX sIT ƒry‚„sx„ ƒry‚„ sx„

ITE˜it or su˜r—nge

signed ‘ QPUTVFFQPUTU“

sntegerX sQP sx„iqi‚ sx„ or ix w

QPE˜it

signed

sntegerX sTR xGe xGe

TRE˜it

signed

‚e—l ‚QP ƒry‚„‚iev pvye„

QPE˜it

@ƒingleE

€re™isionA

‚e—l ‚TR ‚iev hy fvi

TRE˜it

@hou˜leE

€re™isionA

he™im—lX €—™ked xGe xGe xGe

he™im—lX xGe xGe xGe

np—™ked

he™im—lX xGe he™im—l or xGe

plo—tingE ƒhort he™im—l

€oint

PEPH porm—tting h—t— „ypes „—˜le PETF

gorresponden™e of h—t— „ypes e™ross v—ngu—gesX

gyfyvD py‚„‚exD —nd €—s™—l

h—t— „yp e r€ gyfyv r€ py‚„‚ex r€ €—s™—lGˆv

s sGˆv UUGˆv

gh—r—™ter hsƒ€ve‰ gre‚eg„i‚ gre‚eg„i‚

or group item

sntegerX €sg ƒW to vyqsgev y‚ HFFTSSQS

ITE˜it €sg ƒW@RA vyqsgevBP or —ny ITE˜it

unsigned gyw€ ƒ f‚exqi

sntegerX €sg ƒW@SA to vyqsgev y‚ eny QPE˜it

QPE˜it €sg ƒW@WA vyqsgevBR su˜r—nge

unsigned gyw€

sntegerX €sg ƒW@IHA to xGe xGe

TRE˜it €sg ƒW@IVA

unsigned gyw€

sntegerX €sg ƒW to sx„iqi‚ or ƒry‚„sx„ or

ITE˜it €sg ƒW@RA sx„iqi‚ BP —ny ITE˜it

signed gyw€ su˜r—nge

sntegerX €sg ƒW@SA to sx„iqi‚ or sx„iqi‚ or

QPE˜it €sg ƒW@WA sx„iqi‚ BR —ny QPE˜it

signed gyw€ su˜r—nge

sntegerX €sg ƒW@IHA to xGe xGe

TRE˜it €sg ƒW@IVA

signed gyw€

‚e—l xGe ‚iev or ‚iev

QPE˜it ‚ievBR

@ƒingleE

€re™isionA

‚e—l xGe hy fvi vyxq‚iev

TRE˜it €‚igsƒsyx

@hou˜leE or ‚ievBV

€re™isionA

he™im—lX €—™ked gyw€EQ xGe xGe

he™im—lX hsƒ€ve‰ xGe xGe

np—™ked

he™im—lX xGe xGe xGe

plo—tingE€oint

porm—tting h—t— „ypes PEPI v—ngu—ge xotes

„he following notes rel—te to the l—ngu—geEsp e™i™ inform—tion in

the —˜ ove t—˜leF por further inform—tionD ™onsult the m—nu—l for the

individu—l l—ngu—gesF

sntrinsi™sF sntrinsi™ p—r—meters m—y require d—t— of typ e —ddress

@ dQP —nd dTR AF eddress is — QPE˜it or TRE˜it integer th—t represents

— lo ™—tion in memoryF „he system re™ognizes ˜y the ™ontext of the

™omm—nd th—t it is to —™™ess or op er—te on the memory ™ell —t th—t

—ddressF

sn this m—nu—lD ˜it elds —re des™ri˜ ed —s @ ˜it X length AD where ˜it is

xote

the rst ˜it in the eld —nd length is the num˜ er of ™onse™utive ˜its

in the eldF por ex—mpleD ’˜its @IIXQA4 refers to ˜its IID IPD —nd IQF

fit H is the most signi™—nt ˜itF

fo ole—ns @ f A —re typi™—lly one ˜yte longF ynly the rightmost ˜itD ˜it

@UXIAD is interpretedF sf this ˜it is o dd @usu—lly IAD the logi™—l v—lue

is trueY if it is even @usu—lly HAD the ˜ o ole—n v—lue is f—lseF @ƒee the

notes for fo ole—ns in r€ gGˆvAF

‚e™ords @intrinsi™ typ e ‚ig A —nd —rr—ys @ e A —re sets of rel—ted d—t—F

i—™h pie™e of the d—t— is in — eldD —nd the elds —re ™onne™tedF „he

size —nd typ e of the elds —re sp e™ied when the —rr—y or re™ord is

™re—tedF

„he elds in — re™ord ™—n v—ry in size —nd ™—n ™ont—in v—rious typ esF

„he elds in —n —rr—yD ™—lled the elements of the —rr—yD —re —ll the

s—me size —nd —ll ™ont—in the s—me d—t— typ esF err—ys —re often

dened in the supp orted l—ngu—ges with — not—tion like ‘ l˜Xu˜ “or

@ l˜FFu˜ AD where l˜ is the lower ˜ ound of the —rr—yD —nd u˜ is the upp er

˜ oundF

err—ys —nd re™ords —re ™omplex d—t— typ es th—t ™—n themselves ˜ e

used to ˜uild more ™omplex d—t— typ esD su™h —s —n —rr—y of re™ordsF

por more inform—tion —˜ out intrinsi™ d—t— typ esD refer to w€i †Gi

sntrinsi™s ‚eferen™e w—nu—l @QPHQQEWHHHUAF

r€ fusiness feƒsgGˆvF gompiler li˜r—ry routines —re designed to

work with the p—™ked de™im—lD not the feƒsg o—tingEp oint de™im—lF

„he feƒsg de™im—l ˜it form—t is expl—ined in the previous se™tion

on de™im—ls in this ™h—pterF

por more inform—tion —˜ out r€ fusiness feƒsgGˆv d—t— typ esD

refer to r€ fusiness feƒsgGˆv ‚eferen™e w—nu—l @QPUISEWHHHIAF

r€ gGˆvF r€ gGˆv not—tes QPE˜it —ddresses with B n—me —nd TRE˜it

—ddresses with ” n—me D where n—me is the typ e of the d—t— ˜ eing

—ddressedF

sn r€ gGˆv — fo ole—n is stored —s —ny™h—r—™ter typ eY v—lue of zero

represents f—lseD —nd —ny nonEzero is interpreted —s trueF

PEPP porm—tting h—t— „ypes „he g l—ngu—ge h—s ™ert—in d—t— ™onversion ™onventions for

p—r—meter p—ssingF st requires th—t flo—ts ˜ e ™onverted to dou˜les D

th—t ™h—rs ˜ e ™onverted to ints D —nd th—t —rr—ys of typ e „ ˜e

™onverted to pointers to typ e „ Fporm—l p—r—meters —re —™tu—lly

de™l—red —s the ’™onverted4 typ eF por ex—mpleD if you de™l—re —

form—l p—r—meter —s —n —rr—y of typ e „ D it is —™tu—lly de™l—red —s —

pointer to typ e „ F

por more inform—tion —˜ out r€ gGˆv d—t— typ esD refer to r€ g

‚eferen™e w—nu—l @WPRQREWHHHIA —nd r€ gGˆv ‚eferen™e w—nu—l

ƒupplement @QISHTEWHHHIAF

r€ gyfyv ssGˆvF r€ gyfyv s sGˆv integers m—y not ˜ e —n ex—™t

m—t™h when ex™h—nged with other l—ngu—gesF „hey m—t™h in size —nd

you ™—n store d—t— —™ross l—ngu—gesD ˜ut you m—yh—ve di™ulties in

™omput—tion—l op er—tionsF „he gyfyv unsigned integer is dierent

from the €—s™—l integersF gyfyv integers m—y —lso h—ve — sm—ller

r—ngeF @ƒee the se™tion in the next ™h—pter —˜ out ™onverting de™im—ls

to integersFA

sn r€ gyfyv s sGˆvD you use ™l—uses to sp e™ify three things —˜ out

d—t—X ƒsqxD ƒeqiD —nd €sg @€sg„ ‚iAF

„he option—l ƒsqx ™l—use indi™—tes whether — num˜ er will h—ve—n

op er—tion—l sign in nonEst—nd—rd p osition in its represent—tionF

‰ou indi™—te the us—ge of d—t— in the ƒeqi ™l—useF s—ge

is hsƒ€ve‰ @eƒgs s —lph—numeri™ typ eA ˜y def—ultF ƒever—l

gyw€ „e„syxev uses ™—n ˜ e sp e™ied inste—dF

€sg ™l—uses dene typ eD size —nd sym˜ ols to ˜ e inserted into

element—ry expressionsF „he €sg ™l—use sp e™ies the num˜er of

digitsY €sg W@ n A indi™—tes — numeri™ expression n digits longD —nd

€sg ƒW indi™—tes — signed num˜ er one digit longF e letter † in the

€sg ™l—use indi™—tes the p osition to insert the the de™im—l p ointF

@hef—ult is de™im—l rightmostD or integerFA yther sym˜ ols —re used for

pl—™ing su™h insertions —s ™omm— sep—r—torsF

por ex—mpleD to set up — eld with three digits to the left of the

de™im—l —nd two to the rightD you would sp e™ify €sg WWW†WWD or €sg

W@QA†W@PAF

np—™ked he™im—lsX np—™ked de™im—lsD displ—ytyp eD use eƒgs s

—lph—numeri™ represent—tions for num˜ ersF ‚epresent unsigned digits

with the eƒgs s ™h—r—™ters H to WF por signed num˜ ersD use the

follo wing eƒgs s ™h—r—™ter represent—tionsX

f represents CH

vetters e through s represent digits CI through CW

g represents H

vetters t through ‚ represent digits I through W

porm—tting h—t— „ypes PEPQ „he gyfyv num˜ er line for us—ge displ—y unp—™ked signed de™im—l

digits lo oks like thisD thenX

‚  € y x w v u t}{e f g h i p q r s

ECEECEECEECEECEECEECEECEECEE|EECEECEECEECEECEECEECEECEECE

EW EV EU ET ES ER EQ EP EI HCICPCQCRCSCTCUCVCW

por further inform—tionD refer to r€ gyfyv ssGˆv €rogr—mmer9s

quide @QISHHEWHHHPA or gyfyv ss ‚eferen™e w—nu—l @QISHHEWHHHIA

—nd gyfyv ssGˆv ‚eferen™e w—nu—l ƒupplement @QISHHEWHHHSAF

r€ py‚„‚ex UUGˆvF sn r€ py‚„‚ex UUGˆvD vyqsgev —nd

sx„iqi‚ def—ult to QP ˜itsF sing the 6ƒry‚„ ™ompiler option will

™—use the def—ult to ˜ e IT ˜itsF sing BP or BRD howeverD will override

—ny ™ompiler optionsF

por further inform—tionD refer to r€ py‚„‚ex UUGˆv

€rogr—mmer9s quide @QISHIEWHHHPA or r€ py‚„‚ex UUGˆv

‚eferen™e w—nu—l @QISHIEWHHIHAF

r€ €—s™—lGˆvF r€ €—s™—lGˆv re™ognizes QPE˜it —ddresses —s

vygevex‰€„‚ or —ny norm—l p ointer typ eD —nd TRE˜it —ddresses

—s qvyfevex‰€„‚ or —ny p ointer typ e de™l—red with the

6extn—ddr6 ™ompiler dire™tiveF

por further inform—tionD refer to r€ €—s™—l ‚eferen™e w—nu—l

@QISHPEWHHHIAD —nd r€ €—s™—l €rogr—mmer9s quide @QISHPEWHHHPAF

v—ngu—ge inform—tion is in the following m—nu—lsX

r€ fusiness feƒsgGˆv ‚eferen™e w—nu—l @QPUISEWHHHIA

r€ g ‚eferen™e w—nu—l @WPRQREWHHHIA —nd r€ gGˆv ‚eferen™e

w—nu—l ƒupplement @QISHTEWHHHIA

r€ gyfyv ssGˆv €rogr—mmer9s quide @QISHHEWHHHPA

gyfyv ss ‚eferen™e w—nu—l @QISHHEWHHHIA —nd gyfyv ssGˆv

‚eferen™e w—nu—l ƒupplement @QISHHEWHHHSA

r€ py‚„‚ex UUGˆv ‚eferen™e w—nu—l @QISHIEWHHIHA

r€ py‚„‚ex UUGˆv €rogr—mmer9s quide @QISHIEWHHHPA

r€ €—s™—l ‚eferen™e w—nu—l @QISHPEWHHHIA

r€ €—s™—l €rogr—mmer9s quide @QISHPEWHHHPA

PEPR porm—tting h—t— „ypes Q

gonverting h—t— „ypes

„his ™h—pter dis™usses ™onverting e—™h of the system d—t— typ es

des™ri˜ ed in gh—pter P to e—™h of the othersF

h—t— is inform—tion stru™tured in forms th—t the ™omputer is

designed to pro ™essF h—t— ™onversion is tr—nsl—ting th—t inform—tion

into —nother —™™ept—˜le stru™ture without losing me—ningF

sf you p—ss d—t— ˜ etween routines th—t do not use the s—me

typ es or form—tsD you lose me—ning —nd integrityF „he re™eiving

routine m—y not ˜ e —˜le to re—d the d—t— —t —llF st m—y divide

the ˜its it re—ds into the wrong size ™hunksF st m—yinterpret the

—rr—ngement of ˜its ˜y its own form—tting ™onventionsF „he resulting

misinterpret—tion ™ould ™onvey inform—tion you did not intend —nd

giveyou unpredi™t—˜le results in ™omput—tionsF

„o p—ss d—t— ˜ etween routines in dierent l—ngu—gesD you m—y need

€—ssing h—t—

to ™onvert it to m—ke it re—d—˜le —nd to m—int—in its integrityF h—t—

™re—ted in one routine is form—tted —™™ording to the l—ngu—ge typ e

™onventions of th—t routineY if the re™eiving routine divides the input

˜it stre—m in dierent pl—™esD it will not re—d the s—me v—luesF sf

the re™eiving —nd sending routines do not h—ve the s—me denitions

of d—t— typ esD —ny d—t— th—t one routine p—sses to the other will ˜ e

me—ninglessD —nd —ny op er—tion on th—t d—t— will ˜ e unpredi™t—˜leF

yften the progr—mming l—ngu—ge h—s ™omm—nds or ™ompiler

dire™tives the ™onvert or ™o er™e d—t— to the required typ eF ‰ou ™—n

sometimes ™onvert input —nd output d—t— with — ™omm—nd line in —

progr—mF yften —n —ssignment st—tementD like xtype Xa yv—lue or

xtype ayv—lue is su™ientF

ƒometimes — more indire™t ™onversion is ne™ess—ryF ƒin™e —ll d—t—

typ es in —ll w€i l—ngu—ges —re either primitive d—t— typ es or —re

˜uilt from themD you ™—n tr—nsl—te d—t— from one l—ngu—ge into —

primitiv e d—t— typ eF sf ne™ess—ryDyou ™—n then tr—nsl—te the resulting

primitiv e typ e into the typ e you needF

righElevel l—ngu—ges ™—n —™™ess —nd use most system intrinsi™s —nd

™ompiler routinesF

w€i † h—d systemElevel supp ort of —ppli™—tions written in ƒ€vG†

l—ngu—ge th—t p erform p—™kedEde™im—l op er—tionsY gw emul—tes these

op er—tions on w€i ˆvF sn xwD ™ompiler li˜r—ry routines ™—n ˜ e used

gonverting h—t— „ypes QEI to m—nipul—te de™im—lsF fe™—use the sizes of the op er—nds —re p—ssed

—s p—r—metersD these routines —re useful in —ppli™—tions where the

eld sizes —re not known —t ™ompileEtimeD su™h —s gener—lEpurp ose

d—t—˜—se —ppli™—tions —nd rep ort writersF

€—™kedEde™im—l pro ™edures must ˜ e de™l—red —s intrinsi™s to ˜ e ™—lled

from within highElevel xw l—ngu—gesF sf sp eed is — prim—ry ™on™ernD

™onsider doing p—™kedEde™im—l op er—tions within r€ gyfyv s sGˆv

or r€ ‚€qGˆvF

por more inform—tion see w€i ˆv sntrinsi™s ‚eferen™e w—nu—l

@QPTSHEWHHPVA —nd gompiler vi˜r—ryGˆv ‚eferen™e w—nu—l

@QPTSHEWHHPWAF

„his se™tion oers suggestions —˜ out ™onverting from one ™h—r—™ter

gonverting from

set to —notherD —nd from eƒgs s @™h—r—™terA num˜ ers to numeri™ d—t—

gh—r—™terX

typ esF

ƒin™e —ll ™h—r—™ters —re V ˜its long —nd —ll —re ˜yteE—lignedD there is

„o yther gh—r—™ter

no in™omp—ti˜ilit y ˜ etween ˜ etween l—ngu—ges or environmentsF

‰ou m—yw—nt to ™onvert ˜ etween dierent™h—r—™ter setsF eƒgs s

—nd ifghsg —re the supp orted inglish ™h—r—™ter setsY sever—l n—tive

l—ngu—ge ™h—r—™ter sets like the t—p enese ifghsu —nd tsƒgs s —re

—lso supp ortedF

fetween eƒgss —nd ifghsg

„he g„‚exƒve„i intrinsi™ —™™epts — string of ™h—r—™ters in either

eƒgs s or ifghsgD —nd returns — string tr—nsl—ted into the otherF

„he tr—nsl—tion string is returned the s—me ˜uer unless you sp e™ify

—notherF

eƒgs s —nd ifghsg —re des™ri˜ ed in gh—pter P of this ˜ o okD —nd

their ™o de equiv—lents —re in epp endix eF

fetween x—tive v—ngu—ges

„he x—tive v—ngu—ge ƒu˜system @xvƒA supp orts six ™h—r—™ter sets

™ont—ining the following n—tive l—ngu—gesX

ƒeƒgss supp orts xe„s†iEQHHHD —n —rti™i—l l—ngu—ge

‚ywexV supp ortsX

xe„s†iEQHHH

emeri™—n inglish

g—n—di—n pren™h

h—nish

hut™h

inglish

pinnish

QEP gonverting h—t— „ypes pren™h

qerm—n

st—li—n

xorwegi—n

€ortuguese

ƒp—nish

ƒwedish

s™el—ndi™

uexeV supp ortsX

xe„s†iEQHHH

ue„euexe

e‚efsgV supp ortsX

er—˜i™

‡estern er—˜i™

qreekV supp orts qreek

„urkishV supp orts „urkish

se the intrinsi™ xvsxpy or gener—te — rep ort from the xv „sv

utilit y to review inform—tion —˜ out — ™h—r—™ter9s n—tive l—ngu—ge

form—tF por more inform—tionD refer to w€i ˆv sntrinsi™s ‚eferen™e

w—nu—l @QPTSHEWHHPVAF

se the intrinsi™ g„‚exƒve„i to tr—nsl—te ˜ etween ifghsu —nd

tsƒ@uexeVAF ifghsu is — rewlettE€—™k—rd9s t—p—nese version of

ifghsgF tsƒ is — t—p—nese sntern—tion—l ƒt—nd—rd ™o de @tsƒgs s is —

t—p—nese version of ƒ eƒgs sAY uexeV is —n VE˜it tsƒ ™o deF

se the intrinsi™ xv‚i€gre‚ to repl—™e nondispl—y—˜le ™h—r—™tersF

st —™™epts — ™h—r—™ter —rr—y ™ont—ining nondispl—y—˜le ™h—r—™ters

—nd returns —nother ™h—r—™ter —rr—y with repl—™ement™h—r—™tersF

@ xvsxpy ™—n tell you if the ™h—r—™ter is nondispl—y—˜le ˜ e™—use it is —

™ontrol ™o de or —n undened gr—phi™ ™h—r—™terAF

fetween xumeri™ porm—ts

sf you —re sending d—t— les toD or re™eiving d—t— fromD — foreign

™ountryDyou m—y dis™over th—t num˜ ers —re represented dierently

in dierent n—tive l—ngu—gesF „he follo wing intrinsi™s —re used for

™onverting eƒgs s num˜ ers ˜ etween n—tive l—ngu—ge form—tsX

xvgyx†x w t—kes d—t— in — foreign l—ngu—ge @one th—t is supp orted

in xe„s†iEQHHHA —nd tr—nsl—tes it to the system9s n—tive l—ngu—geF

st —™™epts — foreign l—ngu—ge num˜ er with de™im—l —nd thous—nds

sep—r—tors —nd returns —n eƒgs s num˜ er with xe„s†iEQHHH

de™im—l —nd thous—nds sep—r—torsF es —n optionD the de™im—l —nd

thous—nds sep—r—tors ™—n ˜ e stripp edF

xvpw„x w t—kes n—tive l—ngu—ge d—t— —nd tr—nsl—tes it to — foreign

l—ngu—ge th—t is supp orted ˜yxe„s†iEQHHHF st —™™epts —n

eƒgs s num˜ er stringD whi™hm—y in™lude xe„s†iEQHHH de™im—l

sep—r—torD thous—nds sep—r—torD —nd ™urren™y sym˜ ol or n—meF st

gonverting h—t— „ypes QEQ returns — string with the s—me num˜ erD ˜ut form—tted with the

de™im—l sep—r—torD thous—nds sep—r—torD —nd ™urren™y sym˜ol or

n—me of the n—tive l—ngu—ge you sp e™ifyF

xvx wƒ€ig —™™epts — string —s — logi™—l ˜yte —rr—y @minimum

TH ˜ytesA —nd — l—ngu—ge identi™—tion num˜ erF st returns the

string en™o ded with inform—tion @num˜ er sp e™i™—tionsA —˜ out the

™h—r—™teristi™s of the l—ngu—geD su™h—s

hire™tion @leftEtoEright or rightEtoEleftAD

higit r—ngeF

ƒym˜ ols for digitsD ™urren™yD m—them—ti™—l op er—tionsD —nd

thous—nds —nd de™im—l sep—r—torsF

por further inform—tion —˜ out the x—tive v—ngu—ge ƒu˜systemD refer

to x—tive v—ngu—ge €rogr—mmer9s quide @QPTSHEWHHPPAF

sndividu—l l—ngu—ges m—yh—ve simple —ssignment ™omm—nds to

„o snteger

—™™ept ™h—r—™ters —nd interpret the sym˜ ol —s its v—lueF por ex—mpleD

ƒ„‚‚ieh in €—s™—l or ‚ieh in py‚„‚ex will re—d —n eƒgs s num˜er

—nd form—t — v—ri—˜le —s the v—lue the ™h—r—™ter string representsF

„he intrinsi™ hfsxe‚‰ —™™epts —n o ™t—lE˜—sedD — hex—de™im—lE˜—sedD

or — signed de™im—lE˜—sed num˜ er in eƒgs s ™h—r—™tersD —nd returns —

QPE˜it ˜in—ry integer in twos ™omplement @signedA formF

e™h—r—™ter string ˜ eginning with — p er™ent sign @7A is tre—ted —s

o ™t—l @˜—se VA v—lueF e string ˜ eginning with — doll—r sign @6A is

tre—ted —s — hex—de™im—l @˜—se ITA num˜ erF e string ˜ egining with —

plus sign @CAD — minus sign @ AD or — num˜ er @I through WD no le—ding

˜l—nks —llo wedA is tre—ted —s — de™im—l @˜—se IHA num˜ erF

„he intrinsi™ fsxe‚‰ p erforms — simil—r op er—tionY it ™onverts —

numeri™ eƒgs s string into — ITE˜it ˜in—ry v—lueF e p—r—meter

indi™—tes the num˜ er of input ˜ytesF

„he ™ompiler utility pro ™eduresD iˆ„sx9 @gwA —nd r€iˆ„sx @xwA

™—n —lso ˜ e used to ™onvert from eƒgs s to integerF eny fr—™tions in

the input num˜ er string will ˜ e trun™—ted in integer resultsF

es with ™onverting from ™h—r—™ter to integer @—˜ oveAD the simplest

„o ‚e—l

w—y to ™onvert ™h—r—™ter to re—l typ e m—y ˜ e —n —ssignment

st—tement within the l—ngu—geF

„he ™ompiler utility pro ™edures iˆ„sx9 @gwA —nd r€iˆ„sx @xwA

—™™ept — ˜yte —rr—y@—™h—r—™ter string of eƒgs s digits p—ssed ˜y

referen™eA —nd ™onvert it into —n intern—l represent—tionF ve—ding

˜l—nks in the input string —re ignoredF e p—r—meter ™—n ˜ e set

to tre—t tr—iling ˜l—nks —s zerosF holl—r signs —nd other ™urren™y

sym˜ ols —nd ™omm—s for thous—nds sep—r—tors —re ™ounted in the

input lengthD ˜ut —re ignored in the outputF

sn the d—t—type p—r—meterD you sp e™ify whi™hintern—l represent—tion

you w—ntX —n integer of IT ˜its or QP ˜itsD or — re—l of QP ˜its or TR

QER gonverting h—t— „ypes ˜itsF „he result p—r—meter is — QPE˜it p ointer to the rst word of

result stor—geD —™™ording to the typ e sp e™iedF yther p—r—meters let

you sp e™ify eld widthD de™im—l pl—™esD exp onentsD —nd fr—™tionsF

sn w€i †D system instru™tions use p—™ked de™im—lsY for

„o€—™ked he™im—l

™omp—ti˜ilityD w€i ˆv h—s ™ompiler li˜r—ry pro ™edures th—t run

in xw —nd emul—te the w€i † instru™tion setF sn w€i ˆvD the

p—™ked de™im—l typ e is used only in gyfyv or ‚€qD howeverF

‡ithin gyfyv —nd ‚€qD use the wy†i ™omm—nd to ™onvert e—sily

˜etween typ es ˜y —ssignmentF

„he xw ™ompiler pro ™edure r€€egg†eh —™™epts eƒgs s digits —nd

returns the p—™ked de™im—l digits used ˜y w€i † —nd in gyfyv

—nd ‚€qF „he rightmost sour™e digit indi™—tes the signY —ll other

digits must ˜ e unsigned or ˜ e le—ding ˜l—nksF fl—nks ˜ etween digits

—re illeg—lF ve—ding ˜l—nks —re ™onverted to p—™kedEde™im—l zerosF en

—llE˜l—nk eld ™onverts to —n unsigned zeroF sf the sour™e h—s more

digits th—n the t—rgetD the result is leftEtrun™—tedY if the t—rget is the

l—rgerD the result is p—dded with zeros on the leftF

fe™—use this pro ™edure is extern—l —nd gener—lD it m—y not ˜ e

—s e™ient —s ™o de optimized ˜y the xw gyfyv ™ompilerF

€—™kedEde™im—l pro ™edures must ˜ e de™l—red —s intrinsi™s to ˜ e ™—lled

from within highElevel xw l—ngu—gesF sf sp eed is — prim—ry ™on™ernD

™onsider doing p—™kedEde™im—l op er—tions within r€ gyfyv s sGˆv

or r€ ‚€qGˆvF

„his se™tion oers suggestions for ™onverting integer d—t— typ es to

gonverting from

™h—r—™terD other integersD re—l —nd de™im—l d—t— typ esF

snteger

sndividu—l l—ngu—ges m—yh—ve simple —ssignment fun™tions to

„o gh—r—™ter

—™™ept integers —nd store them —s ™h—r—™tersD su™h —s the ‡‚s„i —nd

ƒ„‚‡‚s„i ™omm—ndF

ƒigned integers in w€i ˆv xw —re in twos ™omplement formF w€i

ˆv uses — QPE˜it st—nd—rd word in xwD —nd — ITE˜it st—nd—rd word

in gwD —s expl—ined in gh—pter ID sntro du™tionF

„he intrinsi™ heƒgss —™™epts — QPE˜it signed integer ˜yv—lueF st

returns the v—lue —s —n eƒgs s string to your ™h—r—™ter —rr—y —nd

gives you the num˜er of ™h—r—™ters in the result stringF ‰ou sp e™ifyD

in the p—r—metersD whether the returned string is to ˜ e —n o ™t—l

@˜—seEVAD — de™im—l @˜—seEIHAD or — hex—de™im—l @˜—seEITA num˜ erF

hierent ˜—ses —re returned with dierent justi™—tions —nd lengthsF

„he intrinsi™ eƒgss p erforms — simil—r op er—tion with — ITE˜it

integerF

gonverting h—t— „ypes QES „he ™ompiler utility pro ™edures sxiˆ„9 —nd r€sxiˆ„ —lso —™™ept —n

integer —nd return — ™h—r—™ter string of eƒgs s digitsF

ell l—ngu—ges supp orted on WHH ƒeries r€ QHHH gomputer ƒystems

„o yther snteger

with the w€i ˆv op er—ting system h—ve— w—yD within the l—ngu—geD

to —ssign v—lue from one integer typ e to the other integer typ esF

wost highElevel l—ngu—ges h—ve —ssignments to ™onvert integers to

„o ‚e—l

re—ls within the l—ngu—geF

„he ™ompiler fun™tions hpvye„ —nd hpvye„9 ™onvert — QPE˜it integer

into — TRE˜it re—l num˜ erF

„he ™ompiler pro ™edure r€egg†fh ™onverts — signed ˜in—ry integer

„o€—™ked he™im—l

to — p—™ked de™im—lF „he input num˜ er is ™onsidered to ˜ e in twos

™omplement formD from P to IP ˜ytes longF

€—™kedEde™im—l pro ™edures must ˜ e de™l—red —s intrinsi™s to ˜ e ™—lled

from within highElevel xw l—ngu—gesF sf sp eed is — prim—ry ™on™ernD

™onsider doing p—™kedEde™im—l op er—tions within r€ gyfyv s sGˆv

or r€ ‚€qGˆvF

„his se™tion oers some suggestions for ™onverting re—l num˜ ers in

gonverting prom

o—tingEp oint not—tion to ™h—r—™terD integerD other re—lD —nd de™im—l

‚e—l

d—t— typ esF

‡ithin l—ngu—gesD there is usu—lly — ™omm—nd or fun™tion like ‡‚s„i

„o gh—r—™ter

or ƒ„‚‡‚s„i th—t will t—ke — re—l v—lue —nd printD displ—yD or store it

—s — string of eƒgs s ™h—r—™tersF

„he ™ompiler utility pro ™edures sxiˆ„9 —nd r€sxiˆ„ ™onvert — re—l

num˜er to — ˜yte —rr—y for —n output string of eƒgs s digitsF „he

resulting eƒgs s string ™—n ˜ e represented in sever—l form—tsF ‰ou ™—n

™ho ose options for representing the sign ™h—r—™terD de™im—l p ointsD

—nd the exp onentF

es mentioned in the se™tion —˜ oveD most l—ngu—ges ™ont—in —n

„o snteger

intern—l —ssignment fun™tion to form—t — re—l v—lue —s —n integerF

‚ounding —nd trun™—tion rules dierF

„he ™ompiler fun™tions sx„ D sx„9 D spsˆ D —nd spsˆ9 —ll —™™ept —

QPE˜it re—l num˜ er —nd return itD trun™—tedD —s —n ITE˜it integerF

ƒimil—rlyD hpsˆ or hpsˆ9 —™™ept — TRE˜it re—l num˜ erD trun™—te itD —nd

return it the result —s — QPE˜it integerF

sf you round — num˜ er equidist—nt from two —dj—™entintegersD like

IFS or PFSD you m—y nd th—t siii —nd r€QHHH return dierent

resultsF sn siiiD — midp ointnum˜ er rounds to the integer th—t h—s

QET gonverting h—t— „ypes — le—st signi™—nt ˜it of zeroY in other wordsD the even integerF por

ex—mpleD IFS rounds to PD —nd PFS rounds to PF r€QHHH rounds to

the integer of gre—test m—gnitudeF por ex—mpleD IFS rounds to P

—nd PFS rounds to QF ‚ounding dire™tives within — l—ngu—ge ˜ eh—ve

in l—ngu—geEsp e™i™ w—ysY ™onsult the l—ngu—ge m—nu—lD or test —

midEp ointnum˜er if you —re dou˜tfulF

es dis™ussed in gh—pter PD there —re two form—ts for re—l

„o yther ‚e—l

o—tingEp ointnum˜ ers in w€i ˆvX siii —nd r€QHHHF gonversions

˜etween the two ™—n ˜ e done ˜y™ho osing — p—rti™ul—r ™ompilerD or

˜y ™—lling the intrinsi™ r€p€gyx†i‚„ F sn —dditionD there —re system

pro ™edures th—t will trun™—te — fr—™tion—l re—l num˜ erF

‚e—l o—ting p ointnum˜ ers in this m—nu—l —re —ssumed to ˜ e in

siii form—tD whi™h is the def—ult represent—tion in xwF sn gw d—t—

les or progr—msD o—ting p oint re—l num˜ ers def—ult to r€QHHH

form—tD —n w€i ˆv emul—tion of the w€i †Gi form—tF

sf do not w—nt the def—ult siii re—l num˜ er form—t for — p—rti™ul—r

—ppli™—tionD you ™—n for™e the r€QHHH form—t ˜y sp e™ifying the

r€QHHH IT ™ompiler dire™tiveinr€py‚„‚ex UUGˆv —nd r€

€—s™—lF r€QHHH IT sele™ts w€i †Gi —lignment —nd r€QHHH re—l

num˜ er form—tF es mentioned in gh—pter PD this —lso ™h—nges the

—lignmentF

elthough you ™—n use dierent form—ts for sep—r—te extern—l

pro ™eduresD you ™—n only use one re—l num˜ er form—t within

—n exe™ut—˜le mo duleF siii —nd r€QHHH singleEpre™ision —nd

dou˜leEpre™ision re—l num˜ ers h—ve dierent —™™ur—™ies —nd r—ngesF

‰ou ™—n ™onvert ˜ etween ˜in—ry o—tingEp oint form—ts with the

intrinsi™ r€p€gyx†i‚„ F

‰ou ™—n sp e™ify —ny ˜in—ry o—tingEp oint re—l num˜ er for input

to r€p€gyx†i‚„ D —nd —sk for your output in —ny leg—l form—tF

e™™ept—˜le leg—l form—ts for sour™e —nd destin—tion —reX

r€QHHHX

QPE˜it

TRE˜it

siiiX

QPE˜it

TRE˜it

„he ™onversion is p erformed ˜y reg—rding the sour™e num˜er —s

innitely pre™ise —nd with un˜ ounded r—ngeD —nd then rounding it to

t the design—ted destin—tion form—tF ‰ou h—ve some ™hoi™e in the

rounding mo deF

„he metho d of rounding —nd the w—y ex™eptions —re sign—lled

dep ends entirely on the destin—tion form—tD not the sour™eF

gonversion is p erformed —s if —ll —rithmeti™ tr—ps —re dis—˜ledF xo

tr—pping to userEsupplied or systemEsupplied —rithmeti™ tr—p routines

is doneF

gonverting h—t— „ypes QEU ‰ou m—y en™ounter twotyp es of errorsX

nderoworyverow

snex—™t

yverflow —nd nderflow

gonversion ˜ etween form—ts ™—n present — r—nge pro˜lemD when the

t—rget r—nge is sm—llerF „husD overow —nd underow ™—n o ™™ur in

p erforming either of the following ™onversionsX

prom — r€QHHH singleEpre™ision re—l num˜ er to —n siii

singleEpre™ision num˜ erF

prom —n siii dou˜leEpre™ision re—l num˜ er to —n r€QHHH

dou˜leEpre™isionF

‰ou m—yh—ve to develop new error h—ndling ™o de to prevent thisF

e™™ur—™y

„he m—ntiss— of —n r€QHHH dou˜leEpre™ision re—l num˜ er provides

enough ˜its for IT digits of —™™ur—™yF „he m—ntiss— of —n siii

dou˜leEpre™ision re—l num˜ er provides for ISFW digit of —™™ur—™yF

gonversion from r€QHHH form—t to siii dou˜leEpre™ision m—y ™—use

the le—st signi™—nt digit of — ITEdigit re—l num˜ er to ˜ e lostF

„he loss of numeri™ pre™ision is extremely sm—llF roweverD if the

requirements of —n —ppli™—tion dep end on the eƒgs s represent—tion

of o—tingEp oint resultsD the ee™t ™ould ˜ e imp ort—ntF por ex—mpleD

if — progr—m —ssumed ITEdigit —™™ur—™y —nd requested IT digits for

form—tting outputD with tr—iling zero suppressionD the num˜ er TRFR

would —pp e—r —s TRFR when the system w—s running in gwD ˜ut

would —pp e—r —s TRFRHHHHHHHHHHHHI when the system w—s running in

xwF

„run™—ting

„he ™ompiler fun™tion esx„ or esx„9 —™™epts — QPE˜it re—l num˜er

—nd trun™—tes it to return —n integerElikenum˜ er in QPE˜it re—l

represent—tionF

„he ™ompiler fun™tion hhsx„ or hhsx„9 trun™—tes — TRE˜it longre—l

num˜ er to return —n integerElikenum˜ er in TRE˜it longre—l

represent—tionF

sn l—ngu—ges other th—n gyfyv —nd ‚€qD follow these steps to

„o€—™ked he™im—l

™onvert from —n input re—l to — p—™ked de™im—lX

IF wultiply or divide the re—l num˜er ˜y —n —ppropri—te p ower of IHF

PF gonvert the resulting v—lue to —n ˜—seEten integerF

QF gonvert th—t integer to — de™im—lF

@ƒee the previous se™tions —˜ out m—king these ™onversionsFA

QEV gonverting h—t— „ypes sf your ™onversion is t—king pl—™e within gyfyv or ‚€qD you

™—nnot op er—te on — re—l num˜ erD —s required in step I —˜ oveF

snste—dD follow these stepsX

IF gonvert the re—l num˜er into — ™h—r—™terF

PF gonvert the resulting ™h—r—™ter to — de™im—lF

@ƒee the previous se™tions —˜ out m—king these ™onversionsFA

„his se™tion oers some suggestions ™onverting p—™ked de™im—l d—t—

gonverting from

typ es to ™h—r—™terD integerD —nd re—l d—t— typ esF

€—™ked he™im—l

gompiler li˜r—ry routines ™—n ˜ e used to m—nipul—te de™im—ls in xwF

fe™—use the sizes of the op er—nds —re p—ssed —s p—r—metersD these

routines —re useful in —ppli™—tions where the eld sizes —re not known

—t ™ompileEtimeD su™h —s gener—lEpurp ose d—t—˜—se —ppli™—tions —nd

rep ort writersF

„he ™ompiler li˜r—ry p—™kedEde™im—l pro ™edures must ˜ e de™l—red —s

intrinsi™s if you use them in highElevel xw l—ngu—gesF sf sp eed is —

prim—ry ™on™ernD ™onsider doing p—™kedEde™im—l op er—tions within

r€ gyfyv s sGˆv or r€ ‚€qGˆvF

sf you —re working within gyfyv or ‚€qD you would use €sg

™l—uses —nd the wy†i ™omm—nd to ™onvert typ esF „he following

suggestions —re for situ—tions where you h—ve other l—ngu—ges

involvedF

r€€egg†he —™™epts — p—™kedEde™im—l num˜ er —nd returns —n eƒgs s

„o gh—r—™ter

represent—tion of the num˜ erF en unsigned sour™e pro du™es —n

unsigned resultY if the sour™e — signed de™im—lD you sp e™ify whether

the t—rget will ˜ e signedF ‰ou sp e™ify the num˜ er of digits in the

resultF

r€€egg†hf —™™epts — p—™ked de™im—l —nd returns —n integerF „he

„o snteger

integer is — signed ˜in—ry num˜er in twos ™omplement formD —nd its

size dep ends on the num˜ er of digits in the sour™eF

sf you —re working outside gyfyv or ‚€qD you would ™onvert

„o ‚e—l

indire™tly —s followsX

IF gonvert the de™im—l v—lue to —n integerF

PF gonvert the resulting integer to — re—l num˜ erF

QF wultiply or divide ˜y the —ppropri—te p ower of tenF

@ƒee the previous se™tions —˜ out m—king these ™onversionsFA

sf you —re working in gyfyvD you ™—n ™onvert the de™im—l v—lue to

—n eƒgs s integerF €—ss this to the routineD —nd ™onvert it to — re—l

v—lue thereF

gonverting h—t— „ypes QEW „he wy†i ™omm—nd is used to ™h—nge one de™im—l to —nother within

„o yther he™im—ls

gyfyv or ‚€qF

yutside of gyfyv or ‚€qD use the ™ompiler li˜r—ry fun™tions

r€€egƒ‚h —nd r€€egƒvh to p erform right —nd left shifts on p—™ked

de™im—lsF ‰ou sp e™ify the —mount of oset @the num˜ er of digits to

˜ e shiftedAF

„o ™onvert — p—™ked de™im—l to — feƒsg de™im—lD you should ™onvert

rst to — twos ™omplementinteger or typ e eƒgs sD —nd then ™onvert

to de™im—l within feƒsg with —n —ssignmentF por ex—mpleD —ssign

—n integer v—lue to — de™im—l with de™v—l a intv—l B n HD where n HH is

the —ppropri—te p ower of IHF „o ™onvert ˜ etween eƒgs s —nd de™im—lD

use the †ev or †ev6 intern—l fun™tionsF

QEIH gonverting h—t— „ypes e

eƒgss —nd ifghsg gode †—lues

„he following t—˜le shows eƒgs s —nd ifghsg ™h—r—™ter ™o de

v—lues —long with their de™im—lD o ™t—lD —nd hex—de™im—l equiv—lentsF

gontrolGgr—phi™ —˜˜revi—tionsD like x v —nd ƒyr D —re sp elled out —t

the end of the t—˜leF

eƒgssGifghsg gh—r—™ter ƒets

eƒgss ifghsg gh—r—™ter go de †—lues

gontrolG gontrolG

qr—phi™ qr—phi™ he™im—l y™t—l rex—de™im—l

x v x v H HHH HH

ƒyr ƒyr I HHI HI

ƒ„ˆ ƒ„ˆ P HHP HP

i„ˆ i„ˆ Q HHQ HQ

iy„ €p R HHR HR

ix r„ S HHS HS

egu vg T HHT HT

fiv hiv U HHU HU

fƒ V HIH HV

r„ W HII HW

vp ƒww IH HIP He

†„ †„ II HIQ Hf

pp pp IP HIR Hg

g‚ g‚ IQ HIS Hh

ƒy ƒy IR HIT Hi

ƒs ƒs IS HIU Hp

hvi hvi IT HPH IH

hgI hgI IU HPI II

hgP hgP IV HPP IP

hgQ „w IW HPQ IQ

hgR ‚iƒ PH HPR IR

xeu xv PI HPS IS

ƒ‰x fƒ PP HPT IT

i„f sv PQ HPU IU

eƒgss —nd ifghsg gode †—lues eEI „—˜le eEIF eƒgssGifghsg gh—r—™ter ƒets

eƒgss ihghsg gh—r—™ter go de †—lues

gontrolG gontrolG

qr—phi™ qr—phi™ he™im—l y™t—l rex—de™im—l

gex gex PR HQH IV

iw iw PS HQI IW

ƒ f gg PT HQP Ie

iƒg g I PU HQQ If

pƒ spƒ PV HQR Ig

qƒ sqƒ PW HQS Ih

‚ƒ s‚ƒ QH HQT Ii

ƒ s ƒ QI HQU Ip

ƒ€ hƒ QP HRH PH

3 ƒyƒ QQ HRI PI

4 pƒ QR HRP PP

5 QS HRQ PQ

6 f‰€ QT HRR PR

7 vp QU HRS PS

8 i„f QV HRT PT

9 iƒg QW HRU PU

@ RH HSH PV

A RI HSI PW

B ƒw RP HSP Pe

C g P RQ HSQ Pf

D RR HSR Pg

E ix RS HSS Ph

F egu RT HST Pi

G fiv RU HSU Pp

H RV HTH QH

I RW HTI QI

P ƒ‰x SH HTP QP

Q SI HTQ QQ

R €x SP HTR QR

S ‚ƒ SQ HTS QS

T g SR HTT QT

U iy„ SS HTU QU

eEP eƒgss —nd ifghsg gode †—lues eƒgssGifghsg gh—r—™ter ƒets

eƒgss ihghsg gh—r—™ter go de †—lues

gontrolG gontrolG

qr—phi™ qr—phi™ he™im—l y™t—l rex—de™im—l

V ST HUH QV

W SU HUI QW

X SV HUP Qe

Y g Q SW HUQ Qf

` hgR TH HUR Qg

a xeu TI HUS Qh

b TP HUT Qi

c ƒ f TQ HUU Qp

d ƒ€ TR IHH RH

e TS IHI RI

f TT IHP RP

g TU IHQ RQ

h TV IHR RR

i TW IHS RS

p UH IHT RT

q UI IHU RU

r UP IIH RV

s UQ III RW

t UR IIP Re

u F US IIQ Rf

v ` UT IIR Rg

w @ UU IIS Rh

x C UV IIT Ri

y | UW IIU Rp

€ 8 VH IPH SH

 VI IPI SI

‚ VP IPP SP

ƒ VQ IPQ SQ

„ VR IPR SR

VS IPS SS

† VT IPT ST

‡ VU IPU SU

eƒgss —nd ifghsg gode †—lues eEQ eƒgssGifghsg gh—r—™ter ƒets

eƒgss ihghsg gh—r—™ter go de †—lues

gontrolG gontrolG

qr—phi™ qr—phi™ he™im—l y™t—l rex—de™im—l

ˆ VV IQH SV

‰ VW IQI SW

 3 WH IQP Se

‘ 6 WI IQQ Sf

’ B WP IQR Sg

“ A WQ IQS Sh

” Y WR IQT Si

• WS IQU Sp

– E WT IRH TH

— G WU IRI TI

˜ WV IRP TP

™ WW IRQ TQ

d IHH IRR TR

e IHI IRS TS

f IHP IRT TT

g IHQ IRU TU

h IHR ISH TV

i IHS ISI TW

j IHT ISP Te

k D IHU ISQ Tf

l 7 IHV ISR Tg

m • IHW ISS Th

n b IIH IST Ti

o c III ISU Tp

p IIP ITH UH

q IIQ ITI UI

r IIR ITP UP

s IIS ITQ UQ

t IIT ITR UR

u IIU ITS US

v IIV ITT UT

w IIW ITU UU

eER eƒgss —nd ifghsg gode †—lues eƒgssGifghsg gh—r—™ter ƒetsD ™ontinued

eƒgss ihghsg gh—r—™ter go de †—lues

eƒgss ifghsg gh—r—™ter go de †—lues

gontrolG gontrolG

qr—phi™ qr—phi™ he™im—l y™t—l rex—de™im—l

x IPH IUH UV

y IPI IUI UW

z X IPP IUP Ue

{ 5 IPQ IUQ Uf

| d IPR IUR Ug

} 9 IPS IUS Uh

~ a IPT IUT Ui

hiv 4 IPU IUU Up

IPV PHH VH

— IPW PHI VI

˜ IQH PHP VP

™ IQI PHQ VQ

d IQP PHR VR

e IQQ PHS VS

f IQR PHT VT

g IQS PHU VU

h IQT PIH VV

i IQU PII VW

IQV PIP Ve

IQW PIQ Vf

IRH PIR Vg

IRI PIS Vh

IRP PIT Vi

IRQ PIU Vp

j IRR PPH WH

k IRS PPI WI

l IRT PPP WP

IRU PPQ WQ

m IRV PPR WR

n IRW PPS WS

o ISH PPT WT

p ISI PPU WU

eƒgss —nd ifghsg gode †—lues eES eƒgssGifghsg gh—r—™ter ƒets

eƒgss ihghsg gh—r—™ter go de †—lues

gontrolG gontrolG

qr—phi™ qr—phi™ he™im—l y™t—l rex—de™im—l

q ISP PQH WV

r ISQ PQI WW

ISR PQP We

ISS PQQ Wf

IST PQR Wg

ISU PQS Wh

ISV PQT Wi

ISW PQU Wp

ITH PRH eH

~ ITI PRI eI

s ITP PRP eP

t ITQ PRQ eQ

u ITR PRR eR

v ITS PRS eS

w ITT PRT eT

x ITU PRU eU

y ITV PSH eV

z ITW PSI eW

IUH PSP ee

IUI PSQ ef

IUP PSR eg

IUQ PSS eh

IUR PST ei

IUS PSU ep

IUT PTH fH

IUU PTI fI

IUV PTP fP

IUW PTQ fQ

IVH PTR fR

IVI PTS fS

IVP PTT fT

IVQ PTU fU

eET eƒgss —nd ifghsg gode †—lues eƒgssGifghsg gh—r—™ter ƒets

eƒgss ifghsg gh—r—™ter go de †—lues

gontrolG gontrolG

qr—phi™ qr—phi™ he™im—l y™t—l rex—de™im—l

IVR PUH fV

IVS PUI fW

IVT PUP fe

IVU PUQ ff

IVV PUR fg

IVW PUS fh

IWH PUT fi

IWI PUU fp

IWP QHH gH

e IWQ QHI gI

f IWR QHP gP

g IWS QHQ gQ

h IWT QHR gR

i IWU QHS gS

p IWV QHT gT

q IWW QHU gU

r PHH QIH gV

s PHI QII gW

PHP QIP ge

PHQ QIQ gf

PHR QIR gg

PHS QIS gh

PHT QIT gi

PHU QIU gp

PHV QPH hH

t PHW QPI hI

u PIH QPP hP

v PII QPQ hQ

w PIP QPR hR

x PIQ QPS hS

y PIR QPT hT

€ PIS QPU hU

eƒgss —nd ifghsg gode †—lues eEU eƒgssGifghsg gh—r—™ter ƒets

eƒgss ifghsg gh—r—™ter go de †—lues

gontrolG gontrolG

qr—phi™ qr—phi™ he™im—l y™t—l rex—de™im—l

 PIT QQH hV

‚ PIU QQI hW

PIV QQP he

PIW QQQ hf

PPH QQR hg

PPI QQS hh

PPP QQT hi

PPQ QQU hp

’ PPR QRH iH

PPS QRI iI

ƒ PPT QRP iP

„ PPU QRQ iQ

PPV QRR iR

† PPW QRS iS

‡ PQH QRT iT

ˆ PQI QRU iU

‰ PQP QSH iV

 PQQ QSI iW

PQR QSP ie

PQS QSQ if

PQT QSR ig

PQU QSS ih

PQV QST ii

PQW QSU ip

H PRH QTH pH

I PRI QTI pI

P PRP QTP pP

Q PRQ QTQ pQ

R PRR QTR pR

S PRS QTS pS

T PRT QTT pT

U PRU QTU pU

eEV eƒgss —nd ifghsg gode †—lues eƒgssGifghsg gh—r—™ter ƒets

eƒgss ifghsg gh—r—™ter go de †—lues

gontrolG gontrolG

qr—phi™ qr—phi™ he™im—l y™t—l rex—de™im—l

V PRV QUH pV

W PRW QUI pW

PSH QUP pe

PSI QUQ pf

PSP QUR pg

PSQ QUS ph

PSR QUT pi

PSS QUU pp

x v xull

ƒyr ƒt—rt of re—ding

ƒ„ˆ ƒt—rt of „ext

i„ˆ ind of „ext

iy„ ind of „r—nsmission

ix inquiry

egu —™knowledge

fiv fell

fƒ f—™ksp—™e

r„ rorizont—l „—˜ul—tion

vp vine peed

†„ †erti™—l „—˜ul—tion

pp porm peed

g‚ g—rri—ge ‚eturn

ƒy ƒhift yut

ƒs ƒhift sn

hvi h—t— vink is™—p e

hgI hevi™e gontrol I @ˆEyxA

hgP hevi™e gontrol P

hgQ hevi™e gontrol Q @ˆEyppA

hgR hevi™e gontrol R

xeu xeg—tive e™knowledge

ƒ‰x ƒyn™hronous sdle

i„f ind of „r—nsmission flo ™k

gex g—n™el

iw ind of wedium

ƒ f ƒu˜stitute

iƒg is™—p e

pƒ pile ƒep—r—tor

qƒ qroup ƒep—r—tor

‚ƒ ‚e™ord ƒep—r—tor

ƒ nit ƒep—r—tor

ƒ€ ƒp—™e @fl—nkA

hiv helete

eƒgss —nd ifghsg gode †—lues eEW sndex

—™™ur—™y —nd r—nge for feƒsg de™im—lsD PEIT

e

—™™ur—™y —nd r—nge for re—l form—tsD PEV

—™™ur—™y errors ™onverting re—lsD QEV

—ddress typ e in intrinsi™ p—r—metersD PEPP

esx„ —nd esx„9 ™ompiler fun™tionsD QEV

6—lignment6 —lignment optionD PEIW

—lignmen t —nd size of d—t— sp e™iedD IEQ

—lignmen t ™ontrol with ™omm—nds —nd ™ompiler optionsD PEIW

—lph—numeri™ ™h—r—™tersD PEP

emeri™—n inglish n—tive l—ngu—ge ™h—r—™tersD QEP

emeri™—n x—tion—l ƒt—nd—rds snstitute form—tD PEW

emeri™—n ƒt—nd—rd go de for snform—tion snter™h—ngeD PEP

e‚efsgV n—tive l—ngu—ge supp ortD QEQ

er—˜i™ n—tive l—ngu—ge ™h—r—™tersD QEQ

—rr—y —nd re™ord typ es in intrinsi™ p—r—metersD PEPP

eƒgs sD PEP

eƒgs s ˜it form—tD PEP

eƒgs s intrinsi™D QES

—ssignment st—tement to ™onvert d—t— typ esD QEI

˜—™kground inform—tionD IEI

f

feƒsg

d—t— typ es ™omp—red to primitiv e typ esD PEPH

de™im—l r—nges —nd —™™ur—™iesD PEIT

exp onent eld of de™im—lD PEIU

elds of o—tingEp oint de™im—lD PEIU

l—ngu—ge notesD PEPP

m—ntiss— eld of de™im—lD PEIU

norm—lized m—ntiss—D PEIU

sign eld of de™im—lD PEIU

feƒsg de™im—lD PEPP

feƒsg @o—tingEp ointA de™im—lD PEIT

feƒsg o—tingEp oint de™im—l ˜it form—tD PEIV

feƒsg l—ngu—ge m—nu—lD IER

fgh ni˜˜leD PEIR

fgh ni˜˜le ˜it form—tD PEIR

˜i—sed form for re—l exp onentD PEW

fin—ry go ded he™im—l ni˜˜leD PEIR

fsxe‚‰intrinsi™D QER

˜it form—t

eƒgs sD PEP

feƒsg de™im—lD PEIV

fin—ry go ded he™im—l ni˜˜leD PEIR

ifghsgD PEQ

r€QHHH re—lD PEIQ

sndexEI siii re—lD PEII

integerD PEU

p—™ked de™im—lD PEIT

˜it form—t not—tionD PEI

˜it sequen™esD IEI

fo ole—ns in gD PEPP

fo ole—n typ e in intrinsi™ p—r—metersD PEPP

˜ ound—ries sp e™ied in form—tD IEQD PEIW

gevvevsqxih optionD PEIW

g

g—n—di—n pren™h n—tive l—ngu—ge ™h—r—™tersD QEP

™h—r—™terD ™onverting fromD QEP

™h—r—™ter stringD o ™t—lD de™im—lD hex—de™im—lD QER

™h—r—™ter typ e d—t—D PEP

g l—ngu—ge

d—t— typ es ™omp—red to primitiv e typ esD PEPH

l—ngu—ge notesD PEPP

p—r—meter typ e requirementsD PEPP

g l—ngu—ge m—nu—lD IER

gw —nd xw environment progr—mming l—ngu—gesD IER

gyfyv

gyw€ „e„syxev us—geD PEPQ

d—t— typ es ™omp—red to primitiv e typ esD PEPI

hsƒ€ve‰ us—geD PEPQ

l—ngu—ge notesD PEPQ

€sg„ ‚i @€sgA ™l—useD PEISD PEPQ

ƒsqx ™l—useD PEPQ

unp—™ked de™im—lsD PEITD PEPQ

ƒeqi ™l—useD PEPQ

gyfyv l—ngu—ge m—nu—lD IER

™omp—ring l—ngu—ge d—t— typ esD PEPH

gomp—ti˜ilit y wo de progr—mming environmentD IEQ D PEIW

™ompiler dire™tive for re—l num˜ er form—tD QEU

™ompiler options for —lignmentD PEIW

™ompiler routines for p—™ked de™im—lsD QEI

™omplementof—nintegerD PES

™omplex d—t— typ esD PEPP

gyw€ „e„syxev us—ge in gyfyvD PEPQ

™onversion pro ™ess for re—l num˜ ersD QEU

™onverting — twos ™omplementinteger to de™im—lD PES

™onverting d—t— typ esD IESD QEI

™onverting from ™h—r—™ter

to integerD QER

to other ™h—r—™ter typ esD QEP

to other numeri™ ™h—r—™ter typ esD QEQ

to p—™ked de™im—lD QES

to re—l num˜ erD QER

™onverting from ™h—r—™ter typ esD QEP

™onverting from integer

to ™h—r—™ter typ esD QES

to other integer typ esD QET

to p—™ked de™im—l typ esD QET

to re—l typ esD QET

™onverting from integer typ esD QES

sndexEP ™onverting from p—™ked de™im—l

to ™h—r—™terD QEW

to integerD QEW

to other de™im—lsD QEIH

to re—lD QEW

™onverting from p—™ked de™im—l typ esD QEW

™onverting from re—l

to ™h—r—™ter typ esD QET

to integer typ esD QET

to p—™ked de™im—l typ esD QEV

to re—l typ esD QEU

™onverting from re—l typ esD QET

™onverting to twos ™omplementD PET

™orresp onden™e ˜ etween l—ngu—ge d—t— typ esD PEPH

g„‚exƒve„i intrinsi™D QEPD QEQ

h—nish n—tive l—ngu—ge ™h—r—™tersD QEP

h

heƒgs s intrinsi™D QES

d—t— typ e

re—lD PEU

d—t— typ es

numeri™D PER

d—t— typ es ™onversion suggestionsD QEI

d—t— typ es denedD IEP

d—t— typ es form—t

™h—r—™terD PEP

de™im—lD PEIR

integerD PER

d—t— typ esD why ™onvertcD IES

hfsxe‚‰intrinsi™D QER

hhsx„ —nd hhsx„9 ™ompiler fun™tionsD QEV

de™im—lE˜—sed v—lue in ™h—r—™ter stringD QER

de™im—lD feƒsg o—tingEp ointD PEIT

de™im—l ˜it form—t @feƒsg o—tingEp ointAD PEIV

de™im—lD @gyfyvA unp—™kedD PEIT

de™im—l d—t— typ esD PEIR

de™im—lD elds of feƒsg o—tingEp ointD PEIU

de™im—l op er—tionsD emul—tion of w€i †D QEI

de™im—l @p—™kedA ˜it form—tD PEIT

de™im—ls other th—n p—™kedD PEIR

de™im—lsD p—™kedD —nd ™ompiler routinesD QEI

de™im—lsD unp—™kedD in gyfyvD PEPQ

de™im—l typ e digit represent—tionD PEIR

hpsˆ —nd hpsˆ9 ™ompiler fun™tionsD QET

hpvye„ —nd hpvye„9 ™ompiler fun™tionsD QET

hsƒ€ve‰ us—ge in gyfyvD PEPQ

dou˜leEpre™ision or singleEpre™ision re—lsD PEV

hut™h n—tive l—ngu—ge ™h—r—™tersD QEP

sndexEQ ifghsgD PEPD PEQ

i

ifghsg ˜it form—tD PEQ

ifghsu —nd tsƒ@uexeVA tr—nsl—tionD QEQ

emul—ting w€i † de™im—l op er—tionsD QEI

inglish n—tive l—ngu—ge ™h—r—™tersD QEP

environments — f—™tor in form—ttingD IEQ D PEIW

errors in ™onverting re—lsD QEU

exp onent eld of re—lsD PEW

exp onent eldsD sp e™i—lD PEW

exp onent represented in ˜i—sed formD PEW

ixtended fin—ry go ded he™im—l snter™h—nge go deD PEP D PEQ

iˆ„sx9 ™ompiler utility pro ™edureD QER

elds

p

feƒsg o—tingEp oint de™im—lD PEIU

r€QHHH re—l num˜ ersD PEIP

siii re—l num˜ ersD PEIH

re—l num˜ ersD PEV

elds of d—t— typ esD PEI

pinnish n—tive l—ngu—ge ™h—r—™tersD QEP

o—tingEp oint de™im—l @feƒsgAD PEIT

o—tingEp oint not—tion for re—lsD PEU

o—tingEp oint re—lsD ™onverting fromD QET

o—tingEp oint zeroD innityD x—xD PEW

form—tting d—t— typ esD IEQD PEI

form—tting in xw —nd gw environmentsD IEQD PEIW

py‚„‚ex

d—t— typ es ™omp—red to primitiv e typ esD PEPI

l—ngu—ge notesD PEPR

py‚„‚ex l—ngu—ge m—nu—lD IER

pren™h n—tive l—ngu—ge ™h—r—™tersD QEP

fund—ment—l w€i ˆv d—t— typ esD listedD IEP

qerm—n n—tive l—ngu—ge ™h—r—™tersD QEP

q

qreekV l—ngu—ge supp ortD QEQ

qreek n—tive l—n—gu—ge supp ortD QEQ

hex—de™im—l ™h—r—™ter strings pref—™ed with 6D QER

r

r€QHHH IT ™ompiler dire™tiveD QEU

r€QHHH —lignment optionsD PEIW

r€QHHH —nd siii re—lsD rounding dieren™esD QET

r€QHHH ˜it form—tD PEIQ

r€QHHH or siii form—t for re—l num˜ ersD PEV

r€QHHH re—l num˜ er eldsD PEIP

r€QHHH re—l num˜ ersD PEIP

r€iˆ„sx ™ompiler utility pro ™edureD QER

r€p€gyx†i‚„intrinsi™D QEU

r€sxiˆ„ ™ompiler utility pro ™edureD QES D QET

r€€egg†eh ™ompiler pro ™edureD QES

r€€egg†heintrinsi™D QEW

r€€egg†hf intrinsi™D QEW

sndexER s™el—ndi™ n—tive l—ngu—ge ™h—r—™tersD QEP

s

siii —nd r€QHHH re—lsD rounding dieren™esD QET

siii ˜it form—tsD PEII

siii ™onversion formul—D PEIH

siii or r€QHHH form—t for re—l num˜ ersD PEV

siii re—l num˜ er eldsD PEIH

siii re—l num˜ ersD PEW

spsˆ ™ompiler fun™tionD QET

inex—™t errors ™onverting re—lsD QEV

sxiˆ„9 ™ompiler utility pro ™edureD QESD QET

innity —nd x—x tr—psD PEW

innity in re—l d—t— typ eD PEW

snstitute of ile™tri™—l —nd ile™troni™s ingineers form—tD PEW

sx„D —nd sx„9 ™ompiler fun™tionsD QET

integer ˜it form—tD PEU

integer d—t— typ eD PER

integerElikenum˜ er in re—l represent—tionD QEV

integers

™onverting fromD QES

re—ding —n unsignedD PES

re—ding — signedD PESD PET

representing signed —nd unsignedD PER

signedD PES

size —nd r—ngeD PER

unsignedD PER

writing —n unsigned de™im—l —s ˜in—ryD PES

integerD signed

˜in—ry to de™im—lD PES

de™im—l to ˜in—ryD PET

integerD unsigned

˜in—ry to de™im—lD PES

de™im—l to ˜in—ryD PES

interpreting — ˜in—ry signed integerD PESD PET

interpreting —n siii re—lD PEIH

interpreting —n unsigned integerD PES

intrinsi™ d—t— typ e notesD PEPP

intrinsi™ d—t— typ es ™omp—red to primitiv e typ esD PEPH

intrinsi™ w€i ˆv d—t— typ esD listedD IEP

inv—lid op er—tionD x—x —nd innityD PEW

st—li—n n—tive l—ngu—ge ™h—r—™tersD QEP

tsƒgs sD t—p—nese version of ƒ eƒgs sD QEQ

t

tsƒ @t—p—nese sntern—tion—l ƒt—nd—rd ™o deAD QEQ

uexeV n—tive l—ngu—ge supp ortD QEQ

u

ue„euexe l—ngu—ge ™h—r—™tersD QEQ

sndexES l—ngu—ge d—t— typ esD IEQ

v

l—ngu—ge d—t— typ es ™orresponden™eD PEPH

l—ngu—ges in xw —nd gw environmentsD IER D PEIW

l—ngu—geEsp e™i™ notes on d—t— ™orresponden™esD PEPP

vsxuevvsqxih optionD PEIW

m—ntiss— eld of re—lsD PEV

w

m—ntiss— represented in norm—lized formD PEV

x—n —nd innity tr—psD PEW

x

x—x in re—l d—t— typ eD PEW

xe„s†iEQHHHD QEP

xe„s†iEQHHH l—ngu—ge ™h—r—™tersD QEQ

n—tive l—ngu—ge ™h—r—™ter setsD QEP

n—tive l—ngu—ge numeri™ ™h—r—™ter form—tsD QEQ

x—tive wo de progr—mming environmentD IEQD PEIW

ni˜˜le ˜it form—tD PEIR

ni˜˜le ™om˜in—tions v—lid for digits of de™im—lD PEIS

ni˜˜le ™om˜in—tions v—lid for sign of de™im—lD PEIS

ni˜˜le in de™im—l typ eD PEIR

xvgyx†x w intrinsi™D QEQ

xvpw„x w intrinsi™D QEQ

xvsxpyintrinsi™D QEQ

xvx wƒ€ig intrinsi™D QER

xv‚i€gre‚ intrinsi™D QEQ

xw —nd gw environment progr—mming l—ngu—gesD IER

norm—lized feƒsg o—tingEp oint de™im—lsD PEIU

norm—lized form for re—l m—ntiss—D PEV

xorwegi—n n—tive l—ngu—ge ™h—r—™tersD QEP

xotE—Exum˜ er in re—l d—t— typ eD PEW

numeri™ ™h—r—™tersD ™onverting form—tsD QEQ

numeri™ d—t— typ esD listedD PER

o ™t—l ™h—r—™ter strings pref—™ed with 7D QER

y

overow or underow errors ™onverting re—lsD QEV

p—™ked de™im—l ˜it form—tD PEIT

€

p—™ked de™im—l ™ompiler routinesD QEI

p—™ked de™im—l op er—tions emul—ted in xwD PEIR

p—™ked de™im—lsD ™onverting fromD QEW

€—s™—l d—t— typ es ™omp—red to primitiv e typ esD PEPI

€—s™—l l—ngu—ge m—nu—lD IER

€—s™—lGˆv

l—ngu—ge notesD PEPR

€sg„ ‚i @€sgA ™l—use in gyfyvD PEISD PEPQ

primitiv e d—t— typ esD PEI

primitiv e d—t— typ es ™omp—red to gyfyvD ‚€qD py‚„‚exD €—s™—lD PEPI

primitiv e d—t— typ es ™omp—red to intrinsi™sD feƒsgD gD PEPH

primitiv e w€i ˆv d—t— typ esD listedD IEP

progr—mming l—ngu—ges d—t— typ e ™orresp onden™eD PEPH

progr—mming l—ngu—gesD xw —nd gw environmentsD IER

sndexET quiet x—nD PEW



r—nge —nd —™™ur—™y for feƒsg de™im—lsD PEIT

‚

r—nge —nd —™™ur—™y for re—l form—tsD PEV

r—nge —nd size of integersD PER

re—ding —n siii re—lD PEIH

re—ding —n unsigned integerD PES

re—ding — signed integerD PESD PET

re—ding — twos ™omplementintegerD PES

re—l form—t

eldsD PEV

r€QHHH or siiiD PEV

r—nge —nd —™™ur—™iesD PEV

singleEpre™ision or dou˜leEpre™isionD PEV

re—l num˜ er ˜it form—ts

r€QHHHD PEIQ

siiiD PEII

re—l num˜ er d—t— typ eD PEU

re—l num˜ er form—t

r€QHHHD PEIP

re—l num˜ er form—t ™onversion errorsD QEU

re—l num˜ er form—tsD list ofD QEU

re—l num˜ er represent—tionsD PEV

re—l num˜ ers

eldsD PEV

elds of r€QHHHD PEIP

elds of siiiD PEIH

form—tD PEU

r€QHHH form—tD PEIP

siii ™onverted to de™im—lE˜—seD PEIH

siii form—tD PEW

re—ding —n siiiD PEIH

zeroD innityD x—xD PEW

re—l num˜ ersD ™onverting fromD QET

re—l num˜ ers in siii not—tionD PEW

re—l num˜ ersD rounding siii —nd r€QHHHD QET

re—l num˜ ersD trun™—tingD QEV

re™ord —nd —rr—ytyp es in intrinsi™ p—r—metersD PEPP

registersD IEI

‚ywexVD QEP

rounding dieren™es in re—l num˜ ersD QET

rounding pro ™ess for re—lsD QEU

s™ienti™ not—tionD PEU

ƒ

sign—ling x—xD PEW

ƒsqx ™l—use in gyfyvD PEPQ

signed —nd unsigned integers representedD PER

signed de™im—lsD PEIS

signed integerD PES

sign eld of re—lsD PEV

sign ni˜˜le of de™im—lD PEIS

singleEpre™ision or dou˜leEpre™ision re—lsD PEV

size —nd —lignment of d—t— sp e™iedD IEQ

ƒp—nish n—tive l—ngu—ge ™h—r—™tersD QEP

sndexEU sp e™ied —lignment —nd size in form—tD IEQ

ƒ€v de™im—ls —nd ™ompiler routines to emul—teD QEI

ƒwedish n—tive l—ngu—ge ™h—r—™tersD QEP

syn™IT or syn™QP —lignmen t optionD PEIW

tr—nsl—ting re—l to de™im—lE˜—seD PEIH

„

tr—ps in ™onverting re—lsD QEU

trun™—ting re—l num˜ ersD QEV

„urkishV l—ngu—ge supp ortD QEQ

„urkishV n—tive l—ngu—ge ™h—r—™tersD QEQ

twos ™omplement formD PES

twos ™omplementinteger

™onverted from de™im—lD PET

™onverted to de™im—lD PES

undened num˜ ers in re—l d—t— typ eD PEW

underoworoverow errors ™onverting re—lsD QEV

unp—™ked de™im—l form—t @gyfyvD ‚€qAD PEIT

unp—™ked de™im—ls in gyfyvD PEPQ

unsigned —nd signed integers representedD PER

unsigned integersD PER

ƒeqi ™l—use in gyfyvD PEPQ

ƒeƒgs sD QEP

‡estern er—˜i™ n—tive l—ngu—ge ™h—r—™tersD QEQ

‡

wordD IEI

writing siii —s de™im—lE˜—sed num˜ erD PEIH

zero



feƒsg o—tingEp oint de™im—l typ eD PEIU

re—l d—t— typ eD PEW

sndexEV