Programming language and its types. What language do computers “speak”? How to read computer language

    The concept of computer language (tracing paper from English computer language), as a rule, refers to languages ​​associated with computer equipment. Most often, this term corresponds to the concept of a programming language, but this correspondence is not... ... Wikipedia

    - (Ada) A computer language first developed in the USA to control military equipment. Currently, it has become more widely used for civilian purposes. Applies to languages high level(high level language) and is based on the Pascal language... ... Dictionary of business terms

    ASSEMBLY LANGUAGE, A COMPUTER LANGUAGE for writing COMPUTER PROGRAMS in a form that a computer can directly understand. Such languages ​​are called low-level languages. Every command that a computer must execute... ...

    - (BASIC, or Beginner's AN purpose Symbolic Instruction Code), a computer programming language that is easy to learn and contains many words of everyday speech. It is widely used by both amateur and professional programmers. For start… … Scientific and technical encyclopedic dictionary

    A programming language is a formal sign system designed to write computer programs. A programming language defines a set of lexical, syntactic and semantic rules that define appearance programs and actions,... ... Wikipedia

    A high-level programming language is a programming language designed to be fast and easy to use by the programmer. The main feature of high-level languages ​​is abstraction, that is, the introduction of semantic constructs that briefly describe such... Wikipedia

    This article lacks links to sources of information. Information must be verifiable, otherwise it may be questioned and deleted. You can... Wikipedia

    Computer slang is a type of slang used both by a professional group of IT specialists and by other computer users. History Appearance of terms Rapid growth since the second half of the 20th century computer technology, and, in... ... Wikipedia

    - (jargon) a type of slang used by both professional (for example, IT specialists) and other computer users. Contents 1 History 1.1 The appearance of terms ... Wikipedia

Books

  • Python programming language. Workshop. Textbook, Zhukov Roman Aleksandrovich. Tutorial is devoted to the theoretical and practical study of the modern widely used programming language Python. Consists of five chapters, which sequentially examine...
  • R programming language and environment. Tutorial, Zolotaryuk Anatoly Vasilievich. The tutorial contains all the necessary knowledge for working with the R software environment, including interface features, operators and functions used, as well as the basics of static analysis...

Computers have been around for a long time. The first of them were tube-based and took up a lot of space. In order to operate such a machine, a lot of maintenance personnel were required. Over time, tubes were replaced by electronic components, and computers became much smaller. Now system units computers take up very little space, and their performance has become significantly higher.

However, the basic principles of computer operation, laid down at the time of their birth, are still in effect. Data is transmitted using a signal using a "signal present or not" method. This is how the “beat” appeared. A bit is a unit of information that can take the value 0 or 1. Eight bits are combined into a byte, one byte is equal to 8 bits. The number 8 appeared due to the fact that the first computers were eight-bit and could only work with 8 bits at a time, for example, 01011001. The first zeros can be removed.

You can write any number from 0 to 255 in one byte. The specified range of numbers is very small, so larger ranges are often used: two bytes = word, two words = double word.

The computer started working in binary system Reckoning Any decimal number can be written as binary. We won’t consider the detailed transformation, but if anyone is interested, write in the comments and I’ll tell you.

In a computer, it is customary to carry out calculations in binary or hexadecimal systems. The second came into use when computers became 16-bit. When writing programs in Delphi we will use the usual decimal system, because the compiler itself will convert all numbers into required by the processor kind, but understanding what numbers the processor works with is very important.

The hexadecimal system looks different. Each digit contains sixteen states. Therefore, one digit can take the following values: 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. The letter "A" corresponds to the number 10 in the decimal system, "B" to 11, etc.

For example, the number 1 B in hexadecimal is equal to 27 in decimal.

Throughout the materials we will occasionally encounter the hexadecimal number system. In this case, to distinguish a hexadecimal number from a decimal number, it will be preceded by a # sign, for example, #25, as is customary in Delphi.

The work with floating point numbers is completely different; we will not consider this.

Now let's look at negative numbers. If it is foreseen in advance that a number can be negative, then its length is reduced by one bit, which is allocated to the sign of the number. If the first bit is 1, then the number is negative, otherwise it is positive.

In fractional numbers, one byte can be allocated for the integer part and one for the fractional part. Due to this, fractional numbers will always take up more memory, and operations with them will take longer.

1.2. Machine language

All data on the disk, including text files, are stored in binary form. Any program looks exactly the same, only it is called machine code. Let's take a closer look at it.

Any program is a sequence of commands called processor instructions. When a program starts, the computer loads its machine code into RAM and begins executing command after command. The programmer's job is to write these instructions so that the computer understands what they want from it.

The actual program that a computer executes is a sequence of ones and zeros. This sequence is called machine language.

For example, addition command two registers in hexadecimal system looks like this: $03С3. This doesn't say much, and it's very difficult to remember such a command. It is much easier to write “add the number 1 and the number 2.”

At first, programmers wrote programs in machine code, then the first compiler appeared - a program that translated the text of programs into machine code. Thus, users began to write programs more meaningfully, and the computer itself began to do all the routine work of translating program text into machine bytecode.

1.3. History of programming languages

The language in which a program is written is called a programming language.

The first compiler wasAssembler (translated as “collector”). Writing in it is almost as difficult as in machine codes, but now not numbers were used, but numbers understandable to humanswords.

The text in the figure can be divided into three columns:

· instruction address;

· machine code instructions;

· Assembly language code.

For example, the register copy command looked like this:moveah,ebx. In this case movis a programming language command eah Andebx- register names.

In Assembly language it was easier to write a program, but a program written in machine code worked faster and more flexibly. When writing a program in machine code, the programmer is not limited by anything, but when working with assembler there are restrictions. It is not always possible to influence the result.

After the creation of assembler, programming languages ​​began to appear one after another. This is how S appeared,ADA, FoxPro, Fortran, Basic, Pascaletc. Some of them were intended only for training, others were aimed at professional programmers.

Assembly language currently mostlyused only as inserts for high-level languages, and machine codes are used to write what the compiler cannot do.

Then object-oriented programming developed. The C language turned into C++, Pascal in ObjectPascal etc.

The last major revolution taking place in programming is the transition to visual programming. This transition is currently happening. Visuality provides even more convenient development tools for quickly writing code, but is inferior to OOP in terms of speed. Some of the commonly used languages ​​that support visual programming are Delphi and C #, although progress does not stand still and visual components appear for many other languages.

It is impossible to choose the best language. Each of them is suitable for a certain range of tasks, and the programmer must choose the most convenient language for himself.

1.4. Execution of machine commands

In addition to bytes, there are other dimensions:

· 1 kilobyte = 1024 bytes;

· 1 megabyte = 1024 kilobytes;

· 1 gigabyte = 1024 megabytes.

· 1 terabyte = 1024 gigabytes.

· etc.

In a computer, most values ​​are powers of 2 because the computer operates in binary and this way you can make the most of its capabilities. It is because of this that 1024 (2 to the power of 10) is used when calculating dimensions.

Let's look at some concepts.

Segment- this is the area internal memory computer.

When OS were 16-bit, the processor could not work with memory larger than 64 kilobytes, because it maximum size an area of ​​memory that can be addressed using a two-byte address. Therefore, memory was divided into segments according to size and purpose. Currently using a 32-bit OS that can address up to 4 GB random access memory and 64-bit OS. Therefore, we can say that the memory has become continuous. However, its division according to purpose still remains.

There are the following segment memory s:

· code segment- a memory area into which machine code is loaded, which will then be executed by the processor;

· data segment- memory area for data storage;

· stack segment- a memory area for storing temporary data and return addresses from procedures.

Each running program has its own segment of code, data and stack. Therefore, data from one program cannot interfere with data or code from another program.

Register- a memory cell in the processor. Its size depends on the bit depth. In 32-bit processors, the cells are 32-bit, but there are also 64-bit ones. The processor has several such registers, and each of them is intended for specific purposes. There are also general registers that a program can use at its discretion.

Chapter 2: What is a computer language?

Video: What is a computer language?

What is the essence of a computer language? Why do computers need it? Why are there so many computer languages ​​in the world?

Just as you don't need to drive a car to understand how an engine works, you don't need to program to understand the answer to these questions. But in order to improve your knowledge of the topic, you need to understand how a computer works. A brief explanation is given here.

2.1 Brief history of programming

Computers are digital electronics. Their perception of the data is the presence or absence of voltage in the wires. The absence of voltage looks like zero to the computer, the presence of voltage looks like one. In fact, computers don't know any other numbers, so he ends up having to combine 0s and 1s to make numbers.

Previously, special switches were used to load ones and zeros into computer memory. This image, owned by Wikimedia Commons, shows an Altair 8800. The switches on the front panel were used to load the program. The lights showed the result. There was no monitor.

Figure 2.1: Altair 8800

Numbers in the binary system are most often represented in combinations of four digits. For example:

1010 0010 0011

An improvement to switch input was the introduction of hexadecimal codes. Decimal numbers used in everyday life consist of the numbers 0-9. The hexadecimal number system consists of the digits 0-9, as well as the characters A through F to represent a set of four switches, with possible values ​​of 0-15.

BinaryDecimalHexadecimal
0 0 0
1 1 1
10 2 2
11 3 3
100 4 4
101 5 5
110 6 6
111 7 7
1000 8 8
1001 9 9
1010 10 A
1011 11 B
1100 12 C
1101 13 D
1110 14 E
1111 15 F
1 0000 16 10
1 0001 17 11

The following video explains a little more about how the number system works: Video: Decimal, binary, and hexadecimal systems

To make program entry easier, later computers allowed programs to be entered using assembly language. Each command used a mnemonics, and a program called a compiler turned the mnemonics into numbers representing the commands. This type of language is called 2GL, or second generation language.

Below is part of the program in assembly language, courtesy of Wikimedia Commons.
Figure 2.2: Assembly language example

Although this was an improvement, it was still not enough to make programming easy. The next generation of languages ​​provided higher-level abstractions. The first third generation languages: (COBOL, FORTRAN and LISP) were much easier to understand and program.

Second and third generation languages ​​used a program called compiler. The compiler takes the program entered by the user (the so-called source ) and turns it into machine code. The programmer runs the machine code. The original source code does not run.

If a program uses source code from different sources, they can be linked together into one using a program called linker (linker, link editor, linker). The linker works with machine code generated by the compiler to create the final version of the program. This final version is what the user runs. No source code is needed for this.

Figure 2.3: Compilers and linkers The disadvantage of machine language is that the program will only run on certain types

computer. Programs compiled for Windows computers will most likely not work on Apple Macintosh computers and vice versa. Because the whole process of compilation and linking can be difficult for novice programmers, some languages ​​have begun to use. These programs look at the source code and convert it into machine code on the fly. It also allows the same programs to run on Windows, Mac, and Unix computers, as long as each of these platforms has access to an interpreter.

The disadvantage of using an interpreter is that it is slower than the original, machine language.

Figure 2.4: Interpreter

  1. Python is an example of an interpreted language. It is easier to write in Python than in C, but Python is slower and requires an interpreter to run successfully.
  2. Give an example of a number in the binary system. (Although the number "1" can be binary, decimal, or hexadecimal, try to come up with an example that shows the difference between the number systems.)
  3. Give an example of a number in the decimal system.
  4. Give an example of a number in hexadecimal notation.
  5. Convert the numbers 1, 10, 100, 1000 and 10000 from binary to decimal.
  6. What is a compiler?
  7. What is source code?
  8. What is machine language?
  9. What is a first generation programming language?
  10. What is a second generation programming language?
  11. What is a third generation programming language?

What is an interpreter?

You are not logged in. Log in and track your progress. Now we simply cannot imagine our life without. Databases, computer games, operating systems, social media

and much more. We wouldn’t have all this if people hadn’t developed special programming languages, with the help of which a wide variety of things are now being created. software

for computer.

Programming languages ​​are no longer numbered in tens, but in hundreds. There are languages ​​specifically for developing websites, games, and animation.

What languages ​​are used to create common application programs (that is, programs written directly for users)? There are countless of them, the most popular of them are C++ and Delphi. They provide the greatest number of opportunities for developing programs for all occasions. These are what professional programmers use. However, both C++ and Delphi were created based on more simple languages

After mastering Pascal, learning Delphi goes, as they say, with a bang. This sequence of language acquisition, i.e. first Pascal, and then Delphi or C, C++, is highly desirable. The answer to the question “Which programming language is better” is that Pascal is best for learning for beginners.

For the development of cartoons and animation was created special program– Adobe (Macromedia) Flash. Flash is also used in website development and to create computer games. The language used in Flash is ActionScript. It has gained immense popularity these days as it is used in all modern Internet projects.

HTML is short for English. HyperText Markup Language and translates as “hypertext markup language”. It is used to create most web pages. Knowledge of HTML greatly simplifies working with your blog or website, but is not mandatory.

More advanced and functional (but more complex) languages ​​than HTML are PHP, Ajax, SQL.

To develop games and programs for phones, mainly two languages ​​are used - Java and C++. We have already talked about C++, and Java is a programming language created on the basis of C++.

To create 3D games and films they use Python language. It provides a huge range of possibilities for managing 3D graphics.

The Fortran language was developed for complex mathematical calculations, created in 1954-1957. The word Fortran comes from the first letters: FORmula TRANslator, that is, formula translator. It performs mathematical, engineering and various scientific tasks and is used in very powerful computers.

As we see, programmers have developed programming languages ​​for all occasions. Many programmers are fans of a particular programming language, but this depends on personal preference. New languages ​​are being created and old ones are being improved. The future of computer technology depends on the functionality of programming languages.

P.S. The article is over, but you can still read.

The term “computer language” refers to all languages ​​that allow interaction between a person and a computer. A distinction is made between languages ​​that machines can read and those that humans can understand.

Machine-understandable languages ​​can be read by the processor and, therefore, execute commands sent through them. In this case we are talking about so-called machine languages. But there are also computer languages ​​that people can read. These include, for example, programming languages. They use words and symbols of human language - a computer cannot read or interpret them.

To make these languages ​​readable by hardware, they need to be translated into machine language. This can happen in real time using an interpreter or in advance using an assembler or compiler.

What languages ​​does the computer understand?

There is no single computer language for all, as you already understood from the beginning of our article. There is a very long list of different computer languages, and the most famous among them are probably the already mentioned programming languages.

Scripting languages ​​are not pre-translated into machine code by a compiler. Interpreters make them readable by the computer, which allows you to perform certain actions. TO scripting languages include Python and Javascript.

Another form of programming languages ​​are the so-called high-level languages. Here, information is programmed using code that can be read by a person, and the compiler converts it into machine code. Examples of high-level languages ​​are C and C++.

Unlike the above, markup languages ​​do not use programs, so they are not converted into machine code. They are used to create documents that any . Classic examples of markup languages ​​are HTML, XML or CSS.

There are also database languages ​​such as SQL. They are not directly related to programming languages, but control the computer when executing database queries.

If you want to learn how to program on your own, then you will find valuable tips for beginning programmers.



2024 wisemotors.ru. How it works. Iron. Mining. Cryptocurrency.