Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #25500 > unrolled thread

Arithmetic compression.

Started byjonas.thornvall@gmail.com
First post2014-07-21 13:26 -0700
Last post2015-05-07 05:32 -0700
Articles 20 on this page of 39 — 10 participants

Back to article view | Back to comp.lang.javascript


Contents

  Arithmetic compression. jonas.thornvall@gmail.com - 2014-07-21 13:26 -0700
    Re: Arithmetic compression. JJ <jj4public@vfemail.net> - 2014-07-22 05:01 +0700
      Re: Arithmetic compression. jonas.thornvall@gmail.com - 2014-07-21 15:44 -0700
        Re: Arithmetic compression. "J. Clarke" <jclarkeusenet@cox.net> - 2014-07-22 07:27 -0400
          Re: Arithmetic compression. jonas.thornvall@gmail.com - 2014-07-22 04:53 -0700
      Re: Arithmetic compression. jonas.thornvall@gmail.com - 2014-07-21 16:20 -0700
      Re: Arithmetic compression. jonas.thornvall@gmail.com - 2014-07-21 16:22 -0700
        Re: Arithmetic compression. jonas.thornvall@gmail.com - 2014-07-21 23:17 -0700
    Re: Arithmetic compression. John Harris <niam@jghnorth.org.uk.invalid> - 2014-07-22 09:07 +0100
      Re: Arithmetic compression. Stefan Weiss <krewecherl@gmail.com> - 2014-07-22 11:58 +0200
        Re: Arithmetic compression. jonas.thornvall@gmail.com - 2014-07-22 05:12 -0700
      Re: Arithmetic compression. jonas.thornvall@gmail.com - 2014-07-22 04:49 -0700
        Re: Arithmetic compression. John Harris <niam@jghnorth.org.uk.invalid> - 2014-07-22 15:53 +0100
          Re: Arithmetic compression. jonas.thornvall@gmail.com - 2014-07-22 08:17 -0700
            Re: Arithmetic compression. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-07-22 17:00 +0100
    Re: Arithmetic compression. Scott Sauyet <scott.sauyet@gmail.com> - 2014-07-22 08:08 -0700
      Re: Arithmetic compression. jonas.thornvall@gmail.com - 2014-07-22 08:29 -0700
        Re: Arithmetic compression. jonas.thornvall@gmail.com - 2014-07-22 08:48 -0700
        Re: Arithmetic compression. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-07-22 17:07 +0100
          Re: Arithmetic compression. jonas.thornvall@gmail.com - 2014-07-22 09:17 -0700
            Re: Arithmetic compression. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-07-22 17:24 +0100
              Re: Arithmetic compression. Stefan Weiss <krewecherl@gmail.com> - 2014-07-22 22:12 +0200
                Re: Arithmetic compression. jonas.thornvall@gmail.com - 2014-07-22 16:24 -0700
                Re: Arithmetic compression. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-07-23 00:39 +0100
          Re: Arithmetic compression. jonas.thornvall@gmail.com - 2014-07-22 09:25 -0700
            Re: Arithmetic compression. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-07-22 17:30 +0100
              Re: Arithmetic compression. jonas.thornvall@gmail.com - 2014-07-22 10:45 -0700
              Re: Arithmetic compression. Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-07-23 02:08 +0200
                Re: Arithmetic compression. Scott Sauyet <scott.sauyet@gmail.com> - 2014-07-22 17:20 -0700
                  Re: Arithmetic compression. jonas.thornvall@gmail.com - 2014-07-22 18:19 -0700
        Re: Arithmetic compression. Scott Sauyet <scott.sauyet@gmail.com> - 2014-07-22 11:11 -0700
          Re: Arithmetic compression. jonas.thornvall@gmail.com - 2014-07-22 11:56 -0700
          Re: Arithmetic compression. John Harris <niam@jghnorth.org.uk.invalid> - 2014-07-23 16:15 +0100
        Re: Arithmetic compression. Tim Streater <timstreater@greenbee.net> - 2014-07-22 19:14 +0100
          Re: Arithmetic compression. jonas.thornvall@gmail.com - 2014-07-22 11:57 -0700
            Re: Arithmetic compression. Tim Streater <timstreater@greenbee.net> - 2014-07-22 21:32 +0100
              Re: Arithmetic compression. jonas.thornvall@gmail.com - 2014-07-22 16:27 -0700
              Re: Arithmetic compression. jonas.thornvall@gmail.com - 2014-07-22 16:29 -0700
    Re: Arithmetic compression. Dave Brown <0ntariokingston@gmail.com> - 2015-05-07 05:32 -0700

Page 1 of 2  [1] 2  Next page →


#25500 — Arithmetic compression.

Fromjonas.thornvall@gmail.com
Date2014-07-21 13:26 -0700
SubjectArithmetic compression.
Message-ID<a75b8873-9178-4c08-96d1-b911f9ad9ba1@googlegroups.com>
Encoding binary numbers into base-2 zeroless encoding save digit places why isn't it used is there disadvantages doing arithmetic in zeroless bases? 27 = 1 1 0 1 1 = 2 2 1 1

The actual numbers in example is of course just symbols we could encode it to 1100? And with a bijective zeroless encoder decode it would still decode to 27.

I have a much stronger compressed encoding in mind, if is just implement it correct it will be mindblowing.. I hope this get thru i am not always that clear, presenting my problems.

