为什么整数大小为2,147,483,647 [英] Why Integer Size is 2,147,483,647

查看:160
本文介绍了为什么整数大小为2,147,483,647的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨专家,



我面对很多时间问题。为什么整数大小是2,147,483,647。

如果数据长度超过80个字符,我们使用什么数值数据类型。



如果你有任何建议或解决方案然后请分享。





谢谢

Hi Experts,

I have face many time a Question. why the Integer size is 2,147,483,647 .
What numeric datatype we are using if the length of data is more then 80 characters.

If you have any suggestion or Solution for that then pls share it.


Thanks

推荐答案

添加对System.Numerics程序集的引用,然后使用System.Numerics; 将添加到c#source,然后使用<$ c $类型声明您的数字c> BigInteger 而不是 int
Add a reference to the System.Numerics assembly, then add using System.Numerics; to the c# source and then declare your numbers using the type BigInteger instead of int.


不,整数类型的大小是1,2, 4,8,16,32,64或者128字节......



关于整数值的表示,请参阅: http://en.wikipedia.org/wiki/2%27s_complement [ ^ ]。



这是迄今为止最常见的表示形式。这篇文章应该向你解释一切。



-SA
No, the sizes of integers types are 1, 2, 4, 8, 16, 32, 64 or maybe 128 bytes…

On the presentation of integer values, please see: http://en.wikipedia.org/wiki/2%27s_complement[^].

This is by far the most usual representation. This article should explain everything to you.

—SA


这篇关于为什么整数大小为2,147,483,647的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