How can I convert a hexadecimal number to base 10 efficiently in C?
In C what is the most efficient way to convert a hexadecimal value to its base 10 value? For example, if I have FFFFFFFE the result would be 4294967294. ...
In C what is the most efficient way to convert a hexadecimal value to its base 10 value? For example, if I have FFFFFFFE the result would be 4294967294. ...
I work a lot with network and serial communications software, so it is often necessary for me to have code to display or log hex dumps of data packets. Every time I do this, I write yet another hex-dump routine from scratch. I'm about to do so again, but figured I'd ask here: Is there any good free hex dump code for C++ out there some...
Is there a built in way to convert an integer in Ruby into its hexadecimal equivalent. The opposite of "0A".to_i(16) =>10 or "0A".hex =>10 I know how to roll my own, but it's probably more efficient to use a built in ruby function ...
I am looking for a way to convert a long string (from a dump), that represents hex values into a byte array. I couldn't have phrased it better than the person that posted the same question here: http://www.experts-exchange.com/Programming/Programming_Languages/Java/Q_21062554.html But to keep it original, I'll phrase it my own way: su...
I downloaded Hex Workshop, and I was told to read a .dbc file. It should contain 28,315 if you read offset 0x04 and 0x05 I am unsure how to do this? What does 0x04 mean? ...
I'm looking for a way to transform a genuine string into it's hexadecimal value in SQL. I'm looking something that is Informix-friendly but I would obviously prefer something database-neutral Here is the select I am using now: SELECT SomeStringColumn from SomeTable Here is the select I would like to use: SELECT hex( SomeStringC...
0x34363932353433373538323038353135353439 ...
Hi, How do I build an escape sequence string in hexadecimal notation. Example: string s = "\x1A"; // this will create the hex-value 1A or dec-value 26 I want to be able to build strings with hex-values between 00 to FF like this (in this example 1B) string s = "\x" + "1B"; // Unrecognized escape sequence Maybe there's another way o...
This is probably a common question over the Internet, but I couldn't find an answer that neatly explains how you can convert a byte array to a hexadecimal string, and vice versa. Any takers? ...
This is a follow up question. So, Java store's integers in two's-complements and you can do the following: int ALPHA_MASK = 0xff000000; In c# this requires the use of an unsigned integer, uint, because it interprets this to be 4278190080 instead of -16777216. My question, how do declare negative values in hexadecimal notation in c#,...
Hi, I am working on a calculator that allows you to perform calculations past the decimal point in octal, hexadecimal, binary, and of course decimal. I am having trouble though finding a way to convert floating point decimal numbers to floating point hexadecimal, octal, binary and vice versa. The plan is to do all the math in decimal a...
if digit is the name for a number on base 10, what would be the name for a number on base 16? Hexgit? ...
Does anyone have a list or chart of all MSIL codes and their corresponding hex values? ...
I am reading a list of assigned rights from an exchange mailbox, these values are returned via the AccessFlag property which returns 20001 in Hex, it looks like 2000 represents the READ permission and the 1 represents FULL permission. What I want to do is display that value as READ & FULL permissions set. ...
Hello all, At this point most people will be thinking "Ah ill post this..:" byte[] dataB= System.Text.Encoding.ASCII.GetBytes(data); However.. the problem I have is i need the exact value of the bytes with no encoding just the pure value for each byte. For example if the value of the string is (0xFF32) i want it to convert it too {25...
I'm getting odd results in some VB6 code which I've narrowed to this: Debug.Print Hex(&hEDB80000 + &h8300) Shows EDB78300 That can't by right can it? Surely it should be EDB88300? Am I going mad? ...
I have a hexidecimal string that I need to convert to a byte array. The best way (ie efficient and least code) is: string hexstr = "683A2134"; byte[] bytes = new byte[hexstr.Length/2]; for(int x = 0; x < bytes.Length; x++) { bytes[x] = Convert.ToByte(hexstr.Substring(x * 2, 2), 16); } In the case where I have a 32bit value I can d...
I have the following code: SN.get_Chars(5) SN is a string so this should give the 5th Char Ok! Now i have another code but : SN.get_Chars(0x10) I wonder what 0x10 is? Is it a number? If it's so, then what is it in decimal notation? ...
I am trying to parse some output data from and PBX and I have found something that I can't really figure out. In the documentation it says the following Information for type of call and feature. Eight character for ’status information 3’ with following ASCII values in hexadecimal notation. 1. Character Bit7 Incoming call Bit6 Out...
I'm trying to learn about SHA-1, I was looking at the C implementation that was included in the specification (RFC 31741) and this part confuses me: context->Intermediate_Hash[0] = 0x67452301; context->Intermediate_Hash[1] = 0xEFCDAB89; context->Intermediate_Hash[2] = 0x98BADCFE; context->Intermediate_Hash[3] = 0x10325476; cont...