Binary is a number system widely used in computing technology. It was invented by Leibniz, the German master of mathematical philosophy in 1679. 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 current computer system basically uses a binary system, and data is mainly stored in computers in the form of two's complement codes. The binary system in the computer is a very tiny switch, with "on" representing 1 and "off" representing 0.
The invention and application of computers in the 20th century is known as one of the important symbols of the third technological revolution, because digital computers can only recognize and process information generated by A code composed of 0'.'1' symbol string. Its operation mode is binary. The 19th century Irish logician George Boole's thinking process on logical propositions was transformed into some algebraic calculation of the symbols "0''.''1". Binary is a carry system where 2 is the digit. 0 and 1 are the basic operators. .Because it only uses two digital symbols 0 and 1, it is very simple and convenient, and easy to implement electronically. (Recommended learning: PHP video tutorial)
Binary calculation method Features:
① Binary numbers only have two digits "0" and "1", the base is 2, and the largest number is 1;
② Adopt the principle of every two into one .
The binary bit weight is generally expressed as: 2^(n-1). The weight of each bit is the power of base 2. For example, (01101010) the weight of each bit is 2^7 , 2^6, 2^5, 2^4,
2^3, 2^2, 2^1, 2^0.
The four arithmetic rules of binary numbers, division Except for carry and borrow bits, they are the same as decimal numbers.
The advantages of binary are:
(1) Binary only has two digits "0" and "1", which is easy Representation. The high and low voltage, the cut-off and saturation of the transistor, the magnetization direction of the magnetic material, etc. can all be expressed as "0" and "1" states.
(2) Each bit of a binary number has only two states: 0 and 1, and only two devices are needed to represent it, so binary numbers save equipment. Because the states are simple, they have strong anti-interference and high reliability.
Binary The main disadvantage is that the digits are too long, which is inconvenient to read and write, and people are not used to it. For this reason, octal and hexadecimal are often used as binary abbreviations.
In order to adapt to people's habits, they are usually used in computers Binary numbers, input and output use decimal numbers, and the computer completes the conversion between binary and decimal.
The binary system was indeed invented by Leibniz.There is a popular view that The binary system comes from Chinese gossip, but this has long been falsified. Guo Shuchun pointed out on page 461 of the book "Liu Hui, the Master of Mathematics in the Ancient World": "There is a saying in China that the binary system was created by the Zhouyi. As for Leibniz who was inspired by the "Book of Changes" The myth that the binary system was created and used in computers was influenced by the Eight Trigrams of the Book of Changes, and it is even more widely circulated. The fact is that Leibniz first invented the binary system, and later saw the Bagua of the Book of Changes rearranged by Song Dynasty scholars brought back by missionaries, and found that the Bagua could be explained by his binary system. "Therefore, it was not Leibniz who invented the binary system after seeing the Yin and Yang Bagua. Pages 14 to 18 of Liang Zong's masterpiece "Allusions to the History of Mathematics" have a more detailed examination of this historical case. More PHP For related technical articles, please visit the
PHP Graphic TutorialThe above is the detailed content of How to understand binary. For more information, please follow other related articles on the PHP Chinese website!

二进制算法是一种基于二进制数的运算方法,其基本运算包括加法、减法、乘法和除法。除了基本运算外,二进制算法还包括逻辑运算、位移运算等操作。逻辑运算包括与、或、非等操作,位移运算包括左移和右移操作。这些操作都有对应的规则和操作数的要求。

EDVAC的两个重大的改进:一是采用二进制,二是完成了存贮程序,可以自动地从一个程序指令进到下一个程序指令,其作业可以通过指令自动完成。“指令”包括数据和程序,把它们用码的形式输入到机器的记忆装置中,即用记忆数据的同一记忆装置存贮执行运算的命令,这就是所谓存贮程序的新概念。

二进制数以1和0表示。16位的十六进制数系统为{0,1,2,3…..9,A(10),B(11),……F(15)}为了从二进制表示转换为十六进制表示,位串id被分组为4位块,从最低有效侧开始称为半字节。每个块都替换为相应的十六进制数字。让我们看一个示例,以清楚地了解十六进制和二进制数字表示。001111100101101100011101 3 E 5 B&nb

Golang如何读取二进制文件?二进制文件是以二进制形式存储的文件,其中包含了计算机能够识别和处理的数据。在Golang中,我们可以使用一些方法来读取二进制文件,并将其解析成我们想要的数据格式。下面将介绍如何在Golang中读取二进制文件,并给出具体的代码示例。首先,我们需要使用os包中的Open函数打开一个二进制文件,这将返回一个文件对象。然后,我们可以使

题目:轻松学会Go语言中16进制转二进制,需要具体代码示例在计算机编程中,经常会涉及到对不同进制数之间的转换操作。其中,16进制和二进制之间的转换是比较常见的。在Go语言中,我们可以通过一些简单的代码示例来实现16进制到二进制的转换,让我们一起来学习一下。首先,我们来了解一下16进制和二进制的表示方法。16进制是一种表示数字的方法,使用0-9和A-F来表示1

计算机采用二进制的主要原因:1、计算机是由逻辑电路组成,逻辑电路通常只有两个状态,开关的接通与断开,这两种状态正好可以用“1”和“0”表示;2、二进制中只使用0和1两个数字,传输和处理时不易出错,因而可以保障计算机具有很高的可靠性。

Golang能否处理二进制文件?在Go语言中,处理二进制文件是非常常见且方便的。通过使用内置的包和方法,我们可以轻松地读取、写入和操作二进制文件。本文将介绍如何在Go中处理二进制文件,并提供具体的代码示例。读取二进制文件要读取一个二进制文件,我们首先需要打开这个文件并创建一个对应的文件对象。然后,我们可以使用Read方法从文件中读取数据,并以字节的形式存储在

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

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

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Atom editor mac version download
The most popular open source editor
