Home >Common Problem >What are the commonly used base systems?

What are the commonly used base systems?

藏色散人
藏色散人Original
2020-04-18 11:04:5241844browse

What are the commonly used base systems?

What are the commonly used base systems?

1. Binary

Binary is a number system widely used in computing technology. Two numbers can represent all numbers. Binary data uses two digits: 0 and 1. to represent the number. Its base is 2, the carry rule is "every two is forwarded to one", and the borrowing rule is "borrow one to be equal to two", which was discovered by Leibniz, the German master of mathematical philosophy in the 18th century.

The current computer system basically uses a binary system, and data is mainly stored in the computer in the form of two's complement code. The binary system in the computer is a very tiny switch, with "on" representing 1 and "off" representing 0.

2. The ternary system

The ternary system is a carry system with 3 as the base. The ternary system has three digits: 0, 1, and 2. Every three is entered into one. In the early days of computer development, a biased ternary system (symmetrical ternary system) was used, with three digits -1, 0, and 1. This ternary system meets /- 2 into one.

3. Quaternary system

Quaternary system is a carry system with 4 as the base, using the four numbers 0, 1, 2 and 3 to represent any real number. Quaternary shares many properties with all fixed-base counting systems, such as the ability to represent any real number in a standard form and the ability to represent both rational and irrational numbers.

4. Octal

Octal, abbreviated OCT or O, a counting method based on 8 as the base, using 0, 1, 2, 3, 4, 5, 6, 7 Numbers enter 1 every eight. Some programming languages ​​often start with the number 0 to indicate that the number is octal. Octal numbers and binary numbers can correspond bit by bit (one octal number corresponds to three binary digits), so they are often used in computer languages.

The above is the detailed content of What are the commonly used base systems?. 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