[toc] | [next] | [standalone]


#25501

FromJJ <jj4public@vfemail.net>
Date2014-07-22 05:01 +0700
Message-ID<ovvtml1uz0t1.chpfsm2tqo39$.dlg@40tude.net>
In reply to#25500
On Mon, 21 Jul 2014 13:26:27 -0700 (PDT), jonas.thornvall@gmail.com wrote:
> Encoding binary numbers into base-2 zeroless encoding save digit places why isn't it used is there disadvantages doing arithmetic in zeroless bases? 27 = 1 1 0 1 1 = 2 2 1 1
> 
> The actual numbers in example is of course just symbols we could encode it to 1100? And with a bijective zeroless encoder decode it would still decode to 27.
> 
> I have a much stronger compressed encoding in mind, if is just implement it correct it will be mindblowing.. I hope this get thru i am not always that clear, presenting my problems.

Shouldn't that be: 1 1 0 1 1 = 2 2 1 2 2 ?

[toc] | [prev] | [next] | [standalone]


#25502

Fromjonas.thornvall@gmail.com
Date2014-07-21 15:44 -0700
Message-ID<0a07b248-1bfa-49bb-8cb1-ba0b11f6d2e0@googlegroups.com>
In reply to#25501
Den tisdagen den 22:e juli 2014 kl. 00:01:50 UTC+2 skrev JJ:
> On Mon, 21 Jul 2014 13:26:27 -0700 (PDT), jonas.thornvall@gmail.com wrote:
> 
> > Encoding binary numbers into base-2 zeroless encoding save digit places why isn't it used is there disadvantages doing arithmetic in zeroless bases? 27 = 1 1 0 1 1 = 2 2 1 1
> 
> > 
> 
> > The actual numbers in example is of course just symbols we could encode it to 1100? And with a bijective zeroless encoder decode it would still decode to 27.
> 
> > 
> 
> > I have a much stronger compressed encoding in mind, if is just implement it correct it will be mindblowing.. I hope this get thru i am not always that clear, presenting my problems.
> 
> 
> 
> Shouldn't that be: 1 1 0 1 1 = 2 2 1 2 2 ?

"2*8=16"+"2*4=8"+"1*2=2"+"1*1=1" no it seem correct?

[toc] | [prev] | [next] | [standalone]


#25508

From"J. Clarke" <jclarkeusenet@cox.net>
Date2014-07-22 07:27 -0400
Message-ID<MPG.2e3814b1a945fa3f98a7ff@news.newsguy.com>
In reply to#25502
In article <0a07b248-1bfa-49bb-8cb1-ba0b11f6d2e0@googlegroups.com>, 
jonas.thornvall@gmail.com says...
> 
> Den tisdagen den 22:e juli 2014 kl. 00:01:50 UTC+2 skrev JJ:
> > On Mon, 21 Jul 2014 13:26:27 -0700 (PDT), jonas.thornvall@gmail.com wrote:
> > 
> > > Encoding binary numbers into base-2 zeroless encoding save digit places why isn't it used is there disadvantages doing arithmetic in zeroless bases? 27 = 1 1 0 1 1 = 2 2 1 1
> > 
> > > 
> > 
> > > The actual numbers in example is of course just symbols we could encode it to 1100? And with a bijective zeroless encoder decode it would still decode to 27.
> > 
> > > 
> > 
> > > I have a much stronger compressed encoding in mind, if is just implement it correct it will be mindblowing.. I hope this get thru i am not always that clear, presenting my problems.
> > 
> > 
> > 
> > Shouldn't that be: 1 1 0 1 1 = 2 2 1 2 2 ?
> 
> "2*8=16"+"2*4=8"+"1*2=2"+"1*1=1" no it seem correct?

Then represent 26 in your system without using a zero.

[toc] | [prev] | [next] | [standalone]


#25510

Fromjonas.thornvall@gmail.com
Date2014-07-22 04:53 -0700
Message-ID<68638008-158d-477c-9115-b947c2e11ec3@googlegroups.com>
In reply to#25508
Den tisdagen den 22:e juli 2014 kl. 13:27:37 UTC+2 skrev J. Clarke:
> In article <0a07b248-1bfa-49bb-8cb1-ba0b11f6d2e0@googlegroups.com>, 
> 
> jonas.thornvall@gmail.com says...
> 
> > 
> 
> > Den tisdagen den 22:e juli 2014 kl. 00:01:50 UTC+2 skrev JJ:
> 
> > > On Mon, 21 Jul 2014 13:26:27 -0700 (PDT), jonas.thornvall@gmail.com wrote:
> 
> > > 
> 
> > > > Encoding binary numbers into base-2 zeroless encoding save digit places why isn't it used is there disadvantages doing arithmetic in zeroless bases? 27 = 1 1 0 1 1 = 2 2 1 1
> 
> > > 
> 
> > > > 
> 
> > > 
> 
> > > > The actual numbers in example is of course just symbols we could encode it to 1100? And with a bijective zeroless encoder decode it would still decode to 27.
> 
> > > 
> 
> > > > 
> 
> > > 
> 
> > > > I have a much stronger compressed encoding in mind, if is just implement it correct it will be mindblowing.. I hope this get thru i am not always that clear, presenting my problems.
> 
> > > 
> 
> > > 
> 
> > > 
> 
> > > Shouldn't that be: 1 1 0 1 1 = 2 2 1 2 2 ?
> 
> > 
> 
> > "2*8=16"+"2*4=8"+"1*2=2"+"1*1=1" no it seem correct?
> 
> 
> 
> Then represent 26 in your system without using a zero.

