Byte,short,int,long the multiple relationships between data

Source: Internet
Author: User

Basic data types

byte =-128 and 127------------------------------------------------------------2 of 8 parties, 1 bytes

Short =-32768 and 32767-------------------------------------------------------2 of 16 Parties, 2 bytes

int = 2147483648 and 2147483647----------------------------------------2 32-square, 4-byte

Long = 9223372036854775808 and 9223372036854775807---------------2 of 64 parties, 8 bytes

The so-called one byte represents 2 of the 8-time square, that is, 256, is a byte shaping data a span, and before the computer Science 2 of the 10 of the system is not the same, and the short shape is 2 8 times 2 times the 8 square, that is 2 16 times, do not use a mathematical perspective of 1, 2 bytes of the problem, It should be possible to understand this, and this will relieve my doubts about the multiple relationships of these types of data.

Byte,short,int,long the multiple relationships between data

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.