Convert decimal to binary to hexadecimal and vice versa


posted by Tobias Weltner
11-10-2008

Downloads: 330
File size: 151 B
Views: 5,292

Embed
Convert decimal to binary to hexadecimal and vice versa
  1. $number = 12756576 
  2. [Convert]::ToString($number, 2) 
  3. [Convert]::ToString($number, 16) 
  4.  
  5. $binary = '1110111000010001' 
  6. [Convert]::ToInt64($binary, 2) 
Uses the .NET class "Convert" to convert numbers and easily turn decimals in binaries or hexadecimals in octals.
Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.