2122 = 2*8 + 1*4 + 2*2 + 1*2 = 26 
Please look at the script.

[toc] | [prev] | [next] | [standalone]


#25503

Fromjonas.thornvall@gmail.com
Date2014-07-21 16:20 -0700
Message-ID<fb415039-d55b-4a62-8bd5-03ca51ac6059@googlegroups.com>
In reply to#25501
Den tisdagen den 22:e juli 2014 kl. 00:01:50 UTC+2 skrev JJ:
> On Mon, 21 Jul 2014 13:26:27 -0700 (PDT), jonas.thornvall@gmail.com wrote:
> 
> > Encoding binary numbers into base-2 zeroless encoding save digit places why isn't it used is there disadvantages doing arithmetic in zeroless bases? 27 = 1 1 0 1 1 = 2 2 1 1
> 
> > 
> 
> > The actual numbers in example is of course just symbols we could encode it to 1100? And with a bijective zeroless encoder decode it would still decode to 27.
> 
> > 
> 
> > I have a much stronger compressed encoding in mind, if is just implement it correct it will be mindblowing.. I hope this get thru i am not always that clear, presenting my problems.
> 
> 
> 
> Shouldn't that be: 1 1 0 1 1 = 2 2 1 2 2 ?

Here there is still bit a small bug, its hard to wrap head around but i will fix it. But it work flawless for some bases. I have an upgrade in mind going directly to bijective not via other bases.

[toc] | [prev] | [next] | [standalone]


#25504

Fromjonas.thornvall@gmail.com
Date2014-07-21 16:22 -0700
Message-ID<a61a4daf-735a-4b3b-a5b2-c0a8c0bc32c0@googlegroups.com>
In reply to#25501
Den tisdagen den 22:e juli 2014 kl. 00:01:50 UTC+2 skrev JJ:
> On Mon, 21 Jul 2014 13:26:27 -0700 (PDT), jonas.thornvall@gmail.com wrote:
> 
> > Encoding binary numbers into base-2 zeroless encoding save digit places why isn't it used is there disadvantages doing arithmetic in zeroless bases? 27 = 1 1 0 1 1 = 2 2 1 1
> 
> > 
> 
> > The actual numbers in example is of course just symbols we could encode it to 1100? And with a bijective zeroless encoder decode it would still decode to 27.
> 
> > 
> 
> > I have a much stronger compressed encoding in mind, if is just implement it correct it will be mindblowing.. I hope this get thru i am not always that clear, presenting my problems.
> 
> 
> 
> Shouldn't that be: 1 1 0 1 1 = 2 2 1 2 2 ?

Here is a generic basechanger still a small bug, its hard to wrap head around but i will fix it. But it work flawless for some bases. I have an upgrade in mind going directly to bijective not via other bases.

http://web.comhem.se/jonasth/bijbase.html 

[toc] | [prev] | [next] | [standalone]


#25505

Fromjonas.thornvall@gmail.com
Date2014-07-21 23:17 -0700
Message-ID<15bb73f8-f7fb-4375-82b8-ecaab1e79708@googlegroups.com>
In reply to#25504
Den tisdagen den 22:e juli 2014 kl. 01:22:15 UTC+2 skrev jonas.t...@gmail.com:
> Den tisdagen den 22:e juli 2014 kl. 00:01:50 UTC+2 skrev JJ:
> 
> > On Mon, 21 Jul 2014 13:26:27 -0700 (PDT), jonas.thornvall@gmail.com wrote:
> 
> > 
> 
> > > Encoding binary numbers into base-2 zeroless encoding save digit places why isn't it used is there disadvantages doing arithmetic in zeroless bases? 27 = 1 1 0 1 1 = 2 2 1 1
> 
> > 
> 
> > > 
> 
> > 
> 
> > > The actual numbers in example is of course just symbols we could encode it to 1100? And with a bijective zeroless encoder decode it would still decode to 27.
> 
> > 
> 
> > > 
> 
> > 
> 
> > > I have a much stronger compressed encoding in mind, if is just implement it correct it will be mindblowing.. I hope this get thru i am not always that clear, presenting my problems.
> 
> > 
> 
> > 
> 
> > 
> 
> > Shouldn't that be: 1 1 0 1 1 = 2 2 1 2 2 ?
> 
> 
> 
> Here is a generic basechanger still a small bug, its hard to wrap head around but i will fix it. But it work flawless for some bases. I have an upgrade in mind going directly to bijective not via other bases.
> 
> 
> 
> http://web.comhem.se/jonasth/bijbase.html

<html>
<HEAD><TITLE>Base Conversion</TITLE></HEAD>


<body bgcolor="gold" onLoad="main();">
<form name="rad" onSubmit="main(); return false;">
<table border="2" bgcolor="marineblue" width=1000><tr><td colspan="3" align="left">
Base/Radix <input type="text" name="base" value="3" size="6"><input type=submit value="Update Base!"><BR>
(N)umber range<input type="text" name="numbstart" value="16" size="6"> - <input type="text" name="numbend" value="200" size="6">

</td></tr>
<tr>
  <th>Bijective Radix</th>
  <th>Standard Radix</th>
  <th>Standard 2nd Try</th>
