In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > IT Information >
Share
Shulou(Shulou.com)11/24 Report--
Original title: "will binary be the best choice for computers?" "
In the information age, we can't live without computers. The videos and pictures we see, the words we read, the numbers and symbols we read, and the music we hear are actually a sequence of zeros and ones. This is the binary number that our computers often use.
Do you know? The first person in the world to propose binary system was Leibniz, the "encyclopedia" genius who discovered calculus.
Do you ever wonder why our computers don't just use the usual 0 to 9 descriptions? What on earth is binary?
Before talking about binary, let's get to know what decimal is.
01. What is decimal system in daily life, we are used to using the ten Arabic numerals 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 to count.
When we see an item with a price tag of 1246 in the mall, we can spell it out naturally: 1246 instead of reading it directly as: 1246. In fact, we find that in a string of numbers, each one represents a different meaning.
1 2 4 6
A thousand and ten
Therefore, there is the following calculation:
1246 "103" 2 "102" 4 "101" 6 "100"
As you can see, if we start counting from bit 0, the number on each bit is multiplied by a fixed number, that is, "bit weight", that is, "weight of each bit". Then the weight of bit I is
10i
In general, for an R-ary number, the bit weight of bit I (I counts from 0) is:
Ri
The counting method we are accustomed to use in our lives is the decimal system, that is, "every ten into one".
02. What is binary? although in daily life, the use of decimal system has been deeply rooted in the hearts of the people. However, in the computer field, binary is widely used.
That is, the counting method, which is only composed of 0 and 1, for every binary into one, the bit weight of the 1st bit (I counts from 0) is:
2i
Therefore, when we see a sequence of zeros and ones, we need to do the following calculation to convert it to our commonly used decimal count:
Binary: 1 0 1 1
Decimal system: 11 "1" 23 "0" 22 "1" 21 "1" 20
03, the advantages of binary since the use of binary is somewhat "anti-human", why does the computer choose to use binary?
The features of binary include:
The state is simple: the binary system is composed of only two numbers, 0 and 1, with few types of states, which is very convenient.
Good stability and high reliability: low level and high level can be used to divide 0 and 1 states. For example, we know that the main memory of a computer is made up of transistors. The transistor can switch between high voltage (1) and low voltage (0) states. Even if the voltage fluctuates due to electromagnetic interference, we can well distinguish between 0 and 1 states. These 0 and 1 states are read by the computer processor. According to the software instructions, other computer devices can be controlled through different states of the transistor, so that data can be stored reliably. The digital device used is simple, the components used are few, and the technical realization is simple.
The operation is simple: although binary represents too many digits of a number compared with decimal, it is easier for a computer to calculate states 0 and 1 than to calculate ten states from 0 to 9. The carry rule is "every two into one", and the borrowing rule is "borrow one when two". For computers, the rules of binary operations are simple.
Versatility: binary can clearly distinguish between right and wrong. Using binary, we can design and extend the basic and, OR, and non-logical operation elements.
04, binary application of each type of data, through a set of rules to quickly achieve binary coding. For example, decimal can be converted to binary. Letters can also be encoded in binary strings according to standard rules such as UTF-8.
Similarly, each frame of the video is made up of pictures, and the picture is made up of each pixel, which can be represented by three binary sequences.
Even speech can be stored and transmitted in binary form by using pulse coding modulation technology.
Therefore, binary can be widely used in various fields of computer.
Because of its many advantages, binary is the only language that can be recognized and accepted by computers at present, that is, machine language. C, C++, Java, Python and other programming languages that we often use when developing and testing software belong to high-level languages, and they all need to be converted into machine languages before they can be recognized and executed by computers.
Maybe it can be ternary, although binary has been widely used in computers. However, it would be hasty to say that binary is the most ideal choice for computers. Because, although the binary calculation rules are simple, they may not be able to express what people really think perfectly. In general, the way of thinking of the human brain, there are not only "true" and "false", "yes" and "no" answers, but also a kind of "uncertainty". Therefore, in many areas, binaries may be greatly limited.
Generally speaking, n-bit R-ary numbers can describe the content of Rn information, which needs to be represented by nR elements. Therefore, the efficiency of base R can be expressed by the following formula:
Y (R) = Rn/nR
Its meaning can be understood as: under the same amount of information, the less the number of components required, the higher the work efficiency.
When we use a series of calculations such as derivation that we learned in high school, we can get the following conclusion: when ringing (e is an infinite acyclic decimal equal to about 2.71828), y is the maximum. At this point, I was surprised to find that the efficiency of integer 3 is closer to e than that of integer 2.
The ternary system is the system that has proved to be the most efficient in theory.
In fact, ternary computers appeared in the former Soviet Union as early as the 1850s. However, due to political, economic and other factors, ternary computers are gradually abandoned by people. With the future of the highly competitive and magical quantum field, there is an additional state-uncertain superposition state, and the ternary system can be represented by the "uncertain" number, thus being able to resist quantum attacks.
Therefore, ternary computers also open up new possibilities for the development of computers and attract people's attention again: Chinese physicist Guo Guangcan and colleagues from the University of Chinese Academy of Sciences realize the transmission of ternary qutirt quantum signals for the first time. South Korea has also successfully developed ternary semiconductors in recent years.
Conclusion through this article, we can realize that:
The difference between binary and decimal
Advantages and applications of binary system
The advantages and Progress of Ternary system
Eager to learn, you unwittingly increase your knowledge again!
Maybe people are beginning to look forward to the development trend of computers. Science is a thing full of unknown things. Today, binary has been very perfect in the computer system, and ternary has gradually highlighted its advantages with the emergence of the quantum field.
This article comes from the official account of Wechat: ZTE documents (ID:ztedoc)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.