A COMPUTER PROGRAM is a list of instructions that enable a computer to perform a specific task.
Low-level languages
Low-level languages relate to the specific architecture and hardware of a particular type of computer. Low-level languages can refer to machine code, the binary instructions that a computer understands, or an assembly language that needs to be translated into machine code.Assembly languages
Few programmers write programs in an assembly language. Those programmers who do, do so for the following reasons:
• to make use of special hardware
• to make use of special machine-dependent instructions
• to write code that doesn’t take up much space in primary memory
• to write code that performs a task very quickly.
The following snippet of program to add two numbers together is written in a typical assembly language and consists of three statements:
• LDA means load the value of the variable into the accumulator
• ADD means add the value of another variable to the value stored in the accumulator
• STO means replace the value of the variable by the value stored in the accumulator.
High-level languages
High-level languages enable a programmer to focus on the problem to be solved and require no knowledge of the hardware and instruction set of the computer that will use the program. Many high-level programming languages are portable and can be used on different types of computer.
High-level languages are designed with programmers in mind; programming statements are easier to understand than those written in a low-level language. This means that programs written in a high-level language are easier to:
• read and understand as the language used is closer to human language
• write in a shorter time
• debug at the development stage
• maintain once in use.
The following snippet of program to add two numbers together is a single program statement written in a typical high-level language. It shows how easy it is to understand what is happening in a high-level language program:
Sum = FirstNumber + SecondNumber
There are many different high-level programming languages in use today including C++, Delphi, Java, Pascal, Python, Visual Basic and many more. Once a programmer has learnt the techniques of programming in any high-level language, these can be transferred to working in other high-level languages.
Low-level languages
Low-level languages relate to the specific architecture and hardware of a particular type of computer. Low-level languages can refer to machine code, the binary instructions that a computer understands, or an assembly language that needs to be translated into machine code.Assembly languages
Few programmers write programs in an assembly language. Those programmers who do, do so for the following reasons:
• to make use of special hardware
• to make use of special machine-dependent instructions
• to write code that doesn’t take up much space in primary memory
• to write code that performs a task very quickly.
The following snippet of program to add two numbers together is written in a typical assembly language and consists of three statements:
LDA First
ADD Second
STO Sum
In order to understand this program the programmer needs to know thatADD Second
STO Sum
• LDA means load the value of the variable into the accumulator
• ADD means add the value of another variable to the value stored in the accumulator
• STO means replace the value of the variable by the value stored in the accumulator.
High-level languages
High-level languages enable a programmer to focus on the problem to be solved and require no knowledge of the hardware and instruction set of the computer that will use the program. Many high-level programming languages are portable and can be used on different types of computer.
High-level languages are designed with programmers in mind; programming statements are easier to understand than those written in a low-level language. This means that programs written in a high-level language are easier to:
• read and understand as the language used is closer to human language
• write in a shorter time
• debug at the development stage
• maintain once in use.
The following snippet of program to add two numbers together is a single program statement written in a typical high-level language. It shows how easy it is to understand what is happening in a high-level language program:
Sum = FirstNumber + SecondNumber
There are many different high-level programming languages in use today including C++, Delphi, Java, Pascal, Python, Visual Basic and many more. Once a programmer has learnt the techniques of programming in any high-level language, these can be transferred to working in other high-level languages.
0 comments:
Post a Comment