The Natural Language of the Computer — КиберПедия 

Организация стока поверхностных вод: Наибольшее количество влаги на земном шаре испаряется с поверхности морей и океанов (88‰)...

Папиллярные узоры пальцев рук - маркер спортивных способностей: дерматоглифические признаки формируются на 3-5 месяце беременности, не изменяются в течение жизни...

The Natural Language of the Computer

2019-12-19 152
The Natural Language of the Computer 0.00 из 5.00 0 оценок
Заказать работу

- Machines have their natural language like humans do.

- Computers do not understand the human language.

- The natural language of computers is the binary code — 1 and 0. These represent two states: on (1) and off (0).

- It would be hectic (слишком сложно) for us as humans to communicate with the computer in binary.

- One digit, either 0 or 1

Повторить конвертацию бинарной системы

Programming Languages

To communicate with machines who speak binary, we do so in a language that’s closer to our own natural language.

Programming languages are close to our natural languages. But they are more structured and must be thoroughly learned.

They could be high level or low level languages.

High level programming languages are farther away from the machine language than low level languages This “farther away” is usually called an abstraction.

The computer needs a way to understand our human language.

To do this, we’ll need a translator.

What are Translators

Source (источник) code refers (обращаться) to code written in a particular programming language.

Translators have the responsibility of converting your source code to the machine language — binary (ones and zeros).

We may refer to the binaries as Object Code, the Program or a common word today: App.

Source code—>translator—>binary

Translators can be any of:

Interpreters

- Some languages are interpreted.

- The translator processes the source code line by line and runs every line in the final program or app.

- This means that interpreted source code starts running until it encounters an error or reaches the end.

- Python is a good example of an interpreted programming language.

Compilers

- Convert the source code in its entirety via a compilation process to binary.

- The binary is then executed.

- If there were errors in the source code, they are detected during the compilation time and flagged.

- This interrupts the compilation process, and no binary is generated.

- Compiled source code may fail during run-time even after successfully compiling.

A hybrid of Interpreters and Compilers

- A hybrid translator is a combination of the Interpreter and Compiler.

- A popular hybrid programming language is Java.

- Java first compiles your source code to an intermediate format known as the Bytecode.

- The Bytecode is then interpreted and executed by a runtime engine also known as a Virtual machine.?????

- This enables (разрешать, давать возможность) the hybrid translators to run the bytecode on various operating systems.

- Сначала работает кампайлер потом уже интерпретатор

Assemblers

- Язык ассамблера - машинно-ориентированный язык программирования низкого уровня. Его команды прямо соответствуют отдельным командам машины или их последовательностям, также он может предоставлять дополнительные возможности облегчения программирования

- Как и сам язык, ассемблеры, как правило, специфичны для конкретной архитектуры, операционной системы и варианта синтаксиса языка.

- Это компиляторный язык, близок к языку процессора.

- Translate low-level Assembly language to binary.

Interpreters vs. Compilers

- Interpreters translate line by line and execute the line before going on to the next line.

- Compilers translate all lines of a program to a file (binary) and execute the whole file.

- Interpreted source code is executed directly from the source file.

- Compiled source code is converted to a binary file. The binary file is then executed.

Каждый раз когда мы скачиваем приложение, мы скачиваем бинарный код

 

 


 


Поделиться с друзьями:

Наброски и зарисовки растений, плодов, цветов: Освоить конструктивное построение структуры дерева через зарисовки отдельных деревьев, группы деревьев...

Состав сооружений: решетки и песколовки: Решетки – это первое устройство в схеме очистных сооружений. Они представляют...

Своеобразие русской архитектуры: Основной материал – дерево – быстрота постройки, но недолговечность и необходимость деления...

Папиллярные узоры пальцев рук - маркер спортивных способностей: дерматоглифические признаки формируются на 3-5 месяце беременности, не изменяются в течение жизни...



© cyberpedia.su 2017-2024 - Не является автором материалов. Исключительное право сохранено за автором текста.
Если вы не хотите, чтобы данный материал был у нас на сайте, перейдите по ссылке: Нарушение авторских прав. Мы поможем в написании вашей работы!

0.01 с.