Mega Code Archive

 
Categories / VB.Net / Data Types
 

BigInteger calculation

Imports System Imports System.IO Imports System.Numerics Imports System.Runtime.Serialization.Formatters.Binary Module Example    Public Sub Main()     Dim number As BigInteger = BigInteger.Parse("-7777777")     For ctr As Integer = 0 To 16        Dim newNumber As BigInteger = BigInteger.Multiply(number, BigInteger.Pow(2, ctr))        Console.WriteLine(" {0,2} bits: {1,35} {2,30}", ctr, newNumber, newNumber.ToString("X"))     Next    End Sub End Module