<p>The operation is discretization to steps of size $0.05\mathrm{Hz}$. In other words, in the computer the values stored are in a new unit which is 20 times smaller than a Hertz.</p>

<p>This corresponds to decimal values after the dot of the forms $.X$ and $.X5$. So two steps correspond to a change in the first digit after the dot.</p>

<p>In fixed-point arithmetic, there is a base (usually base 2), and you take a fixed number of digits after the dot. This works (somewhat artificially) in this case if you use base 20.</p>

CC BY-SA 2.5
2011-01-15T01:09:01.597Z
2011-01-15T01:09:01.597Z
Yuval Filmus
<p>I'm working with a device that allows remote updates via SNMP to change the FM input/ouput frequency of the device. When I query the devices, I get back whole numbers, but, in real life, FM frequencies have decimal values. I happened to stumble across some code for setting the frequency where the developer was taking decimal values (representing FM frequencies) and dividing them by 0.05 before saving them into the device. Inversely, for display purposes, the developer multiplied the numbers by 0.05 to turn them back into their decimal notation. For example:</p>

<pre>107.1 / 0.05 = 2142
2142 * 0.05 = 107.1</pre>

<p>There is no documentation that specifies the meaning of this operation. I thought it might be some kind of <a href="http://en.wikipedia.org/wiki/Fixed-point_arithmetic" rel="nofollow">fixed-point arithmetic</a> (popular before the days of <a href="http://en.wikipedia.org/wiki/Floating-point_unit" rel="nofollow">FPUs</a>, but I wasn't sure because I thought fixed-point arithmetic usually stuck to base 10 or base 2.</p>

<p>Is anybody able to explain this operation? Is my suspicion correct?</p>

CC BY-SA 2.5
2011-01-15T01:18:12.720Z
This is not in-scope for this site. As Suresh says: 'This site is for research-level questions in theoretical computer science, that are likely to have short well-defined answers. "Research-level" means, roughly, questions that might be discussed between two professors, or between graduate students working on Ph.D.'s, but not usually between a professor and the typical undergraduate student.'
Mark Reitblatt
CC BY-SA 2.5
2011-01-15T02:39:35.140Z
A better place for this question is http://math.stackexchange.com.
Yuval Filmus
CC BY-SA 2.5
2011-01-15T06:06:57.473Z
This site is for **research-level questions** in **theoretical computer science**, that are likely to have short well-defined answers. "Research-level" means, roughly, questions that might be discussed between two professors, or between graduate students working on Ph.D.'s, but not usually between a professor and the typical undergraduate student. It does not include questions at the level of difficulty of undergraduate homework. You may want to try [Math.SE](http://math.stackexchange.com) or
[StackOverflow](http://www.stackoverflow.com). Voting to close as off-topic.
Kaveh
<tag-removed>
Getting Decimal Values From Whole Numbers - Is This Fixed-Point Arithmetic?
senfo
# Getting Decimal Values From Whole Numbers - Is This Fixed-Point Arithmetic?

(Asked by: username_0 on 2011-01-14)

I'm working with a device that allows remote updates via SNMP to change the FM input/ouput frequency of the device. When I query the devices, I get back whole numbers, but, in real life, FM frequencies have decimal values. I happened to stumble across some code for setting the frequency where the developer was taking decimal values (representing FM frequencies) and dividing them by 0.05 before saving them into the device. Inversely, for display purposes, the developer multiplied the numbers by 0.05 to turn them back into their decimal notation. For example:
107.1 / 0.05 = 2142
2142 * 0.05 = 107.1
There is no documentation that specifies the meaning of this operation. I thought it might be some kind of fixed-point arithmetic (popular before the days of FPUs, but I wasn't sure because I thought fixed-point arithmetic usually stuck to base 10 or base 2.
Is anybody able to explain this operation? Is my suspicion correct?

**Tags:** tag-removed
> **Comments:**
> **username_1**: This is not in-scope for this site. As Suresh says: 'This site is for research-level questions in theoretical computer science, that are likely to have short well-defined answers. "Research-level" means, roughly, questions that might be discussed between two professors, or between graduate students working on Ph.D.'s, but not usually between a professor and the typical undergraduate student.'  
> **username_2**: A better place for this question is http://math.stackexchange.com.  
> **username_3**: This site is for **research-level questions** in **theoretical computer science**, that are likely to have short well-defined answers. "Research-level" means, roughly, questions that might be discussed between two professors, or between graduate students working on Ph.D.'s, but not usually between a professor and the typical undergraduate student. It does not include questions at the level of difficulty of undergraduate homework. You may want to try [Math.SE](http://math.stackexchange.com) or [StackOverflow](http://www.stackoverflow.com). Voting to close as off-topic.  

---

## 1 answers

### Answer by username_2 on 2011-01-15. Score: 2

The operation is discretization to steps of size $0.05\mathrm{Hz}$. In other words, in the computer the values stored are in a new unit which is 20 times smaller than a Hertz.

This corresponds to decimal values after the dot of the forms $.X$ and $.X5$. So two steps correspond to a change in the first digit after the dot.

In fixed-point arithmetic, there is a base (usually base 2), and you take a fixed number of digits after the dot. This works (somewhat artificially) in this case if you use base 20.


---

