Home  >  Article  >  What data type is uint?

What data type is uint?

醉折花枝作酒筹
醉折花枝作酒筹Original
2021-06-28 15:20:1825655browse

The UINT type is defined in the "WINDOWS API", which corresponds to a 32-bit unsigned integer; the value of the unsigned integer is "2^31-1", that is, "0~4294967295". Unsigned values ​​can avoid mistakenly storing negative numbers and expand the range of representation.

What data type is uint?

The operating environment of this tutorial: Windows 7 system, Dell G3 computer.

The UINT type is defined in the WINDOWS API, which corresponds to a 32-bit unsigned integer.

Unsigned int (unsigned int): The value is 2^31 - 1, that is: 0~4294967295

Take the decimal 32767 (all the following examples use this number Speaking of things), its binary is:

0111 1111 1111 1111

For the unsigned integer 32767, the highest bit of its binary is called the data bit, that is That 0 is the data bit, and the data bit needs to participate in the operation. If we change 0 to 1, that is, 16 1s, its decimal value is 65535 (that is, 2 to the 15th power, 2 to the 14th power...added until 2 to the power 0), which is different from signed integers.

The root cause of the presence or absence of symbols can be said to be caused by data overflow.

Unsigned values ​​can avoid mistakenly storing negative numbers and expand the range of representation.

For example:

Person within 150 years old unsigned tinyint 1 Unsigned value: 0 to 255.

turtle hundreds of years old unsigned smallint 2 Unsigned value: 0 to 65535.

Dinosaur Fossils Tens of Millions of Years unsigned int 4 Unsigned value: 0 to approximately 4.29 billion.

Sun About 5 billion years unsigned bigint 8 Unsigned value: 0 to about 10 to the 19th power.

What data type is uint?

Extended information:

The keyword UINT does not exist in C, C

The UINT type is

int derived from unsigned int is signed, and the range is: -2147483648 to 2147483647

uint is an unsigned integer, and the range is 0 to 42949 67295(2^32 -1), that is, the first number does not represent the symbol

In C#, uint is the keyword

Represents an integer type that stores values ​​according to the size and range shown in the following table

What data type is uint?

For more computer-related knowledge, please visit the FAQ column!

The above is the detailed content of What data type is uint?. 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