DonnaF Posted March 29, 2003 Posted March 29, 2003 Convert Decimal to Binary I need to convert a decimal to binary, and display the binary value. Does anyone know of a way to do this? Thanks, Donna Quote
philprice Posted March 29, 2003 Posted March 29, 2003 There will be loads of algorithms for this on the internet, i remeber i wrote one for my AS Level course when i have about 15. Anyway - yeah. Quote Phil Price� Visual Studio .NET 2003 Enterprise Edition Microsoft Student Partner 2004 Microsoft Redmond, EMEA Intern 2004
Leaders Iceplug Posted March 31, 2003 Leaders Posted March 31, 2003 Well, one way to go about it (if you are still here :( ) Q = 65536 Do D2B &= (Decim \ Q) Decim -= (Q * (Decim \ Q)) Q = Q \ 2 Loop While Q > 0 I did something like this in VB6, but should be easily adaptable. :) Quote Iceplug, USN One of my coworkers thinks that I believe that drawing bullets is the most efficient way of drawing bullets. Whatever!!! :-(
*Experts* Volte Posted March 31, 2003 *Experts* Posted March 31, 2003 Convert.ToString(<value>, 2)That'll return the binary. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.