1
1
1Tima12019-06-28 12:10:34
Programming
1Tima1, 2019-06-28 12:10:34

How does a computer understand commands?

There is a binary code-symbol of zeros and ones for PC (there is voltage and there is no voltage).
And how does the PC understand what to do with the command 010011, and what with 0010011?
well, for example, there is a child of 3 years old, they give him an offer, go, buy a phone-command,
our alphabet is a binary code, and the child is a pc,
But you also need to explain to this 3-year-old child what it means to buy, walk and phone
Approximately the same question I have about computers.

Answer the question

In order to leave comments, you need to log in

6 answer(s)
R
Ronald McDonald, 2019-06-28
@1Tima1

Too vague question.
It is not the PC that “understands”, but the processor, which receives processor commands and executes them, chasing bytes and bits, sending certain signals over the buses to other devices, and from all this, through abstraction levels from lower to upper, cats are viewed on YouTube.
A detailed explanation will take about twenty pages in general terms.

A
Adamos, 2019-06-28
@Adamos

There is a wonderful book: "Code. The Secret Language of Informatics".
Allows you to get out of your head children's fantasies and start learning from reality.

A
alladuh, 2019-06-28
@alladuh

Let's try it briefly:
a computer's processor is made up of over a million transistors. They either open, passing the current (signal), then they close.
0 and 1 is the value of the signal (so to speak). 0 - no signal, 1 - signal.
The sequence of 1s and 0s determines the opening and closing of the various transistors.
How instructions will be executed on the processor is determined by the creators of the processors. But everything stretches from Boolean logic and basic operations have been defined for a long time.
For example, you enter the multiplication of two numbers: 2 * 2. Let's skip compilation or interpretation to machine code. When 2 becomes 10 (in binary), it passes through the transistor and data is written to memory. This happens with the whole operation (Multiplication also has its own designation for the processor. This is the "AND" operation. That is, 10AND10 will result in a signal like 100, which will be interpreted as 4).
As a result, the result 4 is written in the memory cell.
It is important to understand that all operations take place on transistors with signals (0 and 1). Transistors form complex combinations to carry out long and more complex instructions than multiplication or addition.
And what operations these combinations of transistors perform is already better to read in books.
Here is a good (quite easy to understand)video

V
Vyacheslav Zolotov, 2019-06-28
@SZolotov

A textbook on the course of computer architecture will help you. There are answers to all questions)

S
Simon_Says492, 2021-10-15
@Simon_Says492

If I understand you correctly, your question is about the ability to compile boolean values ​​into specific ones?
I understand this very poorly, but I will try to draw logical conclusions myself. Everything that I will describe further is my personal assumptions:
The first question you should ask yourself is - How does a computer understand that green is green in our understanding?
Answer: none. He does not understand this, he simply stores in himself a matrix of boolean values, which is a constant for compilers.
Example: We need a green pixel. The monitor consists of many pixels, each of which is a kind of transistor (here you should already have some kind of idea). The monitor board receives a constant, and this constant (matrix) fires certain transistors that turn on this pixel.
Therefore, we conclude that a computer is a set of constants that compilers accept and translate into a language that we understand.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question