</tr>
<tr><td colspan="1" align="left">
<textarea rows="80"  name="bijective">
</textarea>
</td>
<td colspan="1" align="left">
<textarea rows="80"  name="standard">
</textarea>
</td>
<td colspan="1" align="left">
<textarea rows="80"  name="standtwo">

</textarea>
</form>
</td></tr>
</table>
</body>
</html>
<script type="text/javascript">

function encbase(number, bas)
{
   basestr = "";
   basemultip = 1;
   digit = 0;
   unr = 0;
   while (basemultip < number)
   {
      basemultip = basemultip * bas;
      digit = digit + 1;
   }
   while (number > 0)
   {
      unr ++ ;
      set = 0;
      for(i = bas; i > 0; i -- )
      {
         subtrahend = basemultip * i;
         if (number >= subtrahend)
         {
            number = number - subtrahend;
            set = 1;
            basestr = basestr + i + " ";
         }
      }
      if(set == 0 && number != 0)basestr = basestr + 0 + " ";
      basemultip = basemultip / bas;
   }
   while (digit >= unr)
   {
      basestr = basestr + 0 + " ";
      unr ++ ;
   }
   return basestr;
}


function enctwo(number, bas)
{
   basestr = "";
   basemultip = 1;
   digit = 1;

   while (basemultip < number)
   {
      basemultip = basemultip * bas;
      digit = digit + 1;
   }

   while (number > 0 && digit > 0)
   {
      set = 0;
      i = 0;
      while (i * basemultip <= number && i < bas)
      {
         j = i;
         i ++ ;
         set = 1;
      }
      if (set == 1)
      {
         subtrahend = basemultip * j;
         number = number - subtrahend;
         basestr = basestr + j + " ";
      }
      //else if (set == 0 && number != 0)basestr = basestr + 0 + " ";
      else {basestr = basestr + 0 + " ";}
      basemultip = basemultip / bas;
      digit -- ;
   }
   while (digit > 0)
   {
      basestr = basestr + 0 + " ";
      digit -- ;
   }
   return basestr;
}



function bijenc(number, bas)
{
   counter=0;
   out = "";
   var digits = ("" + number).split("").reverse();
   length = digits.length;

   while (counter < length)
   {
      if (digits[counter] == 0)
      {
         out = bas + " " + out ;
         counter ++ ;
         while (digits[counter] == 0)
         {
            out = (bas - 1) + " " + out;
            counter ++ ;
         }
         if (digits[counter] > 1)
         {
            out = (digits[counter] - 1) + " " + out;
            counter ++ ;
         }
         else
         {
            counter ++ ;
            if(digits[counter] > 1)
            {
               out = bas + " " + out;
               out = digits[counter] - 1 + " " + out;
               counter ++ ;
            }
            else if(digits[counter] == 1)
            {
               while(digits[counter] == 1)
               {
                  out = bas + " " + out;
                  counter ++ ;
               }
            }
         }
      }
      else
      while (digits[counter] > 0)
      {
         out = (digits[counter]) + " " + out;
         counter ++ ;
      }
   }
   return out;
}

function main()
{
   dbase = document.rad.base.value;
   dstart = document.rad.numbstart.value;
   dend = document.rad.numbend.value;
   strout = "";
   strout2 = "";
   strout3 = "";
   for(x = dstart; x <= dend; x ++ )
   {
      strsave = encbase(x, dbase);
      str = strsave.replace(/\s+/g, '');
      str = parseInt(str, 10);
      strsave2 = bijenc(str, dbase);
      strsave = x + " = " + strsave;
      strsave2 = x + " = " + strsave2;
      strout2 = strout2 + "\n" + strsave2;
      strout = strout + "\n" + strsave;
      strsave3 = enctwo(x, dbase);
      strsave3 = x + " = " + strsave3;
      strout3 = strout3 + "\n" + strsave3;
   }
   document.rad.standard.value = strout;
   document.rad.bijective.value = strout2;
   document.rad.standtwo.value = strout3;
}
main();
</script>

[toc] | [prev] | [next] | [standalone]


#25506

FromJohn Harris <niam@jghnorth.org.uk.invalid>
Date2014-07-22 09:07 +0100
Message-ID<ip6ss9lb65075e7jg7ijtv3ti7jtm4a4l8@4ax.com>
In reply to#25500
On Mon, 21 Jul 2014 13:26:27 -0700 (PDT), jonas.thornvall@gmail.com
wrote:

>Encoding binary numbers into base-2 zeroless encoding save digit 
>places why isn't it used is there disadvantages doing arithmetic in 
>zeroless bases? 27 = 1 1 0 1 1 = 2 2 1 1
  <snip>

It's not used because transistors can represent 0 and 1 in a
non-analogue way. To represent 0, 1, and 2 you have to go analogue
with the resulting noise, drift, etc. problems.

In other words, binary is much more robust; greater than binary is
fragile or has to use more transistors to do the job.

  John

[toc] | [prev] | [next] | [standalone]


#25507

