Content deleted Content added
→Origin: Refactored section: 1. Eased into subject by comparing to decimal overflow. 2. Introduced types of Integer datatype. 3. Then talked about the CPU's capability of dealing with the Integer datatype. 4. Converted List into Table. 5. Included Signed Range in Table. Tags: Mobile edit Mobile web edit |
→Origin: Added references for the table. Tags: Mobile edit Mobile web edit |
||
Line 23:
{{Table alignment}}
{| class="wikitable defaultright"
|+ Typical Integer Boundaries
! Bits !! Alias !! Range !! Signed Range{{efn|name=signed}} !! Unsigned Range ▼
|-
▲! Bits !! Alias{{efn|name=alias}} !! Range !! Signed Range{{efn|name=signed}} !! Unsigned Range
|-
! rowspan="2" style="white-space: preserve nowrap; text-align:center;" | [[8-bit computing|8-bit]]
| rowspan="2" style="
| rowspan="2" style="white-space: preserve nowrap; text-align:center;" | 2<sup>8</sup> − 1 || {{small|-128<ref name="sbyte.min">{{cite web |url=https://learn.microsoft.com/en-us/dotnet/api/system.sbyte.minvalue |title=.NET SByte.MinValue Field }}</ref>}} || {{small|0<ref name="byte.min">{{cite web |url=https://learn.microsoft.com/en-us/dotnet/api/system.byte.minvalue |title=.NET Byte.MinValue Field }}</ref>}}
|-
|-
| {{small|127<ref name="sbyte.max">{{cite web |url=https://learn.microsoft.com/en-us/dotnet/api/system.sbyte.maxvalue |title=.NET SByte.MaxValue Field }}</ref>}} || {{small|[[255 (number)#In_computing|255]]<ref name="byte.max">{{cite web |url=https://learn.microsoft.com/en-us/dotnet/api/system.byte.maxvalue |title=.NET Byte.MaxValue Field }}</ref>}}
|-
|-
! rowspan="2" style="white-space: preserve nowrap; text-align:center;" | [[16-bit computing|16-bit]]
| rowspan="2" style="
| rowspan="2" style="white-space: preserve nowrap; text-align:center;" | 2<sup>16</sup> − 1 || {{small|−32,
|-
|-
| {{small|32,767<ref name="int16.max">{{cite web |url=https://learn.microsoft.com/en-us/dotnet/api/system.int16.maxvalue |title=.NET Int16.MaxValue Field }}</ref>}} || {{small|[[65,535#In_computing|65,535]]<ref name="uint16.max">{{cite web |url=https://learn.microsoft.com/en-us/dotnet/api/system.uint16.maxvalue |title=.NET UInt16.MaxValue Field }}</ref>}}
|-
|-
! rowspan="2" style="white-space: preserve nowrap; text-align:center;" | [[32-bit computing|32-bit]]{{efn|name=common2005}}
| rowspan="2" style="white-space: preserve nowrap; text-align:center;" | int32<ref name="int32">{{cite web |url=https://learn.microsoft.com/en-us/dotnet/api/system.int32|title=.NET Int32 Struct }}</ref>, uint32<ref name="uint32">{{cite web |url=https://learn.microsoft.com/en-us/dotnet/api/system.uint32|title=.NET UInt32 Struct }}</ref>
| rowspan="2" style="white-space: preserve nowrap; text-align:center;" | 2<sup>32</sup> − 1 || {{small|[[32-bit computing#Range_for_storing_integers|-2,147,483,648]]<ref name="int32.min">{{cite web |url=https://learn.microsoft.com/en-us/dotnet/api/system.int32.minvalue |title=.NET Int32.MinValue Field }}</ref>}} || {{small|0<ref name="uint32.min">{{cite web |url=https://learn.microsoft.com/en-us/dotnet/api/system.uint32.minvalue |title=.NET UInt32.MinValue Field }}</ref>}}
|-
|-
| {{small|[[2,147,483,647]]<ref name="int32.max">{{cite web |url=https://learn.microsoft.com/en-us/dotnet/api/system.int32.maxvalue |title=.NET Int32.MaxValue Field }}</ref>}} || {{small|[[4,294,967,295#In_computing|4,294,967,295]]<ref name="uint32.max">{{cite web |url=https://learn.microsoft.com/en-us/dotnet/api/system.uint32.maxvalue |title=.NET UInt32.MaxValue Field }}</ref>}}
|-
|-
! rowspan="2" style="white-space: preserve nowrap; text-align:center;" | [[64-bit computing|64-bit]]{{efn|name=common2025}}
| rowspan="2" style="white-space: preserve nowrap; text-align:center;" | int64<ref name="int64">{{cite web |url=https://learn.microsoft.com/en-us/dotnet/api/system.int64|title=.NET Int64 Struct }}</ref>, uint64<ref name="uint64">{{cite web |url=https://learn.microsoft.com/en-us/dotnet/api/system.uint64|title=.NET UInt64 Struct }}</ref>
| rowspan="2" style="white-space: preserve nowrap; text-align:center;" | 2<sup>64</sup> − 1 || {{small|−9,223,372,036,854,775,808<ref name="int64.min">{{cite web |url=https://learn.microsoft.com/en-us/dotnet/api/system.int64.minvalue |title=.NET Int64.MinValue Field }}</ref>}} || {{small|0<ref name="uint64.min">{{cite web |url=https://learn.microsoft.com/en-us/dotnet/api/system.uint64.minvalue |title=.NET UInt64.MinValue Field }}</ref>}}
|-
|-
| {{small|[[Power of two#2^63-1|9,223,372,036,854,775,807
{{cite web |url=https://learn.microsoft.com/en-us/dotnet/api/system.int64.maxvalue |title=.NET Int64.MaxValue Field }}
</ref>}} || {{small|[[Power of two#2^64-1|18,446,744,073,709,551,615]]<ref name="uint64.max">
{{cite web |url=https://learn.microsoft.com/en-us/dotnet/api/system.uint64.maxvalue |title=.NET UInt64.MaxValue Field }}
</ref>}}
|-
|-
! rowspan="2" style="white-space: preserve nowrap; text-align:center;" | [[128-bit computing|128-bit]]
| rowspan="2" style="white-space: preserve nowrap; text-align:center;" | int128<ref name="int128">{{cite web |url=https://learn.microsoft.com/en-us/dotnet/api/system.int128|title=.NET Int128 Struct }}</ref>, uint128<ref name="uint128">{{cite web |url=https://learn.microsoft.com/en-us/dotnet/api/system.uint128 |title=.NET UInt128 Struct }}</ref>
| rowspan="2" style="white-space: preserve nowrap; text-align:center;" | 2<sup>128</sup> − 1 || {{small|−170,141,183,460,469,231,731,687,303,715,884,105,728}} || {{small|0}}
|-
Line 77 ⟶ 73:
{{notelist|refs=
{{efn|name=alias|The integer (int) data type typically uses [[two's complement]] thus are signed. The 'u' prefix designates the unsigned implementation.}}
{{efn|name=signed|Signed Ranges are assuming [[two's complement]]}}
{{efn|name=byte|The byte data type is typically unsigned by default. The 's' prefix designates the signed implementation.}}
{{efn|name=common2005|The most common for personal computers {{as of|2005|lc=on}}.}}
{{efn|name=common2025|The most common for personal computers {{as of|2025|lc=on}}.}}
|