Number of python3 (in actual application -- hexadecimal, octal, and binary notation)----------
Python integers can be written in hexadecimal, octal, and binary notation to supplement general decimal notation. Example:
>>> 0o1, 0o20, 0o377 # octal (2
Popular usage: each bit of binary represents a State.
001,010,100 indicates three states.
Through or | operations, you can combine various States.
001 | 010 = 011
001 | 010 | 100 = 111
You can remove a certain State through and & Operations.111 & 00
Php hexadecimal and bitwise operations. Php hexadecimal and bitwise operations: octal. the preceding value 0 represents the octal echo0123 and br. the decimal value 83 represents three digits from right to left, with 1 Top 1 and 1 top 8 respectively,
It is estimated that the first impression is atoi. In fact, it is not easy to use atoi when it encounters "0x1234", and I think it is best to use strtol and strtoul:
Http://huigezrx.blog.163.com/blog/static/3210165220102472843690/ from:
Strtol
I. hexadecimal knowledge
(1) The default value is decimal. Add 0 to the front of the octal node, that is, int num1 = 015; it is 13. Add 0x/0x before the hexadecimal notation, that is, int num1 = 0xd. The result is 13. The first part of the binary
Hdu 3001 (solid-pressure dp + tri-hexadecimal)
Whether it is a few hexadecimal notation, it uses a logical concept. (The last hexadecimal notation was used to convert multi-dimensional data) the core idea is TSP. The Preprocessing here is clever,
N-Base
Broadly speaking, N-base can be said to be any base. In reality, 0 and 1 are meaningless, so N 2 is a positive integer. There are two purposes for which N-base is introduced. The first is to use N-base to combine the Conversion Relationship
JSON(JavaScript Object Notation) is a lightweight data exchange format. Easy to read and write. It is also easy to parse and generate machines. It is based on a subset of JavaScript programming language, standard ECMA-262 3rd edition-December 199
N-Base
Broadly speaking, N-base can be said to be any base. In reality, 0 and 1 are meaningless, so N 2 is a positive integer. There are two purposes for which N-base is introduced. The first is to use N-base to combine the Conversion Relationship
Introduction
As we all know, a computer system uses a binary number system, and the machine code and command code it can recognize are all sequences composed of 0 and 1. In our daily life, we use a decimal number system. Why can't computers only use
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.