Bit Values

The table below lists bitwise values starting from 1bit through 64bit.

Decimal Binary Hex
2^0 1 1 1
2^1 2 10 2
2^2 4 100 4
2^3 8 1000 8
2^4 16 10000 10
2^5 32 100000 20
2^6 64 1000000 40
2^7 128 10000000 80
2^8 256 100000000 100
2^9 512 1000000000 200
2^10 1024 10000000000 400
2^11 2048 100000000000 800
2^12 4096 1000000000000 1000
2^13 8192 10000000000000 2000
2^14 16384 100000000000000 4000
2^15 32768 1000000000000000 8000
2^16 65536 10000000000000000 10000
2^17 131072 100000000000000000 20000
2^18 262144 1000000000000000000 40000
2^19 524288 10000000000000000000 80000
2^20 1048576 100000000000000000000 100000
2^21 2097152 1000000000000000000000 200000
2^22 4194304 10000000000000000000000 400000
2^23 8388608 100000000000000000000000 800000
2^24 16777216 1000000000000000000000000 1000000
2^25 33554432 10000000000000000000000000 2000000
2^26 67108864 100000000000000000000000000 4000000
2^27 134217728 1000000000000000000000000000 8000000
2^28 268435456 10000000000000000000000000000 10000000
2^29 536870912 100000000000000000000000000000 20000000
2^30 1073741824 1000000000000000000000000000000 40000000
2^31 2147483648 10000000000000000000000000000000 80000000
2^32 4294967296 100000000000000000000000000000000 100000000
2^33 8589934592 1000000000000000000000000000000000 200000000
2^34 17179869184 10000000000000000000000000000000000 400000000
2^35 34359738368 100000000000000000000000000000000000 800000000
2^36 68719476736 1000000000000000000000000000000000000 1000000000
2^37 137438953472 10000000000000000000000000000000000000 2000000000
2^38 274877906944 100000000000000000000000000000000000000 4000000000
2^39 549755813888 1000000000000000000000000000000000000000 8000000000
2^40 1099511627776 10000000000000000000000000000000000000000 10000000000
2^41 2199023255552 100000000000000000000000000000000000000000 20000000000
2^42 4398046511104 1000000000000000000000000000000000000000000 40000000000
2^43 8796093022208 10000000000000000000000000000000000000000000 80000000000
2^44 17592186044416 100000000000000000000000000000000000000000000 100000000000
2^45 35184372088832 1000000000000000000000000000000000000000000000 200000000000
2^46 70368744177664 10000000000000000000000000000000000000000000000 400000000000
2^47 140737488355328 100000000000000000000000000000000000000000000000 800000000000
2^48 281474976710656 1000000000000000000000000000000000000000000000000 1000000000000
2^49 562949953421312 10000000000000000000000000000000000000000000000000 2000000000000
2^50 1125899906842624 100000000000000000000000000000000000000000000000000 4000000000000
2^51 2251799813685248 1000000000000000000000000000000000000000000000000000 8000000000000
2^52 4503599627370496 10000000000000000000000000000000000000000000000000000 10000000000000
2^53 9007199254740992 100000000000000000000000000000000000000000000000000000 20000000000000
2^54 18014398509481984 1000000000000000000000000000000000000000000000000000000 40000000000000
2^55 36028797018963968 10000000000000000000000000000000000000000000000000000000 80000000000000
2^56 72057594037927936 100000000000000000000000000000000000000000000000000000000 100000000000000
2^57 144115188075855872 1000000000000000000000000000000000000000000000000000000000 200000000000000
2^58 288230376151711744 10000000000000000000000000000000000000000000000000000000000 400000000000000
2^59 576460752303423488 100000000000000000000000000000000000000000000000000000000000 800000000000000
2^60 1152921504606846976 1000000000000000000000000000000000000000000000000000000000000 1000000000000000
2^61 2305843009213693952 10000000000000000000000000000000000000000000000000000000000000 2000000000000000
2^62 4611686018427387904 100000000000000000000000000000000000000000000000000000000000000 4000000000000000
2^63 9223372036854775808 1000000000000000000000000000000000000000000000000000000000000000 8000000000000000


The C# code that generated the table was:

	Console.WriteLine("</pre>
"); Console.WriteLine(""); for (int i = 0; i < 64; i++) { long a = (long)(Math.Pow(2D, i)); Console.WriteLine("", "2^"+i, a, Convert.ToString(a,2), Convert.ToString(a,16) ); } Console.WriteLine("
<table border="1">
<tbody>
<tr>
<th></th>
<th>Decimal</th>
<th>Binary</th>
<th>Hex</th>
</tr>
<tr>
<td>{0}</td>
<td align="right">{1}</td>
<td align="right">{2}</td>
<td align="right">{3}</td>
</tr>
</tbody>
</table>
<pre>
");
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s