Content deleted Content added
{{cn}} for unit names |
rm mention of "binary radian" or "brad": only isolated unreliable sources seem to mention it, so it appears to be the invention of one or two isolated SW developers |
||
(One intermediate revision by the same user not shown) | |||
Line 1:
{{Use dmy dates|date=December 2022|cs1-dates=y}}
{{Use list-defined references|date=December 2022}}
'''Binary angular measurement''' ('''BAM''')<ref name="ship"/> (and the '''binary angular measurement system''', '''BAMS'''<ref name="BAMS"/>) is a measure of [[angle]]s using [[binary number]]s and [[fixed-point arithmetic]], in which a full [[turn (angle)|turn]] is represented by the value 1.
These representation of angles are often used in [[numerical control]] and [[digital signal processing]] applications, such as robotics, navigation,<ref name="lap2004"/> computer games,<ref name="sang1993"/> and digital sensors,<ref name="para2005"/> taking advantage of the implicit modular reduction achieved by truncating binary numbers. It may also be used as the [[fractional part]] of a [[fixed-point number]] counting the number of full rotations of e.g. a vehicle's wheels or a [[leadscrew]].
Line 9:
In this system, an angle is represented by an ''n''-[[bit]] unsigned binary number in the sequence 0, ..., 2<sup>''n''</sup>−1 that is interpreted as a multiple of 1/2<sup>''n''</sup> of a full turn; that is, 360/2<sup>''n''</sup> degrees or 2π/2<sup>''n''</sup> radians. The number can also be interpreted as a fraction of a full turn between 0 (inclusive) and 1 (exclusive) represented in binary fixed-point format with a scaling factor of 1/2<sup>''n''</sup>. Multiplying that fraction by 360° or 2π gives the angle in [[degree (angle)|degree]]s in the range 0 to 360, or in [[radian]]s, in the range 0 to 2π, respectively.
For example, with ''n'' = 8, the binary integers
The main advantage of this system is that the addition or subtraction of the integer numeric values with the ''n''-bit arithmetic used in most computers produces results that are consistent with the geometry of angles. Namely, the integer result of the operation is automatically reduced [[modular arithmetic|modulo]] 2<sup>''n''</sup>, matching the fact that angles that differ by an integer number of full turns are equivalent. Thus one does not need to explicitly test or handle the wrap-around, as one must do when using other representations (such as number of degrees or radians in floating-point).<ref name="harg2019"/>
|