(SR52) BinarytoDecimal conversion

06172022, 10:38 PM
(This post was last modified: 08202022 11:48 AM by pauln.)
Post: #6




RE: (SR52) BinarytoDecimal conversion
Another way of looking at this method is to notice that it transforms the value in register 0 from:
\(a_0 + a_1 \cdot 10 + \cdots + a_n \cdot 10^n\) into \(a_0 + a_1 \cdot 2 + \cdots + a_n \cdot 2^n\) To do so, it transforms \(10^k\) into \(2^k\) using the following general identity: \(a^k  b^k = (a  b)(a^{k1} + a^{k2} \cdot b + \cdots + b^{k1})\) Applied to a = 10 and b = 2, we get: \(10^k  2^k = 8 \cdot (10^{k1} + 10^{k2} \cdot 2 + \cdots + 2^{k1})\) This explains the 8 at the beginning of the program as well as the values in register 2 (initially 8 and then 16, 32, 64, ...). 

« Next Oldest  Next Newest »

Messages In This Thread 
(SR52) BinarytoDecimal conversion  SlideRule  01172020, 04:49 PM
RE: (SR52) BinarytoDecimal conversion  Thomas Klemm  06162022, 06:54 AM
RE: (SR52) BinarytoDecimal conversion  pauln  06172022, 12:47 AM
RE: (SR52) BinarytoDecimal conversion  Thomas Klemm  06172022, 06:48 AM
RE: (SR52) BinarytoDecimal conversion  Thomas Klemm  06172022, 07:37 AM
RE: (SR52) BinarytoDecimal conversion  pauln  06172022 10:38 PM
RE: (SR52) BinarytoDecimal conversion  Thomas Klemm  06182022, 05:23 AM
RE: (SR52) BinarytoDecimal conversion  pauln  06182022, 05:36 AM

User(s) browsing this thread: 1 Guest(s)