QueryCAT Logo
Search 5,000,000+ questions and answers.

Frequently Asked Questions

How do I convert a decimal number to hexadecimal, and the other way around?

JavaScript - Frequently Asked Questions - CodingForums.com
For converting a hexadecimal number to a decimal number, you use the parseInt function with a radix of 16, like this: Code: var nDecimal=parseInt(sHexadecimal, 16); where sHexadecimal is a string containing a hexadecimal number. For converting a decimal number to hexadecimal, you use the toString method with an argument of the radix you want to convert to, in this case 16, like this: Code: var sHexadecimal=nDecimal.

How do you convert degrees, minutes, and seconds to and from a decimal number?

DCP: Frequently Asked Questions
Example: To convert 49 degrees 30 minutes and 45 seconds to decimal degrees: dn = 49 + 30/60 + 45/3600 = 49.5125 Note that int(n) denotes taking the integer part of a number (e.g. int(49.5125) = 49) and frac its fractional part (e.g. frac(49.5125) = 0.5125). mi is an intermediate result. Example: To convert 49.5125 decimal degrees to degrees, minutes and seconds: d = int(49.5125) = 49 mi= frac(49.5125)*60 = 0.5125*60 = 30.75 m = int(mi) = int(30.75) = 30 s = frac(mi)*60 = 0.

How do you convert hexadecimal, binary, and decimal numbers?

Math Forum: Ask Dr. Math FAQ: Number Bases
First, be sure you understand exactly what numbers mean in the old familiar decimal system. If I write 3409, what it really means is 3*1000 + 4*100 + 0*10 + 9*1... I can also write it as: 3*103 + 4*102 + 0101 + 9*100 (remember that 100 = 1). Now there's nothing magic about 10 - it was chosen because we happen to have 10 fingers. If humans had 7 fingers, you can bet that we'd be writing numbers like this: 3204 = 3*73 + 2*72 + 071 + 4*70.

Is there a simple way to convert from binary (base 2) numbers to hexadecimal (base 16) numbers?

Math Forum: Ask Dr. Math FAQ: Number Bases
A big part of the reason that we use hexadecimal is that it is relatively easy to convert between binary and hexadecimal. Hexadecimal numbers are closely related to binary, but they are shorter and easier to read than binary. Group the binary digits into groups of 4 starting from the right...

How can I convert integers to binary or hexadecimal?

Miscellaneous
Make sure you really know what you're asking. Integers are stored internally in binary, although for most purposes it is not incorrect to think of them as being in octal, decimal, or hexadecimal, whichever is convenient. The base in which a number is expressed matters only when that number is read in from or written out to the outside world, either in the form of a source code constant or in the form of I/O performed by a program.

Some of these sites show the coordinates in decimal format. How do I convert?

Markwell's Update to FAQ
Take the integer (whole number) - positive is North and East, negative is South and West - and set it aside. The remaining decimals would be multiplied times sixty to get minutes. Example: the Sears Tower in Chicago is located at 41.878928? -87.636415?. For the latitude... N41? 52.736 Now try the math on your own: Longitude -87.636415? will convert to W087? 38.185. To reverse the process, take the minutes portion and divide by 60, then tag it on to the degrees. West" is negative: -87.

What is hexadecimal?

Simply Modbus - Data Communication Test Software - FAQ
When troubleshooting problems, it can be helpful to see the actual raw data being transmitted. Long strings of ones and zeroes are difficult to read, so the bits are combined and shown in hexadecimal. Each block of 4 bits is represented by one of the sixteen characters from 0 to F.

How to convert floating point decimal to binary?

JavaChina: SCJP Questions & Answers by Roseanne Zhang (8...
In the integer part, you devide by 2. In the decimal part, you multiply by 2 Decimal Binary 2 10 4 100 8 1000 16 10000 0.5 0.1 0.25 0.01 0.125 0.001 0.0625 0.0001 ... You should get my point now.

How do I convert a string to a number?

Updating the For Beginners forum FAQ - GameDev.Net Discussio...
I am including the header file <string>, and I am using the string class, but the code doesn't compile? (namespace resolution, having the std:: topics) How do I use unique() with vectors? (answered only once, but still a good question to have due to people not knowing that it's possible to do)

