+ All Categories
Home > Documents > internal memory_2.doc

internal memory_2.doc

Date post: 14-Apr-2018
Category:
Upload: ratnashankar
View: 216 times
Download: 0 times
Share this document with a friend
35
7/27/2019 internal memory_2.doc http://slidepdf.com/reader/full/internal-memory2doc 1/35 UTILITY PROGRAMS Now that you have learned about operating yte!" let# go into another type o$ progra!" utilitie% In addition to the utility commands &li'e di'(opy and rena!e)" whi(h are built into the operating yte!" you will probably have o!e independent utility programs% Thee are tandard progra! that run under (ontrol o$ the operating yte! *ut li'e your appli(ation progra!% They are (alled utilitie be(aue they per$or! general type o$ $un(tion that have little relationhip to the (ontent o$ the data% Utility progra! eli!inate the need $or progra!!er to write new progra! when all they want to do i (opy" print" or ort a data $ile% Although a new progra! i not needed" we do have to tell the progra! what we want it to do% +e do thi by providing in$or!ation about $ile" data $ield" and the pro(e to be ued% ,or e-a!ple" a ort progra! arrange data re(ord in a pe(i$ied order% You will have to tell the ort progra! what $ield to ort on and whether to ort in a(ending or de(ending e.uen(e% Let# e-a!ine two type o$ utility progra! to give you o!e idea o$ how a utility progra! wor'% The $irt will be ort/!erge and the e(ond the report progra! generator &RPG)% SORT/M0RG0 PROGRAMS Sorting i the ter! given to arranging data re(ord in a prede$ined e.uen(e or order% Merging i the (o!bining o$ two or !ore ordered $ile into one $ile% ,or e-a!ple" we nor!ally thin' o$ putting a lit o$ people# na!e in alphabeti(al order arranging the! in e.uen(e by lat na!e% +e arrange thoe with the a!e lat na!e in order by $irt na!e% I$ we do thi ourelve" we 'now the alphabeti( e.uen(e / B (o!e a$ter A, C a$ter B" and o on" and it i eay to arrange the lit" even i$ it i a ti!e (onu!ing *ob% On a (o!puter" the e.uen(e o$ (hara(ter i alo de$ined% It i (alled the collating sequence% 0very (oding yte! ha a (ollating e.uen(e% The (apability o$ a (o!puter to (o!pare two value and deter!ine whi(h i greater &B i greater than A, C i greater than B" and o on) !a'e orting poible% +hat about nu!ber and pe(ial (hara(ter1 They are alo part o$ the (ollating e.uen(e% In EBCDIC" &0234I3 i a (o!puter (ode that i di(ued in detail in (hapter 5) pe(ial (hara(ter" u(h a 6" 7" 8" and 9" (o!e in $ront o$ the alphabeti( (hara(ter" and nu!ber $ollow% +hen you ort re(ord in the de$ined e.uen(e" they are in ascending sequence% Mot ort progra! alo allow you to ort in revere order% Thi i (alled descending sequence% In 0234I3" it i :/;" </A" then pe(ial (hara(ter% To ort a data $ile" you !ut tell the ort progra! what data $ield or $ield to ort on% Thee $ield are (alled ort &or orting) 'ey% In our e-a!ple" the lat na!e i the !a*or ort 'ey and the $irt na!e i the !inor ort 'ey% Sorting i needed in !any appli(ation% ,or e-a!ple" $or !ailing we need addree in <IP 3ode order= peronnel re(ord !ay be 'ept in ervi(e nu!ber order= and inventory re(ord !ay be 'ept in to(' nu!ber
Transcript
Page 1: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 1/35

UTILITY PROGRAMS

Now that you have learned about operating yte!" let# go into

another type o$ progra!" utilitie% In addition to the utility commands

&li'e di'(opy and rena!e)" whi(h are built into the operating yte!"

you will probably have o!e independent utility programs% Thee are