FromStefan Weiss <krewecherl@gmail.com>
Date2014-07-22 11:58 +0200
Message-ID<lqlck0$l2b$1@news.albasani.net>
In reply to#25506
On 2014-07-22 10:07, John Harris wrote:
> On Mon, 21 Jul 2014 13:26:27 -0700 (PDT), jonas.thornvall@gmail.com
> wrote:
> 
>>Encoding binary numbers into base-2 zeroless encoding save digit 
>>places why isn't it used is there disadvantages doing arithmetic in 
>>zeroless bases? 27 = 1 1 0 1 1 = 2 2 1 1
>   <snip>
> 
> It's not used because transistors can represent 0 and 1 in a
> non-analogue way. To represent 0, 1, and 2 you have to go analogue
> with the resulting noise, drift, etc. problems.

The bijective binary notation doesn't use zeros, only 1s and 2s.

> In other words, binary is much more robust; greater than binary is
> fragile or has to use more transistors to do the job.

Setun seemed to manage ternary just fine ;)

I guess one of the reason why the bijective notation isn't used for
digital calculations is that there is no obvious way to represent the
value 0 with on-off states.

- stefan

[toc] | [prev] | [next] | [standalone]


#25512

Fromjonas.thornvall@gmail.com
Date2014-07-22 05:12 -0700
Message-ID<428013ca-346c-4791-bb5d-f12a22ebfc6d@googlegroups.com>
In reply to#25507
Den tisdagen den 22:e juli 2014 kl. 11:58:24 UTC+2 skrev Stefan Weiss:
> On 2014-07-22 10:07, John Harris wrote:
> 
> > On Mon, 21 Jul 2014 13:26:27 -0700 (PDT), jonas.thornvall@gmail.com
> 
> > wrote:
> 
> > 
> 
> >>Encoding binary numbers into base-2 zeroless encoding save digit 
> 
> >>places why isn't it used is there disadvantages doing arithmetic in 
> 
> >>zeroless bases? 27 = 1 1 0 1 1 = 2 2 1 1
> 
> >   <snip>
> 
> > 
> 
> > It's not used because transistors can represent 0 and 1 in a
> 
> > non-analogue way. To represent 0, 1, and 2 you have to go analogue
> 
> > with the resulting noise, drift, etc. problems.
> 
> 
> 
> The bijective binary notation doesn't use zeros, only 1s and 2s.
> 
> 
> 
> > In other words, binary is much more robust; greater than binary is
> 
> > fragile or has to use more transistors to do the job.
> 
> 
> 
> Setun seemed to manage ternary just fine ;)
> 
> 
> 
> I guess one of the reason why the bijective notation isn't used for
> 
> digital calculations is that there is no obvious way to represent the
> 
> value 0 with on-off states.
> 
> 
> 
> - stefan

The chosen symbols is just a technicality, of course it would be encoded 2211 would be encoded 1100 or“-> 0011 it is the encoding / decoding circuit that makes the difference.

[toc] | [prev] | [next] | [standalone]


#25509

Fromjonas.thornvall@gmail.com
Date2014-07-22 04:49 -0700
Message-ID<3fe25ec2-a1a9-4adc-a837-82a476276c19@googlegroups.com>
In reply to#25506
Den tisdagen den 22:e juli 2014 kl. 10:07:10 UTC+2 skrev John Harris:
> On Mon, 21 Jul 2014 13:26:27 -0700 (PDT), jonas.thornvall@gmail.com
> 
> wrote:
> 
> 
> 
> >Encoding binary numbers into base-2 zeroless encoding save digit 
> 
> >places why isn't it used is there disadvantages doing arithmetic in 
> 
> >zeroless bases? 27 = 1 1 0 1 1 = 2 2 1 1
> 
>   <snip>
> 
> 
> 
> It's not used because transistors can represent 0 and 1 in a
> 
> non-analogue way. To represent 0, 1, and 2 you have to go analogue
> 
> with the resulting noise, drift, etc. problems.
> 
> 
> 
> In other words, binary is much more robust; greater than binary is
> 
> fragile or has to use more transistors to do the job.
> 
> 
> 
>   John

I think either you or I missed the point John, 2211 is only a representational technicality. In reality you would store it as 1100 or 0011, both systems 2-radix not three, they only use two symbols it is the encoding circuit decoding circuit that makes the difference.

[toc] | [prev] | [next] | [standalone]


#25514

FromJohn Harris <niam@jghnorth.org.uk.invalid>
Date2014-07-22 15:53 +0100
Message-ID<oluss95gskoe8r2rpuvpcflnphr7rmeesp@4ax.com>
In reply to#25509
On Tue, 22 Jul 2014 04:49:55 -0700 (PDT), jonas.thornvall@gmail.com
wrote:

>Den tisdagen den 22:e juli 2014 kl. 10:07:10 UTC+2 skrev John Harris:
>> On Mon, 21 Jul 2014 13:26:27 -0700 (PDT), jonas.thornvall@gmail.com
>> 
>> wrote:
>> 
>> 
>> 
>> >Encoding binary numbers into base-2 zeroless encoding save digit 
>> 
>> >places why isn't it used is there disadvantages doing arithmetic in 
>> 
>> >zeroless bases? 27 = 1 1 0 1 1 = 2 2 1 1
>> 
>>   <snip>
>> 
>> 
>> 
>> It's not used because transistors can represent 0 and 1 in a
>> 
>> non-analogue way. To represent 0, 1, and 2 you have to go analogue
>> 
>> with the resulting noise, drift, etc. problems.
>> 
>> 
>> 
>> In other words, binary is much more robust; greater than binary is
>> 
>> fragile or has to use more transistors to do the job.
>> 
>> 
>> 
>>   John
>
>I think either you or I missed the point John, 2211 is only a 
>representational technicality. In reality you would store it 
>as 1100 or 0011, both systems 2-radix not three, they only use 
>two symbols it is the encoding circuit decoding circuit that makes 
>the difference.

