Home  >  Article  >  Backend Development  >  What is 0o1010 in python

What is 0o1010 in python

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼Original
2019-06-19 14:53:3831794browse

What is 0o1010 in python

python What is 0o1010? It starts with 0, meets the requirements of octal, and is an octal number. Let’s take a look at the four forms of expression of integers:

For integers: there are four forms of expression

Binary: 0, 1 is entered as 2 as 1

Octal: 0-7 as 8 is entered as 1, starting with 0

Decimal: 0- 9 is the base of 10.

Hexadecimal: 0-9, A-F is the base of 16. Use 0x to represent

bit (bit): the smallest unit for storing information, representing a binary number .

Byte: A byte is composed of 8-bit binary numbers (1Byte=8bit). Byte is the basic unit of storage and information organization.

1K = 1024Byte

1M = 1024K

1G = 1024M

1T = 1024G

Related recommendations: "python Video tutorial

Let me introduce to you the basic method of converting 0o1010 into our commonly used decimal system.

The first step is to click on the menu bar, search for IDLE, and open the shell.

What is 0o1010 in python

The second step is to enter the code converted from octal to decimal, int ('the number after the decimal symbol', the decimal number), for example, 0o1010, the number is 1010, The base number is 8.

What is 0o1010 in python

The third step is to enter the conversion result.

What is 0o1010 in python

The above is the detailed content of What is 0o1010 in python. 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