This article will introduce basic concepts in programming such as the program, what programming is, and programming languages. Understanding these concepts is the foundation for learning programming courses well.
1. Program Concept
A program is a sequence of instructions that control the operation of a computer to solve a certain task. These instructions are encoded in the form of a series of bits 0 or 1. They are stored in memory like regular data.
A program is also a type of data, and the computer simply reads and executes them sequentially on data.
2. What is Programming?
The art of implementing one or more related abstract algorithms using a programming language to create a computer program.
3. Programming languages
Programming languages are languages that programmers use to write computer programs. The statements of each programming language have rules, syntax, and laws determined by that language. Like English, it has syntax, and vocabulary of English, and Vietnamese is the same.
We get the source code after writing a program with a programming language. The computer cannot run this source code and must be translated into machine code. Compiler programs will do this:
- Assembler to translate assembly language programs
- Interpreter and compiler for translating high-level programs
Note: Many of you wonder how to create a compiler program? In fact, we don’t need to understand deeply unless you want to invent a programming language. Just trust the available compilers and use them (don’t think too much, there are many other important things to learn!).
Details of the program execution steps:
There are many different programming languages, they are divided into two types:
- Low-level programming languages:
- That is assembly language. Depending on each specific machine line, it is not compatible with other computers. Fast program execution speed.
- High-level programming languages:
- Inheritance in Java
- Enum data type in C++
- Control single LED programming with Arduino boards
- Polymorphism in Java
- Conversion of XML data to JSON data in Python
- It could be Visual Basic, C/C++, Ruby, Java, PHP, C#, … Express programming ideas in an abstract way. Highly compatible, runs on different types of computers.