Professional Documents
Culture Documents
Application of ICT WEEK 10
Application of ICT WEEK 10
Application of ICT WEEK 10
2
3
What is programming?
Once the code (language) of a program has been written, it must be executed
(run, started).
You may need to type the name of the program to start it, or use a word like
RUN and the name of the program (in the old days, anyway).
Programming languages have evolved over time as better ways have been
programs.
Zafar Iqbal Khan 7 Application of ICT
What does Programming look like?
Here are some examples of an instruction to print the
word HI
– Logo PR [HI]
– JavaScript alert(“HI”);
– FORTRAN PRINT “HI”
– BASIC PRINT “HI”
– COBOL DISPLAY ‘HI’.
– C++ printf(“HI”);
– Pascal WRITELN(‘HI’);
– Assembly XPRNT MESSAGE1
Language MESSAGE1 DC ‘HI’
Machine-level programming
languages
– Fast and efficient, executed
directly on the CPU
– Consists only of 0s and 1s
– Difficult for humans to read,
write, and debug
Second Generation
(early 1950s):
– Symbolic assemblers
– Interpreting routines
– Very early compilers
Assembly languages
– Simple mnemonic instructions <opcode> <operands>
– Assembler translates into machine code
– Handcoding in assembly only for low-level needs
Third Generation
(mid 1950s - present):
– Query Languages:
• Enables a person to specify exactly what information they require
from the database.
• Usually embedded within database management programs.
– Report Writers:
• Takes information retrieved from databases and formats into
attractive, usable output.
– Application Generators:
• A person can specify a problem, and describe the desired results.
• Included with many micro-computer programs (macros).
Examples:
A window on your screen.
A list of names you wish to organize.
An entity that is made up of individual parts.
Fortran LISP
Cobol
A compiler takes a text file written in a programming language, and converts it into
binary code that a processor can understand: it makes an ".exe" file. You compile
only
once, then always run the "exe" file.
An interpreter does the same, BUT in real time: each time you run the code, it is
"compiled", line by line: Basic is an interpreter.
An assembler is similar, in the way that, instead of taking a plain text file, ie in C, it
takes a code written in Assembler Mnemonics, and convert it into binaries.
All "executable" files are in binaries (just 1's and 0's) - maybe viewed in hex (0x12de...)
[2]. Peter Norton, “Introduction to Computers” 6th International Edition (McGraw Hill)
[3]. Charles S. Parker, " Understanding Computer Today & Tomorrow”, 2000.