Except there's two problems.

One is that zero is a number that is used quite often in computing.

The other is that to represent zero you need to have a way of marking
the beginning and end of the string of digits. Help! Variable length
numbers : you'll have trouble building a fast adder unit. And how easy
is it to make RAM chips that can respond to different ranges of
addresses (first Mb, second Mb, etc.) when the addresses have
different lengths. 

  John

[toc] | [prev] | [next] | [standalone]


#25516

Fromjonas.thornvall@gmail.com
Date2014-07-22 08:17 -0700
Message-ID<2367f462-c611-45e1-8b73-7582c5c80e73@googlegroups.com>
In reply to#25514
Den tisdagen den 22:e juli 2014 kl. 16:53:16 UTC+2 skrev John Harris:
> On Tue, 22 Jul 2014 04:49:55 -0700 (PDT), jonas.thornvall@gmail.com
> 
> wrote:
> 
> 
> 
> >Den tisdagen den 22:e juli 2014 kl. 10:07:10 UTC+2 skrev John Harris:
> 
> >> On Mon, 21 Jul 2014 13:26:27 -0700 (PDT), jonas.thornvall@gmail.com
> 
> >> 
> 
> >> wrote:
> 
> >> 
> 
> >> 
> 
> >> 
> 
> >> >Encoding binary numbers into base-2 zeroless encoding save digit 
> 
> >> 
> 
> >> >places why isn't it used is there disadvantages doing arithmetic in 
> 
> >> 
> 
> >> >zeroless bases? 27 = 1 1 0 1 1 = 2 2 1 1
> 
> >> 
> 
> >>   <snip>
> 
> >> 
> 
> >> 
> 
> >> 
> 
> >> It's not used because transistors can represent 0 and 1 in a
> 
> >> 
> 
> >> non-analogue way. To represent 0, 1, and 2 you have to go analogue
> 
> >> 
> 
> >> with the resulting noise, drift, etc. problems.
> 
> >> 
> 
> >> 
> 
> >> 
> 
> >> In other words, binary is much more robust; greater than binary is
> 
> >> 
> 
> >> fragile or has to use more transistors to do the job.
> 
> >> 
> 
> >> 
> 
> >> 
> 
> >>   John
> 
> >
> 
> >I think either you or I missed the point John, 2211 is only a 
> 
> >representational technicality. In reality you would store it 
> 
> >as 1100 or 0011, both systems 2-radix not three, they only use 
> 
> >two symbols it is the encoding circuit decoding circuit that makes 
> 
> >the difference.
> 
> 
> 
> Except there's two problems.
> 
> 
> 
> One is that zero is a number that is used quite often in computing.
> 
Well i have written interpreators that did just fine without 0, basicly small program language kernel.
> 
> The other is that to represent zero you need to have a way of marking
> 
> the beginning and end of the string of digits. Help! Variable length
> 
> numbers : you'll have trouble building a fast adder unit. And how easy
> 
> is it to make RAM chips that can respond to different ranges of
> 
> addresses (first Mb, second Mb, etc.) when the addresses have
> 
> different lengths. 
> 
Well as i said my script above is a simple bijective zeroless encoder, only save a bit. But my other idea create far more compression, in compression ratio for any string is 1/3 first round.



>   John

[toc] | [prev] | [next] | [standalone]


#25519

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2014-07-22 17:00 +0100
Message-ID<0.c70fb03a635c2ef254a2.20140722170052BST.87ha294c3v.fsf@bsb.me.uk>
In reply to#25516
jonas.thornvall@gmail.com writes:
<snip>
> ... But my other idea create far more compression, in
> compression ratio for any string is 1/3 first round.

You know, I hope, that that is not possible for any useful meaning of
the word "compression".

-- 
Ben.

[toc] | [prev] | [next] | [standalone]


#25515

FromScott Sauyet <scott.sauyet@gmail.com>
Date2014-07-22 08:08 -0700
Message-ID<7c6f232a-4bfb-41c6-b455-c972b64103f0@googlegroups.com>
In reply to#25500
jonas.thornvall@gmail.com wrote:
> Encoding binary numbers into base-2 zeroless encoding save digit places 
> why isn't it used is there disadvantages doing arithmetic in zeroless
> bases? 27 = 1 1 0 1 1 = 2 2 1 1 [ ... ]

For those who weren't paying attention, Jonas was discussing implementations of this idea in the "Bijective Basechanger" thread:  

    <news:e8847026-67f9-417c-9166-d1368bb9a704@googlegroups.com>
    <https://groups.google.com/forum/#!topic/comp.lang.javascript/cBXp-b7oO7E>

I eventually suggested this implementation:

    var zeroless = function(nbr, base) {
      if (!nbr || nbr === 0) {return "";}
      if (!base) {base = 10;}
      var str = "" + nbr.toString(base); 
      var lastChar = str.slice(-1); 
      var beginning = str.slice(0, -1); 
      return lastChar === "0" ? 
        zeroless(parseInt(beginning, base) - 1, base) + 
               (base).toString(base + 1).toUpperCase() : 
        zeroless(parseInt(beginning, base), base) + lastChar;
    };