tandard progra! that run under (ontrol o$ the operating yte! *utli'e your appli(ation progra!% They are (alled utilitie be(aue they

per$or! general type o$ $un(tion that have little relationhip to the

(ontent o$ the data% Utility progra! eli!inate the need $or

progra!!er to write new progra! when all they want to do i (opy"

print" or ort a data $ile% Although a new progra! i not needed" we do

have to tell the progra! what we want it to do% +e do thi by providing

in$or!ation about $ile" data $ield" and the pro(e to be ued% ,or

e-a!ple" a ort progra! arrange data re(ord in a pe(i$ied order% You

will have to tell the ort progra! what $ield to ort on and whether

to ort in a(ending or de(ending e.uen(e%

Let# e-a!ine two type o$ utility progra! to give you o!e idea o$

how a utility progra! wor'% The $irt will be ort/!erge and the

e(ond the report progra! generator &RPG)%

SORT/M0RG0 PROGRAMS

Sorting i the ter! given to arranging data re(ord in a prede$ined

e.uen(e or order% Merging i the (o!bining o$ two or !ore ordered

$ile into one $ile% ,or e-a!ple" we nor!ally thin' o$ putting a lit

o$ people# na!e in alphabeti(al order arranging the! in e.uen(e by

lat na!e% +e arrange thoe with the a!e lat na!e in order by $irt

na!e%

I$ we do thi ourelve" we 'now the alphabeti( e.uen(e / B (o!e

a$ter A, C a$ter B" and o on" and it i eay to arrange the lit" eveni$ it i a ti!e (onu!ing *ob% On a (o!puter" the e.uen(e o$

(hara(ter i alo de$ined% It i (alled the collating sequence% 0very

(oding yte! ha a (ollating e.uen(e% The (apability o$ a (o!puter to

(o!pare two value and deter!ine whi(h i greater &B i greater than A,

C i greater than B" and o on) !a'e orting poible% +hat about

nu!ber and pe(ial (hara(ter1 They are alo part o$ the (ollating

e.uen(e% In EBCDIC" &0234I3 i a (o!puter (ode that i di(ued in

detail in (hapter 5) pe(ial (hara(ter" u(h a 6" 7" 8" and 9" (o!e

in $ront o$ the alphabeti( (hara(ter" and nu!ber $ollow% +hen you

ort re(ord in the de$ined e.uen(e" they are in ascending sequence%

Mot ort progra! alo allow you to ort in revere order% Thi i

(alled descending sequence% In 0234I3" it i :/;" </A" then pe(ial

(hara(ter%

To ort a data $ile" you !ut tell the ort progra! what data $ield or

$ield to ort on% Thee $ield are (alled ort &or orting) 'ey% In

our e-a!ple" the lat na!e i the !a*or ort 'ey and the $irt na!e i

the !inor ort 'ey%

Sorting i needed in !any appli(ation% ,or e-a!ple" $or !ailing we

need addree in <IP 3ode order= peronnel re(ord !ay be 'ept in

ervi(e nu!ber order= and inventory re(ord !ay be 'ept in to(' nu!ber

Page 2: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 2/35

order% +e (ould go on and on% 2e(aue !any o$ our $ile are large"

orting i very ti!e (onu!ing" and it i one o$ the pro(ee !ot

ued on (o!puter yte!% A a uer" you will be(o!e very $a!iliar with

thi pro(e%

Sort/!erge progra! uually have phae% ,irt they initiali>e? read

the para!eter" produ(e the progra! (ode $or the ort" allo(ate the!e!ory pa(e" and et up other $un(tion% The ort/!erge progra! then

read in a !any input data re(ord a the !e!ory pa(e allo(ated (an

hold" arrange &ort) the! in e.uen(e" and write the! out to an

inter!ediate ort/wor' $ile% It (ontinue reading input" orting and

writing inter!ediate ort/wor' $ile until all the input i pro(eed%

It then !erge &(o!bine) the ordered inter!ediate ort/wor' $ile to

produ(e one output $ile in the e.uen(e pe(i$ied% The !erging pro(e

(an be a((o!plihed with le !e!ory than the ort pro(e in(e the

inter!ediate ort wor' $ile are all in the a!e e.uen(e% Re(ord $ro!

ea(h wor' $ile (an be read" the ort 'ey (o!pared baed on the

(ollating e.uen(e and ort para!eter" and re(ord written to the

output $ile !aintaining the pe(i$ied e.uen(e%

R0PORT PROGRAM G0N0RATORS

Report progra! generator &RPG) are ued to generate progra! to print

detail and u!!ary report o$ data $ile% ,igure @/ i an e-a!ple o$ a

printed report% RPG were deigned to ave progra!!ing ti!e% Rather

than writing pro(edural tep in a language li'e 2ASI3 or 3O2OL" the

RPG progra!!er write the printed report re.uire!ent on pe(ially

deigned $or!%

,igure @/% / Printed report uing a report progra! generator &RPG)

progra!%

In(luded in the re.uire!ent are an input $ile de(ription" the report

heading in$or!ation line" the input data re(ord $ield" the

Page 3: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 3/35

(al(ulation to be done" and the data $ield to be printed and

u!!ari>ed% The RPG progra! ta'e thi in$or!ation and generate a

progra! $or the pe(i$i( proble!% You then run that progra! with the

pe(i$ied input data $ile to produ(e the printed report% The input data

$ile !ut be in the e.uen(e in whi(h you want the report to u!!ari>e

the data%

In our e-a!ple &$ig% @/)" we u!!ari>ed re.uiition baed on unit

identi$i(ation (ode &UI3)% +e $irt orted the input data $ile on the

$ield that (ontain the UI3% +e provided pe(i$i(ation to the RPG

progra! to tell it to a((u!ulate total $ro! the detail &individual)

data re(ord until the UI3 (hanged% +e then told it to print the total

nu!ber o$ re.uiition and total (ot $or that UI3% +e did not have it

print ea(h detail re(ord" although we (ould have% The UI3 i (alled the

control field % 0a(h ti!e the (ontrol $ield (hange" there i a control

 break% 0a(h ti!e there i a (ontrol brea'" the progra! print the

u!!ary in$or!ation% A$ter all re(ord are read and pro(eed" it

print a u!!ary line &TOTALS) $or all UI3% You (an alo ue RPG to

generate a progra! to update data $ile%

B%C +hat progra! eli!inate the need $or progra!!er to write new

progra! when all they want to do i (opy" print" or ort a data $ile1

B%D Eow do we tell a utility progra! what we want it to do1

B%F +hat i the ter! given to arranging data re(ord in a prede$ined

e.uen(e or order1

B%: To ort a data $ile" what !ut you tell the ort progra!1

B%; +hat are report progra! generator ued $or1

PROGRAMMING LANGUAG0S

Progra!!er !ut ue a language that (an be undertood by the (o!puter%

Several !ethod (an a(hieve hu!an/(o!puter (o!!uni(ation% ,or e-a!ple"

let u au!e the (o!puter only undertand ,ren(h and the progra!!er

pea' 0nglih% The .uetion arie? Eow are we to (o!!uni(ate with the

(o!puter1 One approa(h i $or the progra!!er to (ode the intru(tion

with the help o$ a tranlating di(tionary be$ore giving the! to the

pro(eor% Thi would be $ine o $ar a the (o!puter i (on(erned=

however" it would be very aw'ward $or the progra!!er%

Another approa(h i a (o!pro!ie between the progra!!er and (o!puter%

The progra!!er $irt write intru(tion in a (ode that i eaier to

relate to 0nglih% Thi (ode i not the (o!puter# language= there$ore"

the (o!puter doe not undertand the order% The progra!!er olve thiproble! by giving the (o!puter another progra!" one that enable it to

tranlate the intru(tion (ode into it own language% Thi tranlation

progra!" $or e-a!ple" would be e.uivalent to an 0nglih/to/,ren(h

di(tionary" leaving the tranlating *ob to be done by the (o!puter%

The third and !ot deirable approa(h $ro! an individual# tandpoint

i $or the (o!puter to a((ept and interpret intru(tion written in

everyday 0nglih ter!% 0a(h o$ thee approa(he ha it pla(e in the

evolution o$ progra!!ing language and i ued in (o!puter today%

Page 4: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 4/35

MA3EIN0 LANGUAG0S

+ith early (o!puter" the progra!!er had to tranlate intru(tion into

the !a(hine language $or! that the (o!puter undertood% Thi language

wa a tring o$ nu!ber that repreented the intru(tion (ode and

operand addre&e)%

In addition to re!e!bering do>en o$ (ode nu!ber $or the intru(tion

in the (o!puter# intru(tion et" the progra!!er alo had to 'eep

tra(' o$ the torage lo(ation o$ data and intru(tion% Thi pro(e

wa very ti!e (onu!ing" .uite e-penive" and o$ten reulted in error%

3orre(ting error or !a'ing !odi$i(ation to thee progra! wa a very

tediou pro(e%

SYM2OLI3 LANGUAG0S

In the early :;" mnemonic intru(tion (ode and y!boli( addree

were developed% Thi i!proved the progra! preparation pro(e by

ubtituting letter y!bol & mnemonic codes) $or bai( !a(hine language

intru(tion (ode% 0a(h (o!puter ha !ne!oni( (ode" although they!bol vary a!ong the di$$erent !a'e and !odel o$ (o!puter% The

(o!puter till ue !a(hine language in a(tual pro(eing" but it

tranlate the y!boli( language into !a(hine language e.uivalent%

Sy!boli( language have !any advantage over !a(hine language (oding%

Le ti!e i re.uired to write a progra!% 4etail i redu(ed% ,ewer

error are !ade% 0rror whi(h are !ade are eaier to $ind" and progra!

are eaier to !odi$y%

PRO304UR0/ORI0NT04 LANGUAG0S

The develop!ent o$ !ne!oni( te(hni.ue and macroinstructions led to the

develop!ent o$ pro(edure/oriented language% Ma(rointru(tion allow

the progra!!er to write a ingle intru(tion that i e.uivalent to ape(i$ied e.uen(e o$ !a(hine intru(tion% Thee pro(edure/oriented

language are oriented toward a pe(i$i( (la o$ pro(eing proble!%

A (la o$ i!ilar proble! i iolated" and a language i developed to

pro(e thee type o$ appli(ation% Several language have been

deigned to pro(e proble! o$ a (ienti$i(/!athe!ati(al nature and

other that e!phai>e $ile pro(eing%

Pro(edure/oriented language were developed to allow a progra!!er to

wor' in a language that i (loe to 0nglih or !athe!ati(al notation%

Thi i!prove overall e$$i(ien(y and i!pli$ie the (o!!uni(ation

pro(e between the progra!!er and the (o!puter% Thee language have

allowed u to be !ore (on(erned with the proble! to be olved rather

than with the detail o$ (o!puter operation% ,or e-a!ple?

COBOL &CO!!on Buine Oriented Language) wa developed $or buine

appli(ation% It ue tate!ent o$ everyday 0nglih and i good $or

handling large data $ile%

FO!A" &FO !ula !A"lator) wa developed $or !athe!ati(al wor'% It i

ued by engineer" (ientit" tatiti(ian" and other where

!athe!ati(al operation are !ot i!portant%

Page 5: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 5/35

BA#IC &Beginner# A ll/$urpoe #y!boli( Intru(tion Code) wa deigned

a a tea(hing language to help beginning progra!!er write progra!%

There$ore" it i a general/purpoe" introdu(tory language that i

$airly eay to learn and to ue% +ith the in(reae in the ue o$

!i(ro(o!puter" 2ASI3 ha regained popularity and i available on !ot

!i(ro(o!puter yte!%

Other language gaining in popularity are $A#CAL and Ada% $A#CAL i

being ued by !any (ollege and univeritie to tea(h progra!!ing

be(aue it i $airly eay to learn= yet i a !ore power$ul language

than 2ASI3% Although PAS3AL i not yet a tandardi>ed language" it i

till ued rather e-tenively on !i(ro(o!puter% It ha greater

progra!!ing (apabilitie on !all (o!puter than are poible with

2ASI3%

Ada# develop!ent wa initiated by the U%S% 4epart!ent o$ 4e$ene

&4O4)% Ada i a !odern general/purpoe language deigned with the

pro$eional progra!!er in !ind and ha !any uni.ue $eature to aid in

the i!ple!entation o$ large (ale appli(ation and real/ti!e yte!%

2e(aue Ada i o trongly upported by the 4O4 and other advo(ate" it

will be(o!e an i!portant language li'e thoe previouly !entioned% It

pri!ary diadvantage relate to it i>e and (o!ple-ity" whi(h will

re.uire (oniderable ad*ut!ent on the part o$ !ot progra!!er%

The !ot $a!iliar o$ the pro(edure/oriented language are BA#IC and

FO!A" $or (ienti$i( or !athe!ati(al proble!" and COBOL $or $ile

pro(eing%

Progra! written in pro(edure/oriented language" unli'e thoe in

y!boli( language" !ay be ued with a nu!ber o$ di$$erent (o!puter

!a'e and !odel% Thi $eature greatly redu(e reprogra!!ing e-pene

when (hanging $ro! one (o!puter yte! to another% Other advantage to

pro(edure/oriented language are &) they are eaier to learn than

y!boli( language= &H) they re.uire le ti!e to write= &@) they

provide better do(u!entation= and &5) they are eaier to !aintain%

Eowever" there are o!e diadvantage o$ pro(edure/oriented language%

They re.uire !ore pa(e in !e!ory" and they pro(e data at a lower

rate than y!boli( language%

B% +ith early (o!puter" the progra!!er had to tranlate intru(tion

into what type o$ language $or!1

B%H +hen were !ne!oni( intru(tion (ode and y!boli( addree

developed1

B%@ +hat led to the develop!ent o$ pro(edure oriented language1

B%5 +hat (o!puter language wa developed $or !athe!ati(al wor'1

B% +hat are two diadvantage o$ pro(edure oriented language1

PROGRAMMING

Progra!!ing i" i!ply" the pro(e o$ planning the (o!puter olution

to a proble!% Thu" by writing?

Page 6: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 6/35

Ta'e the re(ipro(al o$ the reitan(e o$ all reitor &e-preed in

oh!)= Su! the value obtained in tep = Ta'e the re(ipro(al o$ the

u! derived in tep H%

A generali>ed pro(e or progra! $or $inding the total reitan(e o$ a

parallel reitan(e (ir(uit ha now been derived%

To progre $ro! thi e-a!ple to preparing a progra! $or a (o!puter i

not di$$i(ult% Eowever" one bai( (hara(teriti( o$ the (o!puter !ut

be 'ept in !ind% It (annot thin'% It (an only $ollow (ertain (o!!and"

and thee (o!!and !ut be (orre(tly e-preed and !ut (over all

poibilitie% Thu" i$ a progra! i to be ue$ul in a (o!puter" it

!ut be bro'en down into pe(i$i(ally de$ined operation or tep% Then

the intru(tion" along with other data ne(eary $or per$or!ing thee

operation or tep" !ut be (o!!uni(ated to the (o!puter in the $or!

o$ a language or (ode that i a((eptable to the !a(hine% In broad

ter!" the (o!puter $ollow (ertain tep in e-e(uting a progra!% It

!ut $irt read the intru(tion &e.uentially unle otherwie

progra!!ed)" and then in a((ordan(e with thee intru(tion" it

e-e(ute the $ollowing pro(edure?

• Lo(ate the para!eter &(ontant) and u(h other data a !ay be

ne(eary $or proble! olution

• Tran$er the para!eter and data to the point o$ !anipulation

• Manipulate the para!eter and data in a((ordan(e with (ertain

rule o$ logi(

• Store the reult o$ u(h !anipulation in a pe(i$i( lo(ation

• Provide the operator &uer) with a ue$ul output

0ven in a progra! o$ ele!entary (hara(ter u(h a the one above" thi

would involve brea'ing ea(h o$ the tep down into a erie o$ !a(hine

operation% Then thee intru(tion" para!eter" and the data ne(eary

$or proble! olution !ut be tranlated into a language or (ode thatthe (o!puter (an a((ept%

Ne-t" we#ll provide an introdu(tion to the proble! olving (on(ept and

$low (harting ne(eary to develop a progra!%

O0RI0+ O, PROGRAMMING

2e$ore learning to progra! in any language" it i help$ul to etablih

o!e (onte-t $or the produ(tive part o$ the entire progra!!ing e$$ort%

Thi (onte-t (o!prie the undertanding and agree!ent that there are

$our $unda!ental and di(rete tep involved in olving a proble! on a

(o!puter%

The $our tep are a $ollow?

• State" analy>e" and de$ine the proble!%

• 4evelop the progra! logi( and prepare a progra! $low(hart or

de(iion table%

• 3ode the progra!" prepare the (ode in !a(hine readable $or!"

prepare tet data" and per$or! debug and tet run%

Page 7: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 7/35

• 3o!plete the do(u!entation and prepare operator pro(edure $or

i!ple!entation and produ(tion%

,igure @/H depi(t the evolution o$ a progra!% Progra!!ing (an be

(o!pli(ated" and advan(e preparation i re.uired be$ore you (an

a(tually tart to write or (ode the progra!% The $irt two tep"

proble! undertandingJde$inition and $low(harting" $all into theadvan(e planning phae o$ progra!!ing% It i i!portant at thi point to

develop (orre(t habit and pro(edure" in(e thi will prevent later

di$$i(ultie in progra! preparation%

,igure @/H% / 0volution o$ a progra!%

+hether you are wor'ing with a yte! analyt" a (uto!er" or olving

a proble! o$ your own" it i e-tre!ely i!portant that you have a

thorough undertanding o$ the proble!%

0very ape(t o$ the proble! !ut be de$ined?

• +hat i the proble!1

• +hat in$or!ation &or data) i needed1

• +here and how will the in$or!ation be obtained1

• +hat i the deired output1

Starting with only a portion o$ the in$or!ation" or an in(o!plete

de$inition" will reult in having to (ontantly alter what ha been

Page 8: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 8/35

done to a((o!!odate the additional $a(t a they be(o!e available% It

i eaier and !ore e$$i(ient to begin progra!!ing a$ter all o$ the

ne(eary in$or!ation i undertood% On(e you have a thorough

undertanding o$ the proble!" the ne-t tep i $low(harting%

,LO+3EARTING

,low(harting i one !ethod o$ pi(torially repreenting a pro(edural

&tep/by/tep) olution to a proble! be$ore you a(tually tart to write

the (o!puter intru(tion re.uired to produ(e the deired reult%

,low(hart ue di$$erent haped y!bol (onne(ted by one/way arrow to

repreent operation" data $low" e.uip!ent" and o $orth%

There are two type o$ $low(hart" yte! &data) $low(hart and

progra!!ing $low(hart% A yte! &data) $low(hart de$ine the !a*or

phae o$ the pro(eing" a well a the variou data !edia ued% It

how the relationhip o$ nu!erou *ob that !a'e up an entire yte!%

In the yte! &data) $low(hart" an entire progra! run or phae i

alway repreented by a ingle pro(eing y!bol" together with the

inputJoutput y!bol howing the path o$ data through a proble!olution% ,or e-a!ple?

The e(ond type o$ $low(hart" and the one we will tal' about in thi

e(tion i the progra!!ing $low(hart% It i (ontru(ted by the

progra!!er to repreent the e.uen(e o$ operation the (o!puter i to

per$or! to olve a pe(i$i( proble!% It graphi(ally de(ribe what i

to ta'e pla(e in the progra!% It diplay pe(i$i( operation and

de(iion" and their e.uen(e within the progra!% ,or e-a!ple?

Page 9: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 9/35

Tool o$ ,low(harting

Ne-t we will ta'e a loo' at the tool ued in $low(harting% Thee tool

are the $unda!ental y!bol" graphi( y!bol" $low(harting te!plate"

and the $low(harting wor'heet%

F&"DA'E"!AL #('BOL#% / To (ontru(t a $low(hart" you !ut 'now the

y!bol and their related !eaning% They are tandard $or the !ilitary"

a dire(ted by Department of the Navy Automated Data Systems

Documentation Standards" S03NAINST H@@%

Sy!bol are ued to repreent $un(tion% Thee $unda!ental $un(tion

are pro(eing" de(iion" inputJoutput" ter!inal" $low line" and

(onne(tor y!bol% All $low(hart !ay be initially (ontru(ted uingonly thee $unda!ental y!bol a a rough outline to wor' $ro!% 0a(h

y!bol (orrepond to one o$ the $un(tion o$ a (o!puter and pe(i$ie

the intru(tion&) to be per$or!ed by the (o!puter% The (ontent o$

thee y!bol are (alled tate!ent% Sa!ple o$ thee $unda!ental

y!bol" de$inition" e-a!ple" and e-planation o$ their ue are

hown in $igure @/@%

,igure @/@% / ,unda!ental $low(harting y!bol%

Page 10: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 10/35

)A$*IC #('BOL#% / +ithin a $low(hart" graphi( y!bol are ued to

pe(i$y arith!eti( operation and relational (ondition%

The $ollowing are (o!!only/ued arith!eti( and relational y!bol%

+ plus, add

- minus, subtract

* multiply/ divide

± plus or minus

= equal to

> greater than

< less than

Page 11: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 11/35

≥ greater than or e.ual to

≤ le than or e.ual to

≠ not equal

Y! or YYes

 "# or ""o

$%& or $$rue

'()! or ''alse

FLO+C*A!I") !E'$LA!E% !o aid in dra-ing t.e flo-c.arting symbols,

you may use a flo-c.arting template% Figure /0 s.o-s a template

containing t.e standard symbol cutouts% A template is usually made of

 plastic -it. t.e symbols cut out to allo- tracing t.e outline%

Figure /0% Flo-c.art template%

FLO+C*A! +O1#*EE!% !.e flo-c.art -orks.eet is a means of

standardi2ing documentation% It pro3ides space for dra-ing programming

flo-c.arts and contains an area for identification of t.e 4ob,

including application, procedure, date, and page numbers 5fig% /67%

(ou may find it .elpful -.en you de3elop flo-c.arts% If you don8t .a3e

t.is form a3ailable, a plain piece of paper -ill do%

Figure /6% Flo-c.art -orks.eet%

Page 12: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 12/35

Constructing a Flo-c.art

!.ere is no 9best -ay9 to construct a flo-c.art% !.ere is no -ay to

standardi2e problem solution% Flo-c.arting and programming tec.niques

are often unique and conform to t.e indi3idual8s o-n met.ods ordirection of problem solution%

!.is section -ill s.o- an e:ample of de3eloping a programming

flo-c.art% It is not t.e intent to say t.is is t.e best -ay; rat.er, it

is one -ay to do it%

By follo-ing t.is te:t e:ample you s.ould grasp t.e idea of sol3ing

 problems t.roug. flo-c.art construction% As you gain e:perience and

familiarity -it. a computer system, t.ese ideas -ill ser3e as a

foundation%

!o de3elop a flo-c.art, you must first kno- -.at problem you are to

sol3e% It is t.en your 4ob to study t.e problem definition and de3elopa flo-c.art to s.o- t.e logic, steps, and sequence of steps t.e

computer is to e:ecute to sol3e t.e problem%

 As an e:ample, suppose you .a3e taken a s.ortterm second mortgage on a

ne- .ome, and you -ant to determine -.at your real costs -ill be, t.e

amount of interest, t.e amount to be applied to principal, and t.e

final payment at t.e end of t.e /year loan period%

Page 13: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 13/35

!.e first step is to be sure you understand t.e problem completely

 +.at are t.e inputs and t.e outputs and -.at steps are needed to ans-er

t.e questions< E3en -.en you are specifying a problem of your o-n, you

 -ill find -e don8t usually t.ink in small, detailed sequential steps%

*o-e3er, t.at is e:actly .o- a computer operates, one step after

anot.er in a specified order% !.erefore, it is necessary for you to

t.ink t.e problem solution t.roug. step by step% (ou mig.t clarify t.e

 problem as s.o-n by t.e $roblem Definition in figure /=%

Figure /=% $roblem definition and programming flo-c.art%

 After you .a3e t.is le3el of narrati3e problem definition, you are

ready to de3elop a flo-c.art s.o-ing t.e logic, steps, and sequence of

steps you -ant t.e computer to e:ecute to sol3e t.e problem% A

 programming flo-c.art of t.is problem is also s.o-n in figure /=%

#tudy bot. t.e problem definition and t.e flo-c.art to see t.eir

relations.ip and content%

(ou no- .a3e a plan of -.at you -ant t.e computer to do% !.e ne:t step

is to code a program t.at can be translated by a computer into a set of

instructions it can e:ecute% !.is step is called program coding%

%#%( #."

Page 14: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 14/35

t is important to remember program coding is not the 0irst step o0 programming1 $oo

o0ten 2e have a tendency to start coding too soon1 (s 2e 3ust discussed, a great deal o0

 planning and preparation must be done be0ore sitting do2n to code the computerinstructions to solve a problem1 'or the e4ample amorti5ation problem 60ig1 7-89, 2e have

analy5ed the speci0ications in terms o0 6:9 the output desired; 69 the operations and

 procedures required to produce the output; and 679 the input data needed1 n con3unction2ith this analysis, 2e have developed a programming 0lo2chart that outlines the

 procedures 0or taing the input data and processing it into usable output1 You are no2

ready to code the instructions that 2ill control the computer during processing1 $hisrequires that you no2 a programming language1

(ll programming languages, '#%$%(", ##), (! and so on, are composed o0

instructions that enable the computer to process a particular application, or per0orm a

 particular 0unction1

nstructions

$he instruction is the 0undamental element in program preparation1 )ie a sentence, an

instruction consists o0 a sub3ect and a predicate1 ?o2ever, the sub3ect is usually not

speci0ically mentioned; rather it is some implied part o0 the computer system directed to

e4ecute the command that is given1 'or e4ample, the chie0 tells a sailor to @dump thetrash1@ $he sailor 2ill interpret this instruction correctly even though the sub3ect @you@ is

omitted1 !imilarly, i0 the computer is told to @ADD 1234,@ the control section may

interpret this to mean that the arithmetic-logic section is to add the contents o0 address

1234 to the contents o0 the accumulator 6a register in 2hich the result o0 an operation is

0ormed91

n addition to an implied sub3ect, every computer instruction has an e4plicit predicateconsisting o0 at least t2o parts1 $he 0irst part is re0erred to as the command, or operation;it ans2ers the question @2hatA@ t tells the computer 2hat operation it is to per0orm; i1e1,

read, print, input1 ach machine has a limited number o0 built-in operations that it is

capable o0 e4ecuting1 (n operation code is used to communicate the programmerBs intentto the computer1

$he second speci0ic part o0 the predicate, no2n as the operand, names the ob3ect o0 the

operation1 n general, the operand ans2ers the question @2hereA1@ #perands may indicate

the 0ollo2ingC

$he location 2here data to be processed is 0ound1• $he location 2here the result o0 processing is to be stored1

• $he location 2here the ne4t instruction to be e4ecuted is 0ound1 6Dhen this type

o0 operand is not speci0ied, the instructions are e4ecuted in sequence19

$he number o0 operands and the structure or 0ormat o0 the instructions vary 0rom onecomputer to another1 ?o2ever, the operation al2ays comes 0irst in the instruction and is

Page 15: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 15/35

0ollo2ed by the operand6s91 $he programmer must prepare instructions according to the

0ormat required by the language and the computer to be used1

nstruction !et

$he number o0 instructions in a computerBs instruction set may range 0rom less than 7E tomore than :EE1 $hese instructions may be classi0ied into categories by the action they

 per0orm such as input/output 6I/O9, data movement, arithmetic, logic, and trans0er o0

control1 nput/output instructions are used to communicate bet2een /# devices and thecentral processor1 .ata movement instructions are used 0or copying data 0rom one storage

location to another and 0or rearranging and changing o0 data elements in some prescribed

manner1

(rithmetic instructions permit addition, subtraction, multiplication, and division1 $heyare common in all digital computers1 )ogic instructions allo2 comparison bet2een

variables, or bet2een variables and constants1 $rans0er o0 control instructions are o0 t2o

types, conditional and unconditional1 onditional trans0er o0 control instructions are usedto branch or change the sequence o0 program control, depending on the outcome o0 the

comparison1 0 the outcome o0 a comparison is true, control is trans0erred to a speci0ic

statement number1 0 it proves 0alse, processing continues sequentially through the

 program1 &nconditional trans0er o0 control instructions are used to change the sequenceo0 program control to a speci0ied program statement regardless o0 any condition1

oding a rogram

%egardless o0 the language used, there are strict rules the programmer must adhere to

2ith regard to punctuation and statement structure 2hen coding any program1 &sing the

 programming 0lo2chart introduced earlier, 2e have no2 added a program coded in(! to sho2 the relationship o0 the 0lo2chart to the actual coded instructions 60ig1 7-

F91 .onBt 2orry about complete understanding, 3ust loo at the instructions 2ith the0lo2chart to get an idea o0 2hat coded instructions loo lie1

'igure 7-F1 - rogramming 0lo2chart and coded program1

Page 16: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 16/35

You 2ill have to have speci0ic in0ormation about the computer you are to use1 t 2ill tell

you ho2 the language is implemented on that particular computer, in order to code a

 program1 $he computer manu0acturers or so0t2are designer 2ill provide these speci0ics

in their userBs manual1

Get a copy of the user's manual and study it before you begin to code $he

di00erences may seem minor to you, but they may prevent your program 0rom running1

#nce coding is completed, the program must be debugged and tested be0ore

implementation1

.ebugging

rrors caused by 0aulty logic and coding mistaes are re0erred to as @bugs1@ 'inding and

correcting these mistaes and errors that prevent the program 0rom running and

 producing correct output is called @debugging1@

%arely do comple4 programs run to completion on the 0irst attempt1

#0ten, time spent debugging and testing equals or e4ceeds the time spent in programcoding1 $his is particularly true i0 insu00icient time 2as spent on program de0inition and

logic development1 !ome common mistaes 2hich cause program bugs are mistaes in

coding punctuation, incorrect operation codes, transposed characters, eying errors, and0ailure to provide a sequence o0 instructions 6a program path9 needed to process certain

conditions1

Page 17: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 17/35

$o reduce the number o0 errors, you 2ill 2ant to care0ully chec the coding sheets be0ore

they are eyed into the computer1 $his process is no2n as @des-checing@ and should

include an e4amination 0or program completeness1 $ypical input data should be manuallytraced through the program processing paths to identi0y possible errors1 n e00ect, you 2ill

 be attempting to play the role o0 the computer1 (0ter you have des checed the program

0or accuracy, the program is ready to be assembled or compiled1 (ssembly and compiler programs prepare your program 6source program9 to be e4ecuted by the computer, and

they have error diagnostic 0eatures 2hich detect certain types o0 mistaes in your

 program1 $hese mistaes must be corrected1 ven 2hen an error-0ree pass o0 the programthrough the assembly or compiler program is accomplished, this does not mean your

 program is per0ected1 ?o2ever, it usually means the program is ready 0or testing1

$esting

#nce a program reaches the testing stage, generally, it has proved it 2ill run and produce

output1 $he purpose o0 testing is to determine that all data can be processed correctly and

that the output is correct1 $he testing process involves processing input test data that 2ill produce no2n results1 $he test data should includeC 6:9 typical data, 2hich 2ill test the

commonly used program paths; 69 unusual but valid data, 2hich 2ill test the program paths used to process e4ceptions; 679 incorrect, incomplete, or inappropriate data, 2hich

2ill test the programBs error routines1 0 the program does not pass these tests, more

testing is required1 You 2ill have to e4amine the errors and revie2 the coding to maethe coding corrections needed1 Dhen the program passes these tests, it is ready 0or

computer implementation1 e0ore computer implementation taes place, documentation

must be completed1

.ocumentation

.ocumentation is a continuous process, beginning 2ith the problem de0inition1

.ocumentation involves collecting, organi5ing, storing, and other2ise maintaining a

complete record o0 the programs and other documents associated 2ith the data processing

system1

$he "avy has established documentation standards to ensure completeness anduni0ormity 0or computer system in0ormation bet2een commands and bet2een civilian

and "avy organi5ations1 !"#$A%I$!& 2331 establishes minimum documentation

requirements1

( documentation pacage should includeC

( de0inition o0 the problem1 Dhy 2as the program 2rittenA Dhat 2ere the ob3ectivesA

Dho requested the program, and 2ho approved itA $hese are the types o0 questions that

should be ans2ered1

( description o0 the system1 $he system environment 6hard2are, so0t2are, andorgani5ation9 in 2hich the program 0unctions should be described 6including systems

Page 18: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 18/35

0lo2charts91 eneral systems speci0ications outlining the scope o0 the problem, the 0orm

and type o0 input data to be used, and the 0orm and type o0 output required should be

clearly de0ined1

( description o0 the program1 rogramming 0lo2charts, program listings, program

controls, test data, test results, and storage dumps - these and other documents thatdescribe the program and give a historical record o0 problems and/or changes should be

included1

#perator instructions1 tems that should be included are computer s2itch settings, loading

and unloading procedures, and starting, running, and termination procedures1

mplementation

(0ter the documentation is complete, and the test output is correct, the program is ready

0or use1 0 a program is to replace a program in an e4isting system, it is generally 2ise to

have a period o0 parallel processing; that is, the 3ob application is processed both by theold program and by the ne2 program1 $he purpose o0 this period is to veri0y processing

accuracy and completeness1

G1:8 Dhat is programmingA

G1:F n programming, ho2 many steps are involved in solving a problem on a computerA

G1:H Dhat is required be0ore you can actually start to 2rite or code a programA

G1:I n 0lo2charting, 2hat method is used to represent di00erent operations, data 0lo2,

equipment, and so 0orthA

G1E Dhat type o0 0lo2chart is constructed by the programmer to represent the sequence

o0 operations the computer is to per0orm to solve a speci0ic problemA 

G1: ?o2 many tools are used in 0lo2chartingA 

G1 s there a @best 2ay@ to construct a 0lo2chartA

G17 Dhat controls the computer during processingA

G1J Dhat is the 0undamental element in program preparationA

G1K Dhat type o0 instructions permit addition, subtraction, multiplication, and divisionA

G18 Dhere is speci0ic in0ormation about the computer you are to use containedA

G1F ?o2 do 2e re0er to errors caused by 0aulty logic and coding mistaesA

G1H Dhat is the purpose o0 testing a programA 

(L(. !#'$D(%

'ortunately you donBt have to 2rite a program 0or every problem to be solved1 nstead,

you can use pacaged or o00-the-shel0 programs that are designed 0or speci0ic classes o0

Page 19: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 19/35

applications1 veryday more and more pacaged so0t2are 6so0t2are 2ritten by the

manu0acturer, a so0t2are house, or central design agency (#DA)9 becomes available 0or

general use1 t may be up to you to set up and process a 3ob 2ithin the speci0ications o0 a pacaged program1 )etBs loo at 0our classes o0 pacaged so0t2are you may 2or 2ithC

*ord processing+ data management+ spreadsheets+ and graphics 

D#%. %#!!"

You can use *ord processing soft*are 0or any 0unction that involves te4tC letters,memos, 0orms, reports, and so on1 (t a minimum, it includes routines 0or creating,

editing, storing, retrieving, and printing te4t1 &nder the 2ord processing so0t2are control,

you generally enter the te4t on the eyboard and it is printed on a display screen as sho2nin 0igure 7-H1 (t that point, you may store it on dis or tape, print it on a printer, or

change 6edit9 it1 &sing the edit 0unctions you can add or delete 2ords, characters, lines,

sentences, or paragraphs1 You can rearrange te4t; 0or e4ample, move a paragraph or bloc

o0 in0ormation to another place in the same document or even move it to a di00erent

document1 Dord processing is particularly use0ul 0or te4t documents that are repetitive orthat require a lot o0 revisions1 t saves a lot o0 reeying1

'igure 7-H1 - Dord processing e4ample1

#ther 0eatures and so0t2are o0ten available 2ith a 2ord processing so0t2are pacageincludeC spelling checers, mailing list programs, document compilation programs, and

communications programs1

Page 20: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 20/35

!pelling chec,er so0t2are helps 0ind misspelled 2ords but not misused 2ords1 t scans

the te4t matching each 2ord against a dictionary o0 2ords1 0 the 2ord is not 0ound in the

dictionary, the system 0lags the 2ord1 You chec it1 0 it is misspelled, you can correct it1You 2ill still have to proo0read the document to see that everything 2as eyed and that

the 2ords are used correctly1

-ailing list programs are 0or maintaining name and address 0iles1 $hey o0ten include a

capability to individuali5e letters and reports by inserting names, 2ords, or phrases to personali5e them1

Document compilation programs are use0ul 2hen you have standard paragraphs o0

in0ormation that you need to combine in di00erent 2ays 0or various purposes1 'ore4ample, you may be ans2ering inquiries or putting together contracts or proposals1 #nce

you select the standard paragraphs you 2ant, you add variable in0ormation1 $his saves

 both eying and proo0reading time1

#ommunications soft*are and hard*are enable you to transmit and receive te4t onyour microcomputer1 any organi5ations use this capability 0or electronic mail1 n a

matter o0 minutes you can enter and transmit a memo to other commands or to personnel

in other locations1 You can transmit monthly reports, notices, or any documents prepared

on the microcomputer1

.($( ("("$

Data management soft*are allo2s you to enter data and then retrieve it in a variety o0

2ays1 You de0ine your data 0ields and set up a display screen 2ith prompts1 You enter the

data records according to the prompts1 'igure 7-I, vie2 (, sho2s an e4ample1 $he

system 2rites the records on a dis or tape1 #nce you have a 0ile eyed and stored, youcan retrieve records by a 0ield or several 0ields or by searching the records 0or speci0ic

data1 'or e4ample, i0 you 2anted a list o0 all personnel 2ho reported aboard be0oreManuary :IHH, you could tell the system to search the 0ile and print selected 0ields o0 all

records that meet that condition1 You tell the system 2hat 0ields to print 6that is name,

rate, !!", date reported9 and 2here 62hat print positions9 to print them1 (t the same

time, you can speci0y in 2hat order you 2ant the records printed1 'or e4ample, 0igure 7-I, vie2 , sho2s the records printed in alphabetical order by last name1 $he so0t2are also

 provides routines so you can easily add, delete, and change records1

'igure 7-I(1 - .ata management e4ample1 %#$! 6" #).9 (". .($( 6"

$()!91

Page 21: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 21/35

'igure 7-I1 - .ata management e4ample1 !() %"$. %#%$ 6!#%$. Y

)(!$ "(91

You can also generate reports by speci0ying 2hat records to use, 2hat 0ields to print,

2here to print the 0ields, and 2hich data 0ields, i0 any, need to be combined1 'or e4ample,your supply o00icer 2ants to no2 the value o0 the inventory1 You can speci0y that thee4tended price is to be calculated by multiplying the item quantity by the unit price, and

that the e4tended prices are to be totaled1

"N"$#%Y N()& $ G&("$$Y &"$ % O$".. %

!2abs JF :18K FF1KK

Page 22: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 22/35

rooms 8 1K :7I1KE

'o4tails 78 :1HK 8818E

$#$() H718K

You can also speci0y the in0ormation to be used in report and column headings1

Dhile the data management programs on micros are not as sophisticated as the data base

management systems on main0rames and minis, they do provide an e4tremely use0ul

capability in o00ices or aboard ship1

!%(.!?$!

!preadsheets are tables o0 ro2s and columns o0 numbers1 'igure 7-:E sho2s an e4ample1

!preadsheet processors allo2 you to set up a table o0 ro2s and columns and speci0y

2hat calculations to per0orm on the columns1 You enter values 0or the basic in0ormation

into the appropriate ro2s and columns1 $hen the processor per0orms the calculations1 nour e4ample 60ig1 7-:E9, 2e used a spreadsheet to pro3ect magnetic media costs1 You

enter the item descriptions, column headings, report title, and data 0or columns :, , and

J, and the so0t2are calculates column 7 by adding columns : and 1 $hen it multipliescolumn 7 times column J and puts the result in column K1 t also subtotals and totals the

columns you speci0y; in this case, columns : through 7 and column K1

'igure 7-:E1 - !preadsheet e4ample1

Page 23: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 23/35

%(?!

raphics capability is available on many microcomputers1 #ne use is to produce

datadisplays, lie bar charts, pie charts, and graphs1 !ee 0igure 7-::, vie2 ( and vie2 1#nsome micros, you can do line dra2ings; on others you can create sophisticated

engineeringdra2ings1 ?igh resolution color graphics are also available 0or speciali5edapplications1

'igure 7-::(1 - raphics e4amples1 ?(%$

Page 24: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 24/35

'igure 7-::1 - raphics e4amples1 (% ?(%$

You cannot use all printers 0or graphics output1 $hey must be capable o0 producing

graphics and also be compatible 2ith the so0t2are1 !ome character printers can be used0or limited graphics1 .ot-matri4 printers and plotters 2or 2ell 0or graphics output1 )aser

and in 3et printers are also good 0or both te4t and graphics1

G1I Dhat is pacaged so0t2areA G17E Dhat are some o0 the other 0eatures and so0t2are available 2ith a 2ord processing

so0t2are pacageA

G17: Dhat so0t2are allo2s you to enter data and then retrieve it in a variety o0 2aysA

Page 25: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 25/35

G17 Dhat are spreadsheetsA

G177 (re all printers capable o0 handling graphics outputA

4ATA R0PR0S0NTATION AN4 3OMMUNI3ATIONS

L0ARNING O2K03TI0S

Upon (o!pletion o$ thi (hapter" you will be able to do the $ollowing?

• 0-plain data and how it i repreented%

• 0-plain (o!puter (oding yte!%

•4e$ine a parity bit and what it i ued $or%

• 0-plain data torage (on(ept%

• 4e(ribe three torage a((e !ethod%

• 4e(ribe networ' and data (o!!uni(ation%

INTRO4U3TION

One o$ the !a*or proble! we $a(e in uing a digital (o!puter i

(o!!uni(ating with it% +e !ut have one or !ore way o$ getting data

into the (o!puter to be pro(eed% You learned in (hapter H that there

are everal type o$ input devi(e that read data into a (o!puter% 2ut

how doe one prepare the data to be ued a input1 Eow do we (onvert

hu!an/readable do(u!ent into a (o!puter/readable $or!" and what type

o$ input !edia do we ue1 I$ the data i to be ued by another (o!putero!e ditan(e away" how do we tran!it it1 +ell" a you probably

upe(t" there are everal way to per$or! thi (onverion and

tran!iion pro(e" and that i the (hapter o$ our di(uion%

4ATA

4ata i a general ter! ued to de(ribe raw $a(t% To put it i!ply"

data i nothing !ore than a (olle(tion o$ related ele!ent or ite!"

that when properly (oded into o!e type o$ input !ediu!" (an be

pro(eed by a (o!puter% 4ata ite! !ight in(lude your ervi(e nu!ber"

your na!e" your paygrade" or any other $a(t% Until o!e !eaning ha

been given to the data" nothing (an really be deter!ined about it=

there$ore" it re!ain data% +hen thi data ha been pro(eed togetherwith other $a(t" it then ha !eaning and it be(o!e in$or!ation we (an

undertand and properly ue%

4ATA R0PR0S0NTATION

4ata i repreented by y!bol% Sy!bol (onvey !eaning only when

undertood% The y!bol itel$ i not the in$or!ation" but !erely a

repreentation o$ it% Sy!bol !eaning i one o$ (onvention &$ig% 5/

Page 26: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 26/35

)%Sy!bol !ay (onvey one !eaning to you and !e" another !eaning to

other" and no !eaning at all to thoe that do not 'now their

igni$i(an(e% 4ata !ut be redu(ed to a et o$ y!bol that the

(o!puter (an read and interpret be$ore there (an be any (o!!uni(ation

with the (o!puter% The $irt (o!puter were deigned to !anipulate

nu!ber to olve arith!eti( proble!% 2ut a you (an ee in $igure 5/"

we (reate" ue" and !anipulate !any other y!bol to repreent $a(t in

the world in whi(h we live% +e are $ortunate that early (o!puter

e-pert oon reali>ed the need to !anipulate nonnu!eri(al y!bol a

well% Manipulating thee y!bol i poible i$ an identi$ying (ode or

(oded nu!ber i aigned to the y!bol to be tored and pro(eed%

Thu" the letter in a na!e u(h a AL20RT or 3AROL (an be repreented

by di$$erent (ode" a (an all pe(ial (hara(ter" u(h a 6" &")" 8"

7" " and ye" even the (o!!a% The data to be repreented i (alled

our(e data%

,igure 5/% / 3o!!uni(ation y!bol%

SOUR30 4ATA

Sour(e data or raw data i typi(ally written on o!e type o$ paper

do(u!ent" whi(h we re$er to a a source document% The data (ontained on

the our(e do(u!ent !ut be (onverted into a !a(hine/readable $or! $or

pro(eing either by dire(t or indire(t !ean% The data !ay be entered

dire(tly into the (o!puter in it original $or!= na!ely right $ro! the

our(e do(u!ent on whi(h it i re(orded by way o$ !agneti( in'

(hara(ter" opti(ally re(ogni>able (hara(ter" or bar (ode re(ognition%

Or the data on the do(u!ent !ay be entered indire(tly on input !edia"

Page 27: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 27/35

u(h a pun(hed (ard" paper tape" !agneti( tape" or !agneti( di'% It

!ay alo be 'eyed dire(tly into a (o!puter $ro! a 'eyboard%

I$ you loo' at $igure 5/H" you ee a lit o$ S0RMART ite! that have

been typed on a preprinted $or!% To !ot people thi i *ut another

pie(e o$ paper= however" to the Store'eeper &S) it i a our(e

do(u!ent to be ued to provide input data to the (o!puter% In thie-a!ple" the S0RMART $or! deal with re.uiitioning upplie% The $or!

(ould be ent to the data/entry depart!ent to be ued a a our(e

do(u!ent% There the data/entry operator (an 'ey the data into or on

whatever (o!puter !ediu! i to be ued" a((ording to a pre(ribed

$or!at% The data ele!ent are nu!bered in the order they are to be

'eyed? &) do(u!ent identi$i(ation" &H) to(' nu!ber" &@) unit o$

iue" &5) .uantity" and o on% You#ll noti(e we need !ore than

nu!ber" and that i where (oding yte! (o!e into play%

,igure 5/H% / S0RMART hopping lit &our(e do(u!ent)%

B% +hat i a general ter! ued to de(ribe raw $a(t1

B%H Eow i data repreented1

B%@ +hat were the $irt (o!puter deigned to !anipulate in order to

olve arith!eti( proble!1

B%5 2y what two !ean (an the data (ontained on a our(e do(u!ent be

(onverted into a !a(hine/readable $or! $or pro(eing1B% +hat are o!e o$ the type o$ input !edia on whi(h data !ay be

indire(tly entered1

Page 28: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 28/35

2a('  Eo!e  Up  Ne-t 

4ATA STORAG0 3ON30PTS

You learned in (hapter H that a (o!puter# pri!ary torage area i

divided into $our area" ea(h erving a pe(i$i( purpoe% The input

storage area a((ept and hold input data to be pro(eed% The -orkingstorage area hold inter!ediate pro(eing reult% The output storage

area hold the $inal pro(eing reult% The program storage area hold

the pro(eing intru(tion &the progra!)% You alo learned that thee

eparate area do not have built/in phyi(al boundarie" rather the

boundarie are deter!ined by the individual progra! being ued%

You alo !ay re(all in (hapter H" we tal'ed about the di$$erent type

o$ pri!ary torage ued in (o!puter and how they di$$er $ro! one

another% So!e were !agneti( in nature" u(h a !agneti( (ore torage=

other were ele(troni(" u(h a e!i(ondu(tor and bubble torage% ,or

purpoe o$ i!pli(ity" we have ele(ted !agneti( (ore torage to how

you how data i repreented and tored in the (o!puter# pri!ary

!e!ory%

2ITS AN4 2YT0S

A bit i a ingle binary digit% It repreent the !allet unit o$ data

*ut li'e the good old A!eri(an penny)% Eowever" (o!puter uually do

not operate on ingle bit" rather they tore and !anipulate a $i-ed

nu!ber o$ bit% Mot o$ten" the !allet unit or nu!ber o$ bit a

(o!puter wor' with i eight bit% Thee eight bit !a'e up a byte% You

*ut learned that both 0234I3 and AS3II (ode ue eight bit &e-(luding

the parity bit)" and that eight bit repreent a ingle (hara(ter" u(h

a the letter A  or the nu!ber >% Thu" the (o!puter (an tore and

!anipulate an individual byte &a ingle (hara(ter) or a group o$ byte

&everal (hara(ter" a word) at a ti!e% Thee individual byte" orgroup o$ byte" $or! the bai( unit o$ !e!ory%

Pri!ary torage (apa(itie are uually pe(i$ied in nu!ber o$ byte%

The y!bol 919 i ued whenever we re$er to the i>e o$ !e!ory"

epe(ially when the !e!ory i .uite large%The y!bol 1  i e.ual to

?,@0 unit or poition o$ torage% There$ore" i$ a (o!puter ha 6?1  

byte &not bit) o$ pri!ary torage" then it (an hold 6? ?,@0 or

60, (hara(ter &byte) o$ data in it !e!ory%

MAGN0TI3 3OR0 STORAG0

In pri!ary torage" !any !agneti( (ore are trung together on a (reen

o$ wire to $or! what i (alled a core plane &$ig% 5/F" view A)% A you!ay 'now" ea(h (ore (an tore one binary bit &; or ) o$ data% A (ore

i !agneti>ed by (urrent $lowing through the wire on whi(h the (ore i

trung% Een(e" a (ore !agneti>ed in one dire(tion repreent a binary

;" and when !agneti>ed in the oppoite dire(tion" a binary % It i the

dire(tion that the (ore i !agneti>ed that deter!ine whether it

(ontain a binary ; or a binary &re$er to $ig% 5/F" view 2)% Thee

(ore plane loo' very !u(h li'e !all window (reen and are arranged

3ertically to repreent data a hown in $igure 5/F" view 3% In loo'ing

at thi $igure" you will noti(e that nine planes are needed to (ode in

Page 29: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 29/35

F/bit 0234I3% The ninth plane provide $or a parity &(he(') bit% ,igure

5/F" view 3" how 4P/@ in 0234I3 (ode" even parity%

,igure 5/FA% / 3ore torage with 4P/@ repreented uing F/bit 02343

(ode%

,igure 5/F2% / 3ore torage with 4P/@ repreented uing F/bit 02343

(ode%

,igure 5/F3% / 3ore torage with 4P/@ repreented uing F/bit 02343

(ode%

Page 30: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 30/35

STORAG0 3APA3ITY AN4 A44R0SS0S

The torage (apa(ity o$ an addre i deigned and built into the

(o!puter by the !anu$a(turer% Over the year everal di$$erent deign

approa(he to partition pri!ary torage have been ued% +ith thi in

!ind" let# ta'e a loo' at o!e o$ the way pri!ary torage i

partitioned into addree%

One way to deign or organi>e the pri!ary torage e(tion i to tore a

fi:ed number o$ (hara(ter &byte) at ea(h addre lo(ation% +e (an

then re$eren(e thee (hara(ter a a ingle entity (alled a -ord " a

illutrated in $igure 5/:" view A% The na!e C*ALIE &addre lo(ation

5;;) or the a!ount he i paid" in thi (ae

7C:%;; &addre lo(ation 5;)" are ea(h treated a a ingle word%

3o!puter that are built to retrieve" !anipulate" and tore a $i-ed

nu!ber o$ (hara(ter in ea(h addre are aid to be -ordoriented "

 -ordaddressable !a(hine" or fi:ed-ordlengt. (o!puter%

,igure 5/:A% / ,i-ed/word/length v variable/word/length torage%

,I04/L0NGTE +OR4S" 3ONTAINING 0IGET 3EARA3T0RS 0A3E" O33UPYING T+O

A44R0SS LO3ATIONS &+OR4 A44R0SSA2L0)%

Page 31: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 31/35

Another way to deign the pri!ary torage e(tion i to tore a ingle

(hara(ter" u(h a the letter L or the nu!ber F" in ea(h addre

lo(ation% An addre i aigned to ea(h lo(ation in torage% 3o!puter

deigned in thi way are aid to be c.aracteroriented  or c.aracter

addressable% +e alo (all the! variable/word/length (o!puter%

There$ore" the na!e C*ALIE &$ig% 5/: " view 2) now re.uire even

addre lo(ation &@;; through @;C)" while a!ount paid &7C:%;;)

o((upie i- addre lo(ation &@;D through @H)%

,igure 5/:2% / ,i-ed/word/length v variable/word/length torage%

ARIA2L0/L0NGTE +OR4S &3EARA3T0R A44R0SSA2L0)

+hether a (o!puter addree a group o$ byte a a word or addree

ea(h byte individually i a $un(tion o$ the (ir(uitry% 2oth deign

have advantage and diadvantage% ariable/word/length (o!puter !a'e

the !ot e$$i(ient ue o$ available torage pa(e" in(e a (hara(ter

(an be pla(ed in every torage lo(ation% In a $i-ed/word/length

(o!puter" torage pa(e !ay be wated% ,or e-a!ple" i$ the torage

(apa(ity in ea(h addre o$ a $i-ed/word/length (o!puter i eight

byte" and o!e o$ the data elements to be tored (ontain only three or

$our (hara(ter" then !any o$ the storage positions in ea(h word are

not being ued%

,i-ed/word/length (o!puter have $ater (al(ulating peed% They (an

add two data word in a ingle operation% Thi i not o with

(hara(ter/addreable (o!puter% Eere" only one digit &byte) in ea(h

nu!ber (an be added during a ingle !a(hine operation% Thu" eight

tep are re.uired to (o!plete the (al(ulation%

The larger !ain$ra!e (o!puter &uper/(o!puter li'e the 3RAY/ and

3Y20R H;) ue only $i-ed/word/length torage% Mot !i(ro(o!puter ue

Page 32: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 32/35

the variable/word/length approa(h allowing the! to operate on one

(hara(ter at a ti!e% So!ewhere in between thee two e-tre!e are the

do>en o$ e-iting !ini(o!puter and !ain$ra!e !odel that have what i

(alled built/in $le-ibility%

Thee $le-ible (o!puter are byte/oriented but (an operate in either a

$i-ed/ or variable/word/length !ode through the ue o$ proper progra!intru(tion% Let# ta'e a loo' at how thee $le-ible (o!puter operate

in a variable/ and $i-ed/word/length environ!ent%

+or'ing in a variable/word/length environ!ent" ea(h addre hold one

alphanu!eri( (hara(ter a hown in $igure 5/:" view 2%Sin(e a byte

uually repreent a ingle alphanu!eri( (hara(ter" unle you are

uing pa('ed de(i!al" a $le-ible (o!puter i o$ten aid to be byte

addressable% 4on#t be(o!e (on$ued= the ter! c.aracteraddressable"

c.aracteroriented " and byteaddressable all have the a!e !eaning% 2y

uing the appropriate progra! intru(tion" a progra!!er (an retrieve a

tored data ele!ent by identi$ying the addre o$ the $irt (hara(ter

&ay poition @;; a in $ig% 5/:" view 2) and pe(i$ying the nu!ber o$

addre lo(ation to be in(luded in the word% In thi (ae there are

even" poition @;; through @;C%

+hen a $le-ible (o!puter i wor'ing in a $i-ed/word/length environ!ent"

ea(h addre identi$ie a group o$ byte that (an be operated on a a

unit% Thi pro(eing !ethod help to a(hieve $ater (al(ulating

peed% A progra!!er (an ue progra! intru(tion to (aue the (o!puter

to auto!ati(ally retrieve" !anipulate" and tore" a a unit" a $i-ed

word o$ ay" two" $our" or eight byte o$ data in one !a(hine operation

by identi$ying the addre o$ the $irt (hara(ter o$ data% At the a!e

ti!e all re!aining byte are a(ted upon a a unit !oving $ro! le$t to

right% ,igure 5/; illutrate the di$$erent word length poible with

!any byte/addreable (o!puter% They are hal$/word &H byte)" $ull/

word &5 byte)" and double/word &F byte)%

,igure 5/;% / +ord length ued on $le-ible byte/addreable (o!puter%

Page 33: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 33/35

2y now" you hould have a good idea o$ how pri!ary torage lo(ation

are identi$ied by their torage addree" how thee addreable

torage lo(ation are ued" and how the torage (apa(ity at an addre

(an vary depending on the deign o$ the (o!puter%

Now" let# go one tep $urther" to ee how thee bit and byte are

repreented &(oded) on o!e o$ the !ore (o!!on e(ondary torage !edia%

S03ON4ARY STORAG0 4ATA ORGANI<ATION

Re!e!ber" e(ondary torage devi(e &alo (alled au-iliary or !a

torage devi(e) are thoe devi(e whi(h are not part o$ the (entral

pro(eing unit &(pu)% They in(lude? e-ternal (ore= e!i(ondu(tor" thin

$il!" and bubble !e!orie= pun(hed (ard= paper tape= and everal

di$$erent type o$ !a torage" u(h a !agneti( tape" di'" and dru!%

You already 'now it ta'e a (ertain nu!ber o$ bit to !a'e one byte

&nor!ally eight)" and when byte are grouped together at a ingle

addre they !a'e up a word in the (o!puter# !e!ory% +hen data ire(orded on o!e type o$ !agneti( torage !ediu!" u(h a di' or tape"

it i nor!ally organi>ed by bit" (hara(ter &byte)" $ield" re(ord"

and $ile &$ig% 5/)% The $ollowing de$inition hould help you

undertand the relationhip between bit" (hara(ter" byte" word"

$ield" re(ord" and $ile%

,igure 5/% / 4ata organi>ation%

Page 34: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 34/35

BI! / The !allet unit o$ data= it repreent one binary digit &; or

)%

C*AAC!E 5B(!E7 / A group o$ related bits &uually eight) that !a'e up

a ingle (hara(ter/letter" nu!ber" or pe(ial (hara(ter%

 +OD / A group o$ related byte that are treated a a ingle

addreable unit or entity in !e!ory%

FIELD / One or !ore related c.aracters that are treated a a unit o$

in$or!ation% A $ield &alo re$erred to a a data ite!) !ay be

alphabeti(" nu!eri(" or alphanu!eri(" and !ay be either $i-ed or

variable in length% ,or e-a!ple" your o(ial e(urity nu!ber 5##"7 i

o$ a $i-ed length= that i" it# alway : poition in length% +herea"

na!e are variable length be(aue they !ay be $ro! H to H poition in

length%

ECOD / A group o$ related fields" all pertaining to the a!e ub*e(t=

a peron" a thing" or an event% ,or e-a!ple" your payroll re(ord &L0S

tate!ent) !ight in(lude $ield $or your na!e" a!ount paid" ta-e

withheld" earned leave" and any allot!ent you !ight have% On the other

hand" a upply inventory re(ord !ight (onit o$ $ield (ontaining

to(' nu!ber" the na!e o$ the ite!" it unit pri(e" the .uantity on

hand" and it bin lo(ation%

FILE / A (olle(tion o$ related records" u(h a the payroll or upply

inventory re(ord% Nor!ally" all re(ord within the $ile are in the

a!e $or!at%

+hen pro(eing data" we thin' in ter! o$ data $ile% ,or e-a!ple" to

pro(e a part inventory" you would need the !ater part inventory

$ile and the $ile that (ontain up/to/date in$or!ation on ea(h part

that ha been iued% The !ater part inventory $ile would have a

re(ord $or every part in the inventory% The update $ile" part iued

$ile" would have a re(ord $or ea(h part iued% You would ue a progra!

to read the re(ord on the part iued $ile and update the !at(hing

re(ord on the !ater part inventory $ile% 4epending on whether the

Page 35: internal memory_2.doc

7/27/2019 internal memory_2.doc

http://slidepdf.com/reader/full/internal-memory2doc 35/35

data i tored on !agneti( tape or di' or in internal torage" the

progra! would ue di$$erent !ethod to a((e torage to obtain the

data% In the ne-t e(tion you#ll learn about torage a((e !ethod%

B% +hat area in the (o!puter# pri!ary torage area hold the

pro(eing intru(tion &the progra!)1

B%C Eow are the boundarie deter!ined $or the eparate area o$ the

(o!puter# pri!ary torage area1

B%D +hat i a bit1

B%F Eow !any bit !a'e up a byte1

B%: Pri!ary torage (apa(itie are uually pe(i$ied in what unit o$

!eaure1

B%H; Eow are (ore plane $or!ed1

B%H +here are (ore plane ued1

B%HH +ho deign and build the torage (apa(ity o$ an addre into a

(o!puter1B%H@ +hat i another na!e $or (o!puter deigned to be (hara(ter/

oriented or (hara(ter/addreable1

B%H5 +hi(h (o!puter ha the $ater (al(ulating peed" the variable/

word/length or the $i-ed/word/length1

B%H +hat i the nor!al organi>ation o$ data re(orded on !agneti(

torage !edia1

B%HC +hat i a $ile1

2a('  Eo!e  Up  Ne-t  

Order this information in Adobe .D .rintable


Recommended