Example: dental hygienist

Chapter 2 Programming Languages - FTMS

PROG0101 Fundamentals of Programming1 PROG0101 FUNDAMENTALS OF PROGRAMMINGC hapter 2 Programming LanguagesPROG0101 Fundamentals of Programming2 Programming LanguagesTopics Definition of Program, Computer Programming , and Computer Programmer. Generations of Programming Language Types of Programming LanguagePROG0101 Fundamentals of Programming3 Programming LanguagesComputer Program A program is a set of instructions following the rules of the chosen language. Without programs, computers are useless. A program is like a recipe. It contains a list of ingredients (called variables) and a list of directions (called statements) that tell the computer what to do with the variables. PROG0101 Fundamentals of Programming4 Programming LanguagesProgramming Language A vocabulary and set of grammatical rules (syntax) for instructing a computer to perform specific tasks.

• Reading Comprehension - Understanding written ... • C++ is one of the most popular programming ... constructed one of the first mechanical adding machines. • It is a popular teaching language. PROG0101 Fundamentals of Programming 36 Programming Languages Pascal Example:

Tags:

  Mechanical, Comprehension, Most, Popular, Most popular

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of Chapter 2 Programming Languages - FTMS

1 PROG0101 Fundamentals of Programming1 PROG0101 FUNDAMENTALS OF PROGRAMMINGC hapter 2 Programming LanguagesPROG0101 Fundamentals of Programming2 Programming LanguagesTopics Definition of Program, Computer Programming , and Computer Programmer. Generations of Programming Language Types of Programming LanguagePROG0101 Fundamentals of Programming3 Programming LanguagesComputer Program A program is a set of instructions following the rules of the chosen language. Without programs, computers are useless. A program is like a recipe. It contains a list of ingredients (called variables) and a list of directions (called statements) that tell the computer what to do with the variables. PROG0101 Fundamentals of Programming4 Programming LanguagesProgramming Language A vocabulary and set of grammatical rules (syntax) for instructing a computer to perform specific tasks.

2 Programming Languages can be used to create computer programs. The term Programming language usually refers to high-level Languages , such as BASIC, C, C++, COBOL, FORTRAN, Ada, and Pascal. PROG0101 Fundamentals of Programming5 Programming LanguagesProgramming Language Youeventuallyneedtoconvertyourprogramint omachinelanguagesothatthecomputercanunde rstandit. Therearetwowaystodothis: Compiletheprogram InterprettheprogramPROG0101 Fundamentals of Programming6 Programming LanguagesProgramming Language Compileistotransformaprogramwritteninahi gh-levelprogramminglanguagefromsourcecod eintoobjectcode. Thiscanbedonebyusingatoolcalledcompiler. Fundamentals of Programming7 Programming LanguagesProgramming Language Interpreterisaprogramthatexecutesinstruc tionswritteninahigh-levellanguage.

3 Aninterpreterreadsthesourcecodeoneinstru ctionorlineatatime, Fundamentals of Programming8 Programming LanguagesComputer Programming Computerprogrammingistheprocessofwriting ,testing,debugging/troubleshooting,andma intainingthesourcecodeofcomputerprograms . Thissourcecodeiswritteninaprogramminglan guagelikeC++,JAVA, Fundamentals of Programming9 Programming LanguagesComputer Programmer Aprogrammerissomeonewhowritescomputerpro gram. Computerprogrammerswrite,test, Fundamentals of Programming10 Programming LanguagesWhat Skills are Required to Become a Programmer? Programming -Writingcomputerprogramsforva riouspurposes. Writing-Communicatingeffectivelywithothe rsinwritingasindicatedbytheneedsoftheaud ience. ReadingComprehension-Understandingwritte nsentencesandparagraphsinwork-relateddoc uments.

4 Fundamentals of Programming11 Programming LanguagesWhat Skills are Required to Become a Programmer? ComputersandElectronics-Knowledgeofelect riccircuitboards,processors,chips,andcom puterhardwareandsoftware,includingapplic ationsandprogramming. Mathematics-Knowledgeofnumbers,theiroper ations,andinterrelationshipsincludingari thmetic,algebra,geometry,calculus,statis tics,andtheirapplications. Fundamentals of Programming12 Programming LanguagesWhat Skills are Required to Become a Programmer? OralComprehension-Theabilitytolistentoan dunderstandinformationandideaspresentedt hroughspokenwordsandsentences. WrittenExpression-Theabilitytocommunicat einformationandideasinwritingsootherswil lunderstand. Fundamentals of Programming13 Programming LanguagesWhat Skills are Required to Become a Programmer?