Then, for instance,

    zeroless(27, 2); //=> "2211"
    zeroless(2014, 10); //=> "1A14"
    zeroless(18, 3); //=> "123"

It's a way to express a number different from the normal place-based digit system for a base.  Instead of using the place-based digits of 

    0, 1, 2, ... (base - 1)

he uses

    1, 2, 3, ... base

These seem to be well-formed, in the sense that for a given base, there is an unambiguous encoding of every positive integer.  (I haven't checked that every string of these digits actually represents a number.)  I really don't understand what it's for, though or what advantage Jonas is seeing for it.  I'd like to hear if there are some.

  -- Scott

[toc] | [prev] | [next] | [standalone]


#25517

Fromjonas.thornvall@gmail.com
Date2014-07-22 08:29 -0700
Message-ID<43970baf-66ab-4fd7-9ac0-71906a1f05f2@googlegroups.com>
In reply to#25515
Den tisdagen den 22:e juli 2014 kl. 17:08:59 UTC+2 skrev Scott Sauyet:
> jonas.thornvall@gmail.com wrote:
> 
> > Encoding binary numbers into base-2 zeroless encoding save digit places 
> 
> > why isn't it used is there disadvantages doing arithmetic in zeroless
> 
> > bases? 27 = 1 1 0 1 1 = 2 2 1 1 [ ... ]
> 
> 
> 
> For those who weren't paying attention, Jonas was discussing implementations of this idea in the "Bijective Basechanger" thread:  
> 
> 
> 
>     <news:e8847026-67f9-417c-9166-d1368bb9a704@googlegroups.com>
> 
>     <https://groups.google.com/forum/#!topic/comp.lang.javascript/cBXp-b7oO7E>
> 
> 
> 
> I eventually suggested this implementation:
> 
> 
> 
>     var zeroless = function(nbr, base) {
> 
>       if (!nbr || nbr === 0) {return "";}
> 
>       if (!base) {base = 10;}
> 
>       var str = "" + nbr.toString(base); 
> 
>       var lastChar = str.slice(-1); 
> 
>       var beginning = str.slice(0, -1); 
> 
>       return lastChar === "0" ? 
> 
>         zeroless(parseInt(beginning, base) - 1, base) + 
> 
>                (base).toString(base + 1).toUpperCase() : 
> 
>         zeroless(parseInt(beginning, base), base) + lastChar;
> 
>     };
> 
> 
> 
> Then, for instance,
> 
> 
> 
>     zeroless(27, 2); //=> "2211"
> 
>     zeroless(2014, 10); //=> "1A14"
> 
>     zeroless(18, 3); //=> "123"
> 
> 
> 
> It's a way to express a number different from the normal place-based digit system for a base.  Instead of using the place-based digits of 
> 
> 
> 
>     0, 1, 2, ... (base - 1)
> 
> 
> 
> he uses
> 
> 
> 
>     1, 2, 3, ... base
> 
> 
> 
> These seem to be well-formed, in the sense that for a given base, there is an unambiguous encoding of every positive integer.  (I haven't checked that every string of these digits actually represents a number.)  I really don't understand what it's for, though or what advantage Jonas is seeing for it.  I'd like to hear if there are some.
> 
> 
> 
>   -- Scott
As you noted Scott zeroless bases encode numbers ***any binary string*** 1 digit shorter then their binary counterparts, but i will and ***have written*** program emulating more complex encoding circuits using zeroless bijective properties, that will encode as much as 1/3 of any random data. 

And if you were an electronic engineer Scott you could help me develop a schematic for a circuit creating arithmetic compression and if we would file that for a patent and we both would be wealthy beyond comprehension because it would be used in every electronic gadget you could think of.

But actually i did take it further i built an own arithmetic around it basicly emulating a ternary computer.

But the compression alone would make us wealthy beyond comprehension, because there woul not be a single transmission over internet not using the ciruit. Not a television broadcast.

And basicly we would change math also forever, so there is strong interest who would like to stop this coming from the math community side. They would even despice us for trying.

[toc] | [prev] | [next] | [standalone]


#25518

Fromjonas.thornvall@gmail.com
Date2014-07-22 08:48 -0700
Message-ID<29994e65-cae5-4721-9afb-8fd4f6d1913a@googlegroups.com>
In reply to#25517
Den tisdagen den 22:e juli 2014 kl. 17:29:35 UTC+2 skrev jonas.t...@gmail.com:
> Den tisdagen den 22:e juli 2014 kl. 17:08:59 UTC+2 skrev Scott Sauyet:
> 
> > jonas.thornvall@gmail.com wrote:
> 
> > 
> 
> > > Encoding binary numbers into base-2 zeroless encoding save digit places 
> 
> > 
> 
> > > why isn't it used is there disadvantages doing arithmetic in zeroless
> 
> > 
> 
> > > bases? 27 = 1 1 0 1 1 = 2 2 1 1 [ ... ]
> 
> > 
> 
> > 
> 
> > 
> 
> > For those who weren't paying attention, Jonas was discussing implementations of this idea in the "Bijective Basechanger" thread:  
> 
> > 
> 
> > 
> 
> > 
> 
> >     <news:e8847026-67f9-417c-9166-d1368bb9a704@googlegroups.com>
> 
> > 
> 
> >     <https://groups.google.com/forum/#!topic/comp.lang.javascript/cBXp-b7oO7E>
> 
> > 
> 
> > 
> 
> > 
> 
> > I eventually suggested this implementation:
> 
> > 
> 
> > 
> 
> > 
> 
> >     var zeroless = function(nbr, base) {
> 
> > 
> 
> >       if (!nbr || nbr === 0) {return "";}
> 
> > 
> 
> >       if (!base) {base = 10;}
> 
> > 
> 
> >       var str = "" + nbr.toString(base); 
> 
> > 
> 
> >       var lastChar = str.slice(-1); 
> 
> > 
> 
> >       var beginning = str.slice(0, -1); 
> 
> > 
> 
> >       return lastChar === "0" ? 
> 
> > 
> 
> >         zeroless(parseInt(beginning, base) - 1, base) + 
> 
> > 
> 
> >                (base).toString(base + 1).toUpperCase() : 
> 
> > 
> 
> >         zeroless(parseInt(beginning, base), base) + lastChar;
> 
> > 
> 
> >     };
> 
> > 
> 
> > 
> 
> > 
> 
> > Then, for instance,
> 
> > 
> 
> > 
> 
> > 
> 
> >     zeroless(27, 2); //=> "2211"
> 
> > 
> 
> >     zeroless(2014, 10); //=> "1A14"
> 
> > 
> 
> >     zeroless(18, 3); //=> "123"
> 
> > 
> 
> > 
> 
> > 
> 
> > It's a way to express a number different from the normal place-based digit system for a base.  Instead of using the place-based digits of 
> 
> > 
> 
> > 
> 
> > 
> 
> >     0, 1, 2, ... (base - 1)
> 
> > 
> 
> > 
> 
> > 
> 
> > he uses
> 
> > 
> 
> > 
> 
> > 
> 
> >     1, 2, 3, ... base
> 
> > 
> 
> > 
> 
> > 
> 
> > These seem to be well-formed, in the sense that for a given base, there is an unambiguous encoding of every positive integer.  (I haven't checked that every string of these digits actually represents a number.)  I really don't understand what it's for, though or what advantage Jonas is seeing for it.  I'd like to hear if there are some.
> 
> > 
> 
> > 
> 
> > 
> 
> >   -- Scott
> 
> As you noted Scott zeroless bases encode numbers ***any binary string*** 1 digit shorter then their binary counterparts, but i will and ***have written*** program emulating more complex encoding circuits using zeroless bijective properties, that will encode as much as 1/3 of any random data. 
> 
> 
> 
> And if you were an electronic engineer Scott you could help me develop a schematic for a circuit creating arithmetic compression and if we would file that for a patent and we both would be wealthy beyond comprehension because it would be used in every electronic gadget you could think of.
> 
> 
> 
> But actually i did take it further i built an own arithmetic around it basicly emulating a ternary computer.
> 
> 
> 
> But the compression alone would make us wealthy beyond comprehension, because there woul not be a single transmission over internet not using the ciruit. Not a television broadcast.
> 
> 
> 
> And basicly we would change math also forever, so there is strong interest who would like to stop this coming from the math community side. They would even despice us for trying.

Alternatively they would steal the idea, present it as their own and pretend it was based on standard arithmetic.

[toc] | [prev] | [next] | [standalone]


#25520

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2014-07-22 17:07 +0100
Message-ID<0.e7321cc5d05864a0436e.20140722170706BST.87bnsh4bth.fsf@bsb.me.uk>
In reply to#25517
jonas.thornvall@gmail.com writes:
<snip>
> But the compression alone would make us wealthy beyond comprehension,
> because there woul not be a single transmission over internet not
> using the ciruit. Not a television broadcast.
>
> And basicly we would change math also forever, so there is strong
> interest who would like to stop this coming from the math community
> side. They would even despice us for trying.

Sorry.  I replied before reading this.  I know how this one goes: no one
can persuade you that you are wrong, but because it is so valuable, you
can't show anyone the code.  There's a built-in stalemate to these
situations.

-- 
Ben.

[toc] | [prev] | [next] | [standalone]


#25521

Fromjonas.thornvall@gmail.com
Date2014-07-22 09:17 -0700
Message-ID<21b66ed7-8902-45d7-a126-bea98915f855@googlegroups.com>
In reply to#25520
Den tisdagen den 22:e juli 2014 kl. 18:07:06 UTC+2 skrev Ben Bacarisse:
> jonas.thornvall@gmail.com writes:
> 
> <snip>
> 
> > But the compression alone would make us wealthy beyond comprehension,
> 
> > because there woul not be a single transmission over internet not
> 
> > using the ciruit. Not a television broadcast.
> 
> >
> 
> > And basicly we would change math also forever, so there is strong
> 
> > interest who would like to stop this coming from the math community
> 
> > side. They would even despice us for trying.
> 
> 
> 
> Sorry.  I replied before reading this.  I know how this one goes: no one
> 
> can persuade you that you are wrong, but because it is so valuable, you
> 
> can't show anyone the code.  There's a built-in stalemate to these
> 
> situations.
> 
> 
> 
> -- 
> 
> Ben.

Well i actually studied computer science and this is already implemented, and as i said already in use, but it is not commodity you and i can go purchase.

It has quite other purposes, but i was the one developing it. And those sitting on the idea will not go for the patent, they want a closed group of peers to use it.

They probably feel smart about it.

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.lang.javascript


csiph-web