S
S
Shurik Ryabtsov2019-11-22 17:36:25
Programming
Shurik Ryabtsov, 2019-11-22 17:36:25

Binary code processor everywhere? then why is there no special universal translator for thousands of processors? Or a single code standard for all CPUs?

Джава и питон не охватывают все консоли и смартфоны?
Но ведь двоичный код охватывает 99%?
Значит слишком трудно создать все планетарный стандарт двоичного кода. ? Исполняемых Инструкций двоичных для всех процессов на планете единый стандарт?
Или унифицировать все процессоры для совместимости тоже тяжело?
Может конвертор добавить?
Представьте пишешь скрипт а он определяет на чем его запустили и исходя из этого регулирует свои алгоритмы.
Чтобы не учить разные языки а просто в теле программы единого я.п. предусмотреть разные участки кода для разного железа.
Ну скромный телефон или крутой супер ЭВМ...
Вообще с совместимостью старого кода на новом скромном железе- чипе.
или супер мощном ЭВМ.. Это вообще никак ни в одном я.п. не предусмотрено?

Answer the question

In order to leave comments, you need to log in

6 answer(s)
G
Griboks, 2019-11-22
@Griboks

Binary code processor everywhere?

No. There are also ternary, quantum and others.
There are, for example, C, C#, Python, JavaScript language translators.
For the same reason that there is no single standard for communication, traffic rules, trains, pensions.
Almost everything is covered. And what is not covered, you can cover yourself.
Yes.
Spit once. And who will carry it out? No one will change the concept of their product and lose many years of experience for the sake of the standard.
Or is it also difficult to unify all processors for compatibility?
Maybe add a converter?

Microprograms, assembler, low-level languages.
It is provided everywhere and everywhere. Google virtual machines and compilers.

S
Saboteur, 2019-11-22
@saboteur_kiev

Java and python do not cover all consoles and smartphones?

Well, try to write your own scripting language that can perform at least
so that it works on at least 10 platforms.
Almost 100%
For some reason, even for sockets they could not create a planetary standard. For tires, for bolts - everywhere heaps of different diameters, heights and widths.
Are binary executable instructions for all processes on the planet a single standard?
Or is it also difficult to unify all processors for compatibility?

Processor instructions are not just code, they are its internal PHYSICAL architecture. The creators are trying to make the processor faster, smaller, cheaper, with minimal consumption. Each to the best of their understanding, experience and technical capabilities.
The programming languages ​​available to you are the converters.
But what about different physical devices? I wrote a script that waits for a person to enter "yes" or "no" for me, and they took it and launched it on a tablet where there is no keyboard?
Or on the fridge where there's nothing at all
Well, the hardware is TOO different, and when under DOS it was the programmers who wrote the code for different hardware (different audio cards, different graphics modes), and then it suddenly turned out that there is a single API like directX, and the OS with drivers will figure out what to do next, programmers breathed freely, because there is no need to remember that there are more manufacturers of the same audio cards than a programmer has years of life.
In general, with the compatibility of the old code on the new modest hardware-chip.
or a super powerful computer. not provided?

Backward compatibility is always a huge technology debt. It is very expensive to maintain it for individual moments (such as PC Speaker or 5 inch drives).

A
Andrey Shatokhin, 2019-11-22
@Sovigod

Why not?
C/C++ can be compiled for almost any known architecture. And you can write the code as you described - with the definition of iron and its use.
Java is almost everywhere. Dotnet is also good and allows you to write in almost any language.

C
CityCat4, 2019-11-22
@CityCat4

So it's too hard to create an entire planetary binary code standard

What for? Who needs it?

X
xmoonlight, 2019-11-23
@xmoonlight

JS, C, Python - now there are already almost under the majority of consumer consumer CPU market.
The rest are catching up... Let's
take the same (as it is considered "obsolete") Pascal and look at the tools and ... it will immediately be clearly seen: Pascal is outdated or people who are trying to inspire it (Lazarus).
With the help of script instructions for the compiler (for a specific PL), you yourself can specify: which block should be executed under which architecture, and how to correctly compile into bytecode.

A
Alexander Skusnov, 2019-11-24
@AlexSku

It is impossible to unify all processors. For example, there are RISK processors; special architecture that does not contain complex (long) commands.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question