Page 9 - DCAP102_DCAP_401_Foundations of Computer Programming
P. 9
Basic Programming Skills/Foundations of Computer Programming
Notes Computer Programming is the art of making a computer do what you want it to do.
Computer programming is a field that has to do with the analytical creation of source code that
can be used to configure computer systems. Computer programmers may choose to function in
a broad range of programming functions, or specialize in some aspect of development, support,
or maintenance of computers for the home or workplace. Programmers provide the basis for
the creation and ongoing function of the systems that many people rely upon for all sorts of
information exchange, both business related and for entertainment purposes.
1.1 Programming Language
Different programming languages support different styles of programming. The choice of
language used is subject to many considerations, such as company policy, suitability to task,
availability of third-party packages, or individual preference. Ideally, the programming language
best suited for the task at hand will be selected. Trade-offs from this ideal involve fi nding enough
programmers who know the language to build a team, the availability of compilers for that
language, and the efficiency with which programs written in a given language execute.
The basic instructions of programming language are:
1. Input: Get data from the keyboard, a file, or some other device.
2. Output: Display data on the screen or send data to a file or other device.
3. Math: Perform basic mathematical operations like addition and multiplication.
4. Conditional execution: Check for certain conditions and execute the appropriate sequence
of statements.
5. Repetition: Perform some action repeatedly, usually with some variation.
1.2 Assembly Language
Assembly languages are also known as second generation languages. These languages substitute
alphabetic symbols for the binary codes of machine language.
In assembly language, symbols are used in place of absolute addresses to represent memory
locations.
Mnemonics are used for operation code, i.e., single letters or short abbreviations that help the
programmers to understand what the code represents.
e.g.: MOV AX, DX.
Here mnemonic MOV represents ‘transfer’ operation and AX, DX are used to represent the
registers.
One of the first steps in improving the program preparation process was to substitute letter
symbols mnemonics for the numeric operation codes of machine language. A mnemonic is any
kind of mental trick we use to help us remember. Mnemonics come in various shapes and sizes,
all of them useful in their own way.
Example: A computer may be designed to interpret the machine code of 1111 (binary) or
15 (decimal) as the operation ‘subtract’, but it is easier for human being to remember is as SUB.
2 LOVELY PROFESSIONAL UNIVERSITY