14 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for BlackJax96

Hi, I want to convert a float value to 32bit hex and the code I have right now returns 64bit hex. The float is stored in a string called value. [CODE] result = Convert.ToDouble(value); long lVal = BitConverter.DoubleToInt64Bits(result); string hex = lVal.ToString("X"); OutputBox.Text += ("\nConverted the " + value.GetType().Name + …

Member Avatar for Ketsuekiame
0
3K
Member Avatar for ralph.d.abernathy.1

Hello all. I'm writing a program that converts from any cominbation of base 2, 8, 10, and 16. So far I have this code and I want to convert from hexadecimal to octal but it doesn't work. I would appreciate any help. Thank you! Here is the code: #include "stdafx.h" …

Member Avatar for Nutster
0
484
Member Avatar for dancks

Ok. As the title says I tried many times to simply write a program that rewrites a file to remove null characters. I confirmed with a hex editor that the file in question has tons on null characters, on average about 1 of every 2 characters in null. So my …

Member Avatar for dancks
0
419
Member Avatar for dshiells

Hi all, I'm sure this is a n00b question, but I can't seem to get my head around it! I have a 4 BYTE array which I want to display as a decimal value. For example, in the array it contains the hex values: 00 05 7d a4, and I …

Member Avatar for dshiells
0
2K
Member Avatar for shuchi0113

int main(){ int near * ptr=( int *)0XFFFF; ptr++; ptr++; printf(ā€œ%pā€,ptr); return 0; } Output:0003 why the op is 3 and how to convert 0XFFFF into its decimal equivalent?

Member Avatar for shuchi0113
0
581
Member Avatar for stamatt45

I'm writing a program to convert Decimal numbers to binary, hexadecimal, and BCD as a refresher before i start getting code assignments in school. I'm almost done, but i have a seg_fault (compiler says decToHex function) in 1 function and i am hoping for some feedback on the others. I'll …

Member Avatar for raptr_dflo
0
3K
Member Avatar for calebcook
Member Avatar for debasishgang7

Hi all, I am trying convert IP addresses form Decimal format [Like 192.168.12.13] to HEX format [c0 a8 9d 80]. For Example the IP "192.168.157.128" is equivalent to "c0 a8 9d 80" in HEX. How to do that.??

Member Avatar for debasishgang7
0
2K
Member Avatar for tcl76

hi, i have a script that converts hex to bin and bin to hex back. however, when converting back to hex the leading 0s are truncated. how to maintain the leading 0s? i'm using Python 2.5 and Win XP. tq [CODE] import binascii import string def byte_to_binary(n): return ''.join(str((n & …

Member Avatar for TrustyTony
0
3K
Member Avatar for 24x24

I am to write a program that converts either binary, hex or octal to decimal. We are to use methods for the first time (Not a problem). I have written almost all of the code but the conversion. We can't use int.toDecimal or any shortcut. All must be long coded …

Member Avatar for 24x24
0
230
Member Avatar for _neo_

I have two codes in C and in Python. They gave me different results. Can anybody explain how they works, why I get different results? Thank you in advance!!! In C: ----------- #include <stdio.h> int main() { int a = 100; printf("%d = %02x\n", a, a); a = ~a; printf("%d …

Member Avatar for _neo_
1
213
Member Avatar for jatt09

hi i really need help, i m trying to write a program that displays in a textbox a talbe of the binary, octal, and hexadecimal equivalents of the decimal numbers in range 1-222. Plz help i m new to vb....Thks you

Member Avatar for jatt09
0
182
Member Avatar for dorien

Hi, I found a number of post talking about this in C, but could not solve it in C++. I have 4 hex characters to represent a length. These need to be stored like this, in the case where length=16 ([URL="http://www.easycalculation.com/decimal-converter.php"]this online converter[/URL] told me that 16 converts to A …

Member Avatar for dorien
0
4K
Member Avatar for dorien

Hi, I have been reading a number of posts about this, but I have not been able to figure it out. I want to write hex to a midi file. The hex code of the midi file looks like this: [CODE]4D 54 68 64 00 00 00 06 00 01 …

Member Avatar for dorien
0
9K

The End.