473,394 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

how to convert hex to ascii

HI
My hard drive id is 18 5D BC , how can i convert it into ascii or text using C / c++

some one translated but i do not know how
18 = M
5D = K
BC = E

thanks
Jun 8 '10 #1
4 5162
Banfa
9,065 Expert Mod 8TB
I do not know how either, if the decoded values you give are correct you would need to find out from somewhere what the coding used to encode the characters were because they do not conform to any character set I am familiar with.
Jun 8 '10 #2
alexis4
113 100+
This is not ASCII...
Jun 8 '10 #3
whodgson
542 512MB
Hex is a numerical format.ASCII is not a numerical format but a numerical code for characters like commas and alphabetical letters. You can`t convert between a code and a format but you can convert a code from its integer format to a hex format.
Jun 10 '10 #4
johny10151981
1,059 1GB
Try this.
step 1:
read hexa value
step 2:
assign hexa value to an integer variable(trying develop function to transfer from hexa to Decimal. not that hard)
decimal=toDecimal(hexa); //hexa is array of char
step 3:
printf("%c",decimal);

step 4:
repeat step 1:3 until finish all hexas

Best regards,
johny
Jun 10 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: VenuGopal | last post by:
Hi Everyone, in my application i am interacting to a known server. i send a request and get a response from the server. i am using XML and HTTP here. part of the job is that the XYZ server is...
3
by: Director - Minvent | last post by:
Hi, I am reading from a serial port from a device which sends over an ascii character. It uses the full extended 256 character set and therefore has non-printing characters too. So what i want...
8
by: davihigh | last post by:
My Friends: I am using std::ofstream (as well as ifstream), I hope that when i wrote in some std::string(...) with locale, ofstream can convert to UTF-8 encoding and save file to disk. So does...
1
by: ayaniv | last post by:
can anyone tell me how can i convert the ascii code: 48 to the binary number: 00110000 ?? if anyone knows if there any other way to save the char of an ascii code 48 in a variable it would be...
2
by: veg_all | last post by:
I replace some user input with their ascii equivalent so they display on the webpage properly: $entry = preg_replace ( "/\'+/" , ''' , $entry); $entry = preg_replace ( "/\,+/" , ',' ,...
2
by: greyhoundz102 | last post by:
hi, could someone pls help me how to convert ascii to integer without using the atoi function? (ex. X44).. i want to get the numbers and convert it to integers.. pls send me the code for C. tnx so...
2
by: Joe | last post by:
does anyone know where can I found a function to convert my ascii certified # into bar128 for barcode font ? :) thanks!
4
by: meendar | last post by:
Hi, I am having a character pointer which contains ascii values. i just want to convert all these ascii values to respective characters and again store it in another character pointer. ...
2
by: mdcj1 | last post by:
In my reseach project I am reading data from microcontroller through serial port. It gives the data in ASCII code. I need to read these data in real values ( with decimal points). Please help me to...
1
by: mdcj1 | last post by:
In my reseach project I am reading data from microcontroller through serial port. It gives the data in ASCII code. I need to read these data in real values ( with decimal points). Please help me to...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.