5 Fundamentals of Programming14 Programming LanguagesGenerations of Programming Language Thefirstgenerationlanguages,or1GL,arelow -levellanguagesthataremachinelanguage. Thesecondgenerationlanguages,or2GL,areal solow-levellanguagesthatgenerallyconsist ofassemblylanguages. Thethirdgenerationlanguages,or3GL, Fundamentals of Programming15 Programming LanguagesGenerations of Programming Language Thefourthgenerationlanguages,or4GL, The fifth generation Languages , or 5GL, are Programming Languages that contain visual tools to help develop a program. A good example of a fifth generation language is Visual Fundamentals of Programming16 Programming LanguagesTypes of Programming Language Therearethreetypesofprogramminglanguage: Machinelanguage(Low-levellanguage) Assemblylanguage(Low-levellanguage) High-levellanguage Low-levellanguagesareclosertothelanguage usedbyacomputer, Fundamentals of Programming17 Programming LanguagesMachine Language Machinelanguageisacollectionofbinarydigi tsorbitsthatthecomputerreadsandinterpret s.

6 Machinelanguagesaretheonlylanguagesunder stoodbycomputers. Whileeasilyunderstoodbycomputers, Fundamentals of Programming18 Programming LanguagesMachine LanguageMachine Language169 1 160 0 153 0 128 153 0 129 153 130 153 0 131 200 208 241 96 High level language5 FOR I=1 TO 1000: PRINT "A";: NEXT IPROG0101 Fundamentals of Programming19 Programming LanguagesMachine LanguageExample: Letussaythatanelectrictoothbrushhasaproc essorandmainmemory. Theprocessorcanrotatethebristlesleftandr ight,andcanchecktheon/offswitch. Themachineinstructionsareonebytelong,and correspondtothefollowingmachineoperation s:PROG0101 Fundamentals of Programming20 Programming LanguagesMachine LanguageMachine InstructionMachine Operation0000 0000 Stop0000 0001 Rotate bristles left0000 0010 Rotate bristles right0000 0100 Gobacktostartofprogram0000 1000 SkipnextinstructionifswitchisoffPROG0101 Fundamentals of Programming21 Programming LanguagesAssembly Language A program written in assembly language consists of a series of instructions mnemonics that correspond to a stream of executable instructions, when translated by an assembler, that can be loaded into memory and executed.

7 Assembly Languages use keywords and symbols, much like English, to form a Programming language but at the same time introduce a new problem. PROG0101 Fundamentals of Programming22 Programming LanguagesAssembly Language The problem is that the computer doesn't understand the assembly code, so we need a way to convert it to machine code, which the computer does understand. Assembly language programs are translated into machine language by a program called an assembler. PROG0101 Fundamentals of Programming23 Programming LanguagesAssembly Language Example: Machine language :10110000 01100001 Assembly language :mov a1, #061h Meaning:Move the hexadecimal value 61 (97 decimal) into the processor register named "a1".PROG0101 Fundamentals of Programming24 Programming LanguagesHigh Level Language High-levellanguages allow us to write computer code using instructions resembling everyday spoken language (for example: print, if, while) which are then translatedinto machine language to be executed.

8 Programs written in a high-levellanguage need to be translated into machine languagebefore they can be executed. Some Programming Languages use a compilerto perform this translation and others use an Fundamentals of Programming25 Programming LanguagesHigh-Level Language Examples of High-level Language: ADA C C++ JAVA BASIC COBOL PASCAL PHYTONPROG0101 Fundamentals of Programming26 Programming LanguagesComparissonMachine LanguageAssembly LanguageHigh-level LanguagesTime to executeSince it is the basic language of the computer, it does not require any translation, and hence ensures better machine efficiency. This means the programs run program called an assembler is required to convert the program into machine language. Thus, it takes longer to execute than a machine language program called a compiler or interpreter is required to convert the program into machine language.

9 Thus, it takes more time for a computer to to developNeeds a lot of skill, as instructions are very lengthy and complex. Thus, it takes more time to to use than machine language, though instruction codes must be memorized. It takes less time to develop programs as compared to machine to use. Takes less time to develop programs and, hence, ensures better program Fundamentals of Programming27 Programming LanguagesBASIC Short for Beginner's All-purpose Symbolic Instruction Code. Developed in the 1950s for teaching University students to program and provided with every self-respecting personal computer in the 1980s, BASIC has been the first Programming language for many programmers. It is also the foundation for Visual Basic. PROG0101 Fundamentals of Programming28 Programming LanguagesBASICE xample:PRINT "Hello world!

10 "PROG0101 Fundamentals of Programming29 Programming LanguagesVisual Basic A Programming language and environment developed by Microsoft. Based on the BASIC language, Visual Basic was one of the first products to provide a graphical Programming environment and a paint metaphor for developing user interfaces. PROG0101 Fundamentals of Programming30 Programming LanguagesVisual BasicExample:MsgBox "Hello, World! PROG0101 Fundamentals of Programming31 Programming LanguagesC Developed by Dennis Ritchie at Bell Labs in the mid 1970s. C is much closer to assembly language than are most other high-level Languages . The first major program written in C was the UNIX operating system. The low-level nature of C, however, can make the language difficult to use for some types of applications.


Related search queries