From 04f9b735133eca24c639f012dfadf79f427db8a9 Mon Sep 17 00:00:00 2001 From: Michaelangel007 Date: Sun, 11 Jun 2017 07:53:26 -0700 Subject: [PATCH] Cleanup fract-to-decimal conversion (again) --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a99fb0d..8fa4bde 100644 --- a/README.md +++ b/README.md @@ -18,18 +18,20 @@ Given a fractional number `N` represented as 16-bit integer then: Example: ``` - 0.7106 * 65536 = $B5E9 - '.' + +-----------------------------+ + | | + 0.7106 * 65536 = $B5E9 | + | | + | v + v '.' $B5E9 * $A = $7.1B1A $1B1A * $A = $1.0F04 $0F04 * $A = $0.9628 $9628 * $A = $5.DD90 $5DD9 * $A = $8.A7A0 - - 0.71058 _______________________^ ``` -An optimization for N*10 is that this is equivalent to: `N*8 + N*2` +An optimization for `N*10` is that this is equivalent to: `N*8 + N*2` # Application