Home > Common Problem > What data in a computer can be directly processed by hardware?

What data in a computer can be directly processed by hardware?

青灯夜游
Release: 2022-07-04 17:18:55
Original
5231 people have browsed it

The data in the computer that can be directly processed by the hardware is "binary number". Binary is a number represented by two digits, 0 and 1, and the computer can only recognize 0 and 1, so all information is stored in the machine in the form of 0 and 1 (ie, binary numbers). The reasons why computers use binary systems are: 1. Binary numbers have only two basic symbols, "0" and "1", which are easy to represent with two opposing physical states; 2. The arithmetic operations of binary numbers are particularly simple, with addition and multiplication each having only 3 Arithmetic rules, less error-prone during operation.

What data in a computer can be directly processed by hardware?

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

The data in the computer that can be directly processed by the hardware is "binary number".

Binary is a number system widely used in computing technology. Binary data is a number represented by two digits, 0 and 1. Its base is 2, the carry rule is "when two are entered, one is added", and the borrowing rule is "borrow one to be equal to two".

The basis of computer operations is binary. The computer can only recognize 0 and 1, so all information is stored in the machine in the form of 0 and 1 (i.e. binary). The storage used The unit is bytes.

Reasons why computers use binary:

1. Easy to express

Binary numbers are only " The two basic symbols "0" and "1" are easily represented by two opposing physical states. For example, "1" can be used to represent the "closed" state of the light switch, and "0" can be used to represent the "off" state; the conduction of the transistor represents "1", and the off state represents "0"; the charging and discharging of the capacitor, and the electrical pulse. All devices with two opposite stable states, such as presence and absence, positive and negative pulse polarity, high and low potential, can represent binary "0" and "1". Decimal numbers have 10 basic symbols (0, 1, 2, 3, 4, 5, 6, 7, 8, 9), which can be represented by 10 states. It is very difficult to implement them with electronic devices.

2. Simple operations

The arithmetic operations of binary numbers are particularly simple. There are only 3 operation rules for addition and multiplication (0 0=0, 0 1=1 , 1 1=10 and 0×0=0, 0×1=0, 1×1=1), it is not easy to make mistakes during operation. [In fact, when computers process arithmetic operations, they are all additions and shifts, and there is no multiplication or division. For example, if 11B is shifted one position to the left, it becomes 110B. 11B is 3 in decimal, and 110B is 6. See if it is equal to multiplying by two, left Transfer multiplication, shift right and divide, haha, it’s fun] In addition, the “1” and “0” of binary numbers can correspond to the logical values ​​​​“true” and “false”, which provides convenience for computers to perform logical operations. . Arithmetic operations and logical operations are the basic operations of computers. These two types of operations can be easily and conveniently performed using binary systems.

Expand knowledge:

The commonly used base system designed in the early days was mainly the decimal system (because we have ten fingers, so the decimal system is a comparative Reasonable choice, ten numbers can be represented with fingers, the concept of 0 did not appear until much later, so it is 1-10 instead of 0-9). After the emergence of electronic computers, it was too complicated to use electron tubes to represent ten states, so there were only two basic states in all electronic computers, on and off. In other words, the two states of electron tubes determine that electronic computers based on electron tubes use binary to represent numbers and data. Commonly used bases include octal and hexadecimal. In computer science, hexadecimal is often used, while decimal is rarely used. This is because hexadecimal and binary have a natural connection: 4 binary Bits can represent numbers from 0 to 15, which is exactly the data that one hexadecimal bit can represent. In other words, converting binary to hexadecimal only requires conversion every 4 bits.

Techniques for converting decimal to binary

I can only give examples. If the text cannot explain clearly, the integer part and decimal part of a decimal number are usually processed separately.

  • Number system conversion of integers - using "radix division", the specific steps are as follows:

(1) Convert the given decimal integer When divided by base 2, the remainder is the lowest bit of the binary equivalent.

(2) Divide the quotient of the previous step by base 2, and the remainder is the second lowest digit of the equivalent binary number.

(3) Repeat step 2 until the final quotient is equal to 0. The remainder of each division is the number of binary digits, and the last remainder is the highest digit

Binary and octal hexadecimal conversion skills

Binary from Every three digits starting from the lowest digit are converted to decimal and are their corresponding octals.

If the high bit is less than three digits, add zeros.

Similarly, converting every four digits of binary from the lowest bit to decimal is its corresponding hexadecimal.

If the high bit is less than four digits, add zeros.

For example 1001100₂ = 114₈ = 4C₁₆

For more related knowledge, please visit the FAQ column!

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template