PC Review


Reply
Thread Tools Rate Thread

Binary representation of numbers

 
 
cody
Guest
Posts: n/a
 
      25th Jul 2004
Is there any built in functionality in the .NET framework to get the binary
represention in form of string from a given integer? I can do
1344.ToString("x2") to get hexadecimal output but I need binary.
I know this can be simply programmed with a few lines of code but I just
want to know.

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk


 
Reply With Quote
 
 
 
 
Mick Doherty
Guest
Posts: n/a
 
      25th Jul 2004
Convert.ToString(1344,2)

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html


"cody" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Is there any built in functionality in the .NET framework to get the

binary
> represention in form of string from a given integer? I can do
> 1344.ToString("x2") to get hexadecimal output but I need binary.
> I know this can be simply programmed with a few lines of code but I just
> want to know.
>
> --
> cody
>
> [Freeware, Games and Humor]
> www.deutronium.de.vu || www.deutronium.tk
>
>



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.719 / Virus Database: 475 - Release Date: 12/07/2004


 
Reply With Quote
 
cody
Guest
Posts: n/a
 
      26th Jul 2004
> Convert.ToString(1344,2)

Thank you

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk


 
Reply With Quote
 
cody
Guest
Posts: n/a
 
      26th Jul 2004
But the question is why doesn't have System.Int32.ToString() such an
overload and why doesn't a binary format specifier like "x" exist?

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Binary Numbers Sanford Lefkowitz Microsoft Excel Misc 9 12th May 2010 04:06 PM
Binary representation of a double? =?Utf-8?B?dmVjb3pvQG9ubGluZS5ub3NwYW0=?= Microsoft Dot NET Framework 11 5th Apr 2006 11:36 PM
PackedLen in the string binary representation Wiktor Zychla Microsoft C# .NET 2 12th May 2004 03:09 PM
binary representation d Microsoft VB .NET 4 7th Sep 2003 11:23 PM
Binary Representation D Microsoft VB .NET 11 7th Sep 2003 09:21 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:45 AM.