Reprint Address: http://hi.baidu.com/thewillreigns/blog/item/67e665c4296e69c038db492d.html
Char and unsigned char are unsignedBoth are used words as words that are indistinguishable, but when integers are used differently:Char integer range is-128
A problem occurs when a program running properly on a 32-bit machine fails on a 64-bit machine. So I found this article about transplantation and took a good look.
Original post address: http://queniao.blog.51cto.com/10636/126564
In fact, there is
############## #首先 ###############
Signed int signed integral type
unsigned int non-symbolic integer
int is signed int, which is written with [signed] int to indicate signed can omit
2^31=2147483648
2^31-1=2147483647
2^32=4294967296
2^32-1=42949672
Recently in the study, I suddenly thought, I in 64-bit environment, int range of values have changed? To detect this result, I did the following test:1, Environment: Win7 flagship 64-bit +VS2010 SP1 (version number: 10.0.40219.1sp1rel) +.net 4.0.3031
The integer range of 32-bit and 64-bit PHP and MySQL is 8 bytes, so the 32-bit int type occupies 32-bit/8-bit = 4 bytes, 64-bit int occupies 64-bit/8-bit = 8 bytes.
32-bit, 64-bit unsigned integer maximum value:
2 ^ 64-1 = 18446744073709551615
Title Source: Leetcode Reverse IntegerGiven a 32-bit signed integer, reverse digits of an integer.Example 1:example 2:example 3:input : 123 input : -123 Input: 120output: 321 output : -321 output: 21Note:Assume we is dealing with a environment which
Click to open linkIn 32-bit, 64-bit systems, the only change is the length of the pointer; The 32-bit system is 4 bytes, 64 bits is 8 bytes. This refers to the bit width of the register, which is the so-called three-position . Results under
To sum up, perform the signed operation step 1. extend each input to the same width as the output. operation 3. the last few bit widths of the calculation result. The bit width is the size of the output bit width. To prevent overflow, determine the
Binary negative Number:The original code is the original representation methodAnti-code is the inverse of the sign bit (highest bit)Complement = anti-code +1 1 bytes It can only represent 256 numbers anyway, because there is a sign, so we're going
Original URL: http://www.ibm.com/developerworks/cn/linux/l-port64.htmlWith the popularity of 64-bit architectures, preparing your Linux® software for 64-bit systems has become more important than ever. In this article, you'll learn how to prevent
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.