Why do I have a decimal number in my bank account balance?

Faq - PsyHelp
While fractional amounts of money are useless to you, the PsyPets Bank shows you these amounts so that you can assure yourself that you are collecting interest on your money.

How do I enter values using hexadecimal?

Infrequently Asked Questions in comp.lang.c
Now you need to look at how to declare a pointer to function returning something, say, an object of type S. That's like this: S (*bar)(); Now assume that S is ''pointer to function returning pointer to char''. We get (char *) (*)() (*bar)(). So, the whole thing turns out to be (with appropriate parentheses) (((char)(*))((*)())(((*)((foo)))())([(N)])); This works because, in C, declaration reflects use, but it's one of those weird distorted mirrors. [a]

Can you explain how to convert binary fractions to decimal numbers, e.g. 0.00011001100110011001...?

Math Forum: Ask Dr. Math FAQ: Number Bases
How do you convert numbers to base 16 numbers? Please use the following numbers in an example: 411213 and 38015. Here's one way to think about other bases. If you were given 3 hundred-dollar bills and 4 ten-dollar bills and 2 one-dollar bills you would have 342 dollars. We can just "glue" the 3 and the 4 and the 2 together because our decimal number system is based on tens.

What's the best way to convert color images to B&W?

Digital Photography FAQ
I don't know. I've read many discussions of this and tried many tools for it without finding anything that feels like B&W to me. My current favorite approach is DigiDaan's channel mixer method. Here are some other approaches: Picture Window (free trial) makes it easy to apply different colored filters as part of your conversion to B&W. (Thanks, David.)

Question: How do I convert EDACS SYSTEM ID format (decimal to AFS)?

Scanner Frequently Asked Questions - TrunkTracking Scanners
Answer: Our scanners use either decimal format or decimal and AFS format. You can convert decimal EDACS IDs to the AFS (Agency-Fleet-Subfleet) format as follows: Answer: With an EDACS system, the frequencies have to be in a particular order. Also, unless indicated otherwise in the scanner's manual, you should not mix other frequencies in the same bank as the EDACS frequencies. We do not have information on the correct order for specific EDACS frequencies.

How do I convert degrees from decimal degrees, degree-minutes and degree-minute-second formats?

GPS Waypoints General FAQ
To do these calculations, you can download the degree format conversion calculator as an MS Excel spreadsheet. (Note that it has macros which you need to enable - if your browser asks you)

How can I change the number of decimal places that my results are displayed in?

How do I import data and conduct analyses of survey data in ...
To change the number of decimal places that your results are displayed in by changing the default setting, click on file -> preferences. There are two boxes at the bottom that control the numerical part of the output display, one to switch between fixed and scientific notation and one to indicate the number of decimal places for the estimates and the standard errors.

edit] Why do I have a decimal number in my bank account balance?

FAQ - PsyHelp
While fractional amounts of money are useless to you, the PsyPets Bank shows you these amounts so that you can assure yourself that you are collecting interest on your money.

How do I define a new currency ? How can i set number of decimal places more than two?

MM FAQ
If you change the current currency all of your accounting documents will be re-evaluated by R3 and this could cause adverse affects to your financials. However you notice that accounting documents will still reflect the 2 digit price and rounded to the nearest 1/100th. You can try consignment process. In this process, Vendor holds the goods until they are sold. The price to the supplier can be reset when the goods are sold in settle consignment liabilities.

Is there a way to convert MP3s into WAVs?

Addicted to Noise - A taste of clubgeneration!
Yes there is, you can decode a MP3 into a wav file with L3dec, you can find it on the encoders page. But there are also mp3 players that can decode MP3s into WAVs. Winamp is one of them. Go to the "prefs", then "output" and select "WAV file output".
More Questions >>

© Copyright 2007-2012 QueryCAT
About • Webmasters • Contact