To install click the Add extension button. That's it.

The source code for the WIKI 2 extension is being checked by specialists of the Mozilla Foundation, Google, and Apple. You could also do it yourself at any point in time.

4,5
Kelly Slayton
Congratulations on this excellent venture… what a great idea!
Alexander Grigorievskiy
I use WIKI 2 every day and almost forgot how the original Wikipedia looks like.
Live Statistics
English Articles
Improved in 24 Hours
Added in 24 Hours
What we do. Every page goes through several hundred of perfecting techniques; in live mode. Quite the same Wikipedia. Just better.
.
Leo
Newton
Brights
Milds

Binary angular measurement

From Wikipedia, the free encyclopedia

Binary angular measurement (BAM)[1] (and the binary angular measurement system, BAMS[2]) is a measure of angles using binary numbers and fixed-point arithmetic, in which a half turn is represented by the value 1. The unit of angular measure used in those methods may be called binary radian (brad) or binary degree.

These representation of angles are often used in numerical control and digital signal processing applications, such as robotics, navigation,[3] computer games,[4] and digital sensors.[5] On the other hand, this system is not adequate for situations where the number of full turns must be measured, e.g. to monitor the rotation of vehicle wheels or of leadscrews.

Binary angle measurement system. Black is traditional degrees representation, green is a BAM as a decimal number and red is hexadecimal 32-bit BAM. In this figure the 32-bit binary integers are interpreted as signed binary fixed-point values with scaling factor 2−31, representing fractions between −1.0 (inclusive) and +1.0 (exclusive).

YouTube Encyclopedic

  • 1/3
    Views:
    6 628
    1 684 112
    12 875
  • Angular Measurements and Pi
  • What are Radians? | Radian (Unit of Plane Angle) | Don't Memorise
  • Sexagesimal System of Angle Measurement |Trigonometry | Math Dot Com

Transcription

Representation

Unsigned fraction of turn

In this system, an angle is represented by an n-bit unsigned binary number in the sequence 0, ..., 2n−1 that is interpreted as a multiple of 1/2n of a full turn; that is, 360/2n degrees or 2π/2n 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/2n. Multiplying that fraction by 360° or 2π gives the angle in degrees in the range 0 to 360, or in radians, in the range 0 to 2π, respectively.

For example, with n = 8, the binary integers (00000000)2 (fraction 0.00), (01000000)2 (0.25), (10000000)2 (0.50), and (11000000)2 (0.75) represent the angular measures 0°, 90°, 180°, and 270°, respectively.

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 modulo 2n, 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).[6]

Signed fraction of turn

Alternatively, the same n bits can also be interpreted as a signed integer in the range −2n−1, ..., 2n−1−1 in the two's complement convention. They can also be interpreted as a fraction of a full turn between −0.5 (inclusive) and +0.5 (exclusive) in signed fixed-point format, with the same scaling factor; or a fraction of half-turn between −1.0 (inclusive) and +1.0 (exclusive) with scaling factor 1/2n−1.

Either way, these numbers can then be interpreted as angles between −180° (inclusive) and +180° (exclusive), with −0.25 meaning −90° and +0.25 meaning +90°. The result of adding or subtracting the numerical values will have the same sign as the result of adding or subtracting angles, once reduced to this range. This interpretation eliminates the need to reduce angles to the range [−π, +π] when computing trigonometric functions.

See also

References

  1. ^ "Binary angular measurement". Archived from the original on 2009-12-21.
  2. ^ "Binary Angular Measurement System". acronyms.thefreedictionary.
  3. ^ LaPlante, Phillip A. (2004). "Chapter 7.5.3, Binary Angular Measure". Real-Time Systems Design and Analysis. {{cite book}}: |website= ignored (help)
  4. ^ Sanglard, Fabien (2010-01-13). "Doom 1993 code review - Section "Walls"". fabiensanglard.net.
  5. ^ "Hitachi HM55B Compass Module (#29123)" (PDF). www.hobbyengineering.com. Parallax Digital Compass Sensor (#29123). Parallax, Inc. May 2005. Archived from the original (PDF) on 2011-07-11 – via www.parallax.com.
  6. ^ Hargreaves, Shawn [in Polish]. "Angles, integers, and modulo arithmetic". blogs.msdn.com. Archived from the original on 2019-06-30. Retrieved 2019-08-05.
This page was last edited on 27 February 2024, at 21:57
Basis of this page is in Wikipedia. Text is available under the CC BY-SA 3.0 Unported License. Non-text media are available under their specified licenses. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. WIKI 2 is an independent company and has no affiliation with Wikimedia Foundation.