Binary scaling: Difference between revisions

Content deleted Content added
Nehwyn (talk | contribs)
No edit summary
+rcat
 
(168 intermediate revisions by 85 users not shown)
Line 1:
#REDIRECT [[Fixed-point arithmetic#Binary scaling]] {{R from merge}} {{R to section}} {{R with possibilities}}
{{wfy}}
 
Binary scaling is a technique used mainly by embedded C, DSP and assembler programmers to
perform a psuedo floating point using integer arithmetic.
 
A position for the virtual binary point is taken, and then subsequent arithetic operations
determine the resultants binary point.
 
This obeys the mathematical laws of [[indices]].
 
To give an example, a common way to use integer maths to simulate floating point
is to nmultiply the co-effiecents by 65536.
 
This will place the binary point at B16.
 
For instance to represent 1.2 and 5.6 floating point real numbers as B16 one multiplies them by 2 ^ 16
giving...