computer applications in mechanical power engineeringi-l2
TRANSCRIPT
-
8/7/2019 Computer Applications in Mechanical Power EngineeringI-l2
1/15
ComputerApplicationsin
MEP203
Dr.Eng.MohamedElGhandour
-
8/7/2019 Computer Applications in Mechanical Power EngineeringI-l2
2/15
-
8/7/2019 Computer Applications in Mechanical Power EngineeringI-l2
3/15
a arepresen a on n acompu er
Thebinarysystem
Theoctalandhexadecimalsystems
TypesofDataStoredinMemory
ComputerLanguages Highlevellanguage
Specificationsofawelldesignedprogram
Flowcharts IntroductiontoFortran
-
8/7/2019 Computer Applications in Mechanical Power EngineeringI-l2
4/15
DATAREPRESENTATIONINACOMPUTER
Computermemoriesarecomposedofbillionsofindividualswitches,eachofwhich
canbeONorOFF,butnotatastateinbetween.Eachswitchrepresentsonebinary
digit(alsocalledabit);theONstateisinterpretedasabinary1,andtheOFFstate
isinterpretedasabinary0.
Byte
Abyteisagroupof8bitsthatareusedtogethertorepresentabinarynumber.Thebyteisthefundamentalunitusedtomeasurethecapacityofacomputer'smemory.
Word
Thenextlargergroupingofbitsinancomputeriscalledaword.Aword
consistsof2,4,ormoreconsecutivebytesthatareusedtorepresentasinglenumberin
memory.Thesizeofawordvariesfromcomputertocomputer,sowordsarenota
particularly
good
way
to
judge
the
size
of
computer
memories.
Modern
CPUs
tend
to
.
-
8/7/2019 Computer Applications in Mechanical Power EngineeringI-l2
5/15
Inthebinarysystem,thereareonlytwodigits:
0and1,eachofthemismulti liedb 2tothe
powerofpositionstartswithzeroatthe
, ,
(1or0)*22+(1or0)*21+ (1or0)*20
-
8/7/2019 Computer Applications in Mechanical Power EngineeringI-l2
6/15
TheDecimalsystem
TheHexadecimalsystem
-
8/7/2019 Computer Applications in Mechanical Power EngineeringI-l2
7/15
-
8/7/2019 Computer Applications in Mechanical Power EngineeringI-l2
8/15
ea or oa ngpo n
Representsfractions0.24,1.5,etc
RepresentsverysmallandverylargenumbersTherange of4byterealnumbersisfromabout1038 to1038.Notethat
therealdatatypecanrepresentnumbersmuchlargerormuchsmallerthanintegerscan,butonlywithsevensignificantdigitsofprecision.
enava uew more anseven g so prec s on ss ore narea variable,onlythemostsignificant7bitsofthenumberwillbepreserved.Theremaining informationwillbelostforever.Forexam le if the value 12 345 678.9 is stored in a real variable on a PCitwillberoundedoffto12,345,680.0.Thisdifferencebetweentheoriginalvalueandthenumberstoredinthecomputerisknownas
roundofferror.
-
8/7/2019 Computer Applications in Mechanical Power EngineeringI-l2
9/15
Computer
anguages
ow eve
Lan ua e
g eve
Lan ua e Fortran
C++ Java
Machine Language
-
8/7/2019 Computer Applications in Mechanical Power EngineeringI-l2
10/15
Executable
file
-
8/7/2019 Computer Applications in Mechanical Power EngineeringI-l2
11/15
Specificationsofawelldesigned
program
Correctan accurate
Easytounderstand Easytomaintainandupdate
Reliable
ex e
Easy
to
use
-
8/7/2019 Computer Applications in Mechanical Power EngineeringI-l2
12/15
-
8/7/2019 Computer Applications in Mechanical Power EngineeringI-l2
13/15
Fortran (FormulaTranslatingSystem)isa
isespeciallysuitedtonumericcomputation
.
-
8/7/2019 Computer Applications in Mechanical Power EngineeringI-l2
14/15
or ran s ory
OriginallydevelopedbyIBMattheircampusin,
FORTRANI,II,III,IV
F RTR N
,
F rst
N
stan arFORTRAN77,
Fortran90,
Fortran95,Fortran2003,
Fortran2008,
-
8/7/2019 Computer Applications in Mechanical Power EngineeringI-l2
15/15