|
||||||
| Managed C++ Visual Studio .NET managed C++ Topics |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||||
|
Decimal to binary is a simple enough equation that you can create it yourself. Divide your decimal number by 2 and take the remainder. You can do this using the modulus (%) operator. Keep doing this until the decimal number = 0.
Code:
(int) BinaryMod = decimalNumber %2; (String) BinaryDisplay += BinaryMod; decimalNumber / 2; Code:
Convert.ToString(DecimalValue, 2).PadLeft(8, "0")
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog The CodeCall Wiki is now fully integrated with vBulletin users! Check it out and add some new pages! |
|
|||||
|
You need to convert the base to 16 for hexadecimal. I found some C# code which does this and you should be able to convert it to Manage C++ code very easy: How to convert string to hexadecimal and vice versa
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog The CodeCall Wiki is now fully integrated with vBulletin users! Check it out and add some new pages! |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PHP Code: Simple Encryption Algorithm | Void | PHP Tutorials | 11 | 11-05-2008 05:08 PM |
| Basic Calculator | AfTriX | VB Tutorials | 3 | 02-29-2008 09:53 AM |
| help with code to play video clip | san_001 | HTML Programming | 2 | 10-10-2007 03:13 PM |
| Where to Put PHP Code | clookid | PHP Tutorials | 1 | 01-11-2007 09:44 PM |
| WingedPanther | ........ | 2753.6 |
| Xav | ........ | 2704 |
| Brandon W | ........ | 1702.32 |
| John | ........ | 1207.73 |
| marwex89 | ........ | 1175.24 |
| morefood2001 | ........ | 966.05 |
| dcs | ........ | 655.75 |
| Steve.L | ........ | 475.59 |
| orjan | ........ | 418.58 |
| Aereshaa | ........ | 383.54 |