search
HomeCommon ProblemWhat can computer hardware directly execute?

The only thing that computer hardware can directly execute is "machine language". The computer can only recognize 0 and 1, and all information is stored in the machine in the form of 0 and 1 (ie binary); and machine language is a set of machine instructions represented by binary code that the computer can directly recognize and execute. , consisting of two parts: operation code and operand; machine language is the operating function given to the computer by the computer designer through the computer's hardware structure.

What can computer hardware directly execute?

The operating environment of this tutorial: Windows 7 system, Dell G3 computer.

Computer hardware can only directly execute "machine language".

The computer can only recognize 0 and 1. All information is stored in the machine in the form of 0 and 1 (ie binary), and the storage unit used is bytes.

The machine language instruction is a binary code, which consists of two parts: opcode and operand.

Machine language is a set of machine instructions represented by binary code that a computer can directly recognize and execute. It is the operating function given to the computer by the computer designer through the computer's hardware structure. Machine language has the characteristics of flexibility, direct execution and high speed. The machine languages ​​of different types of computers are incompatible. A program compiled according to the machine instructions of one type of computer cannot be executed on another type of computer.

An instruction is a statement in machine language. It is a set of meaningful binary codes. The basic format of the instruction is such as the operation code field and the address code field. The operation code specifies the operation nature and function of the instruction. , the address code gives the operand or the address of the operand.

To write programs in machine language, programmers must first memorize all the instruction codes of the computer used and the meaning of the codes. When hand-programming, programmers have to handle the storage allocation and input and output of each instruction and data by themselves, and they also have to remember the state of the work unit used in each step of the programming process. This is a very tedious job. The time it takes to write a program is often dozens or hundreds of times longer than the actual running time. Moreover, the programs compiled are all instruction codes of 0s and 1s, which are not intuitive and prone to errors. Except for professionals from computer manufacturers, the vast majority of programmers no longer learn machine language.

General situation and main shortcomings of machine language

General situation

1. A lot of complexity Trivial details constrain programmers, making it impossible for them to have more time and energy to engage in creative work and perform tasks that are more important to them. Such as ensuring the correctness and efficiency of the program.

2. Programmers must not only control the overall situation of programming but also go deep into every part until the details of implementation. Even programmers with superior intelligence often miss one and often make mistakes, so the programs they write are reliable. Poor performance and long development cycle.

3. Since the way of thinking and expression of programming in machine language is very different from people's habits, only programmers who have undergone long-term professional training can be competent, making programming high-key.

4. Because its written form is all "secret" code, it has poor readability and is inconvenient for communication and cooperation.

5. Because it relies heavily on the specific computer, it has poor portability and poor reusability.

Weak generality

The computers designed and produced by various computer companies have differences in the number and functions of instructions, instruction formats, addressing methods, and data formats. Even if Some commonly used basic instructions, such as arithmetic and logical operation instructions, transfer instructions, etc. are also different. Therefore, although the high-level languages ​​of various types of computers are basically the same, the differences between high-level language programs after they are compiled into machine language are also very large. Therefore, it is almost impossible to transplant programs expressed in machine language to other machines. From the development process of computers, we have seen that due to the rapid development of the basic hardware that constitutes computers, computers are updated very quickly, which raises the problem of how software can keep up. As we all know, when a new machine is launched and delivered for use, only a small amount of system software (such as operating system, etc.) can be submitted to users. A large amount of software is constantly being enriched, especially applications, a considerable part of which are continuously generated by users when using the machine. , this is the so-called software provided by a third party.

In order to alleviate the contradiction between the launch of new machines and the continued use of original applications, the series machine idea adopted when designing the IBM360 computer in 1964 solved this problem better. From then on, although the hardware implementation methods of the same series of computers produced by each computer company can be different, the instruction system, data format, I/O system, etc. remain the same, so the software is fully compatible (on this basis, compatible computers were produced) ). When developing new models or high-end products of this series of computers, although the instruction system can be greatly expanded, all the original instructions are still retained to maintain the upward compatibility of software, that is, the software on low-end machines or old models will not Modifications can be made to run on newer machines that are more advanced than it to protect the user's investment in the software.

For more related knowledge, please visit the FAQ column!

The above is the detailed content of What can computer hardware directly execute?. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.