DSPRelated.com
Forums

IIR implementation on ARM

Started by luminous March 9, 2011
robert bristow-johnson <rbj@audioimagination.com> wrote:

(snip on ENIAC)
>> (snip)
>> Before EINIAC, mechanical calculators with decimal wheels were >> very popular.
> i think they were called "adding machines", no?
The one I was thinking of is the Monroe calculator, which can add, subtract, multiply (shift and add), and divide (shift, subtract, repeat). The wikipedia page Monroe_Calculator_Company describes it. There were also Marchant and Fridden mechanical calculators were around about the same time. They are either hand cranked or powered by an electric motor.
> i remember my parents using this adding machine and cranking out paper > tape for all this stuff. i remember negative numbers were printed in > red and the ink ribbon had to have two colors (red and black).
No paper or printer on the ones I remember. -- glen
On Thursday, March 31, 2011 2:02:19 AM UTC-4, glen herrmannsfeldt wrote:
> robert bristow-johnson <r...@audioimagination.com> wrote:
...
> > i think they were called "adding machines", no? >=20 > The one I was thinking of is the Monroe calculator, which can > add, subtract, multiply (shift and add), and divide (shift,=20 > subtract, repeat). The wikipedia page Monroe_Calculator_Company > describes it. There were also Marchant and Fridden mechanical > calculators were around about the same time. They are either hand > cranked or powered by an electric motor.
There was a nifty pocket-size calculator called a Curta, still available as= a collector's item. These Calculators not only multiplied and divided, but= could extract roots. During WWII, banks of Marchants were used by women to= calculate trajectory tables for howitzers and other artillery. The womwn w= ere known as calculators. (My late wife was one. After the war, she was hir= ed by Marchand to demonstrate their machines and to tutor new customers.) h= ttp://physicistfeminist.wordpress.com/2011/02/20/documentary-top-secret-ros= ies/ Jerry --=20 Engineering is the art of making what you want from things you can get.
On 2011/03/30 15:03, Jerry Avins wrote:
> On Wednesday, March 30, 2011 12:05:47 AM UTC-4, Brian Willoughby wrote: >> On 2011/03/29 12:10, glen herrmannsfeldt wrote: >>> Jerry Avins<j...@ieee.org> wrote: >>> >>>> I don't know what you mean by the sign bit "bleeding down" in >>>> two's complement. >>> >>> I believe it is a different way of looking at the usual >>> twos-complement sign extension. (The MC6809 is the only one I >>> know that does sign extension with the SEX instruction.) >> >> What I was referring to can be explained as follows: When examining a >> positive number where there are fewer significant bits than the word >> size will hold, you can clearly see that there are leading zeroes until >> the first most significant bit. > > I see leading sign bits.
But that's not the only valid interpretation, certainly not with the precedent of leading zeroes in the typical school-taught long-hand math.
>> This corresponds intuitively to the >> pencil and paper world where we can see the (lack of) effect of leading >> zeroes on decimal numbers. When examining a negative two's complement >> number with fewer significant bits than the word size will hold, you >> instead see leading ones instead of leading zeroes. > > I see leading sign bits.
Well, in this case, that's the only valid interpretation. I was merely pointing out that it doesn't look like anything else than what it is.
>> Those ones are not >> significant, and I referred to that situation as the sign bit "bleeding >> down" into the other bits. Pencil and paper decimal math has no >> corollary, because you don't write nines in front of negative numbers >> and treat them like leading zeroes. I am glossing over the differences >> between two's complement and the written decimal form that has an >> explicit symbol for the sign of a number. > > That difference lies at the root of the matter. You can do ten's complement with pencil and paper, but as with binary, you need a beforehand choice of the number of digits. Try it. It might be enlightening.
Yes, you can do ten's complement with pencil and paper, but then you're doing something different that the basic long-hand math that every school kid was taught. My whole point was that the positive numbers in two's complement happen to look exactly like basic math that humans are taught. e.g., determining the number of significant digits uses the same method: ignore leading zeroes. The negative numbers look quite a bit different, so it's less intuitive unless you study it specifically. I'm not saying that I don't understand, or that it's not something that can be done on paper. I was merely noting the similarities and differences. Brian Willoughby Sound Consulting
On 2011/03/30 19:06, glen herrmannsfeldt wrote:
> Jim Thomas<jthomas@bittware.com> wrote: > > (snip) >>> for these 4-bit two's comp numbers, there is NO difference between >>> what this circle is for signed or for unsigned numbers. adding 3 will >>> move you clockwise 3 places and subtracting 2 will move you counter- >>> clockwise 2 places. > >> This description is actually pretty close to the way ENIAC actually >> worked, except that it worked in base 10 (really!). > >> Each base-ten digit was represented by a ring of ten tubes. One of >> those tubes held a logical high, and all the rest were low (or maybe the >> reverse, I forget). To add 5, they would just shift the ring clockwise. >> When it crossed from 9 to 0, it would clock the digit to the left. > (snip) > > Before EINIAC, mechanical calculators with decimal wheels were > very popular. (Very much like a mechanical odometer.) The logic > was then ported to vacuum tubes. It took some time for the idea > of binary arithmetic, and the ability to use it, and convert > to/from decimal, to sink in.
Vintage visual documentation and description of such systems can be found here: http://www.adafruit.com/blog/2011/03/18/the-mechanical-computer/
On Friday, April 1, 2011 5:27:48 AM UTC-4, Brian Willoughby wrote:
> On 2011/03/30 15:03, Jerry Avins wrote: > > On Wednesday, March 30, 2011 12:05:47 AM UTC-4, Brian Willoughby wrote: > >> On 2011/03/29 12:10, glen herrmannsfeldt wrote: > >>> Jerry Avins<j....@ieee.org> wrote: > >>> > >>>> I don't know what you mean by the sign bit "bleeding down" in > >>>> two's complement. > >>> > >>> I believe it is a different way of looking at the usual > >>> twos-complement sign extension. (The MC6809 is the only one I > >>> know that does sign extension with the SEX instruction.) > >> > >> What I was referring to can be explained as follows: When examining a > >> positive number where there are fewer significant bits than the word > >> size will hold, you can clearly see that there are leading zeroes until > >> the first most significant bit. > > > > I see leading sign bits. > > But that's not the only valid interpretation, certainly not with the > precedent of leading zeroes in the typical school-taught long-hand math.
I can't speak for you, but I didn't learn ten's-complement arithmetic in school. Just because positive ten's-complement numbers look exactly like sign-magnitude numbers doesn't mean that you can treat them that way. Intuition about one doesn't apply to the other.
> >> This corresponds intuitively to the > >> pencil and paper world where we can see the (lack of) effect of leading > >> zeroes on decimal numbers. When examining a negative two's complement > >> number with fewer significant bits than the word size will hold, you > >> instead see leading ones instead of leading zeroes.
You are intuiting sign-magnitude, not ten's complement. Right pew, wrong church.
> > I see leading sign bits. > > Well, in this case, that's the only valid interpretation. I was merely > pointing out that it doesn't look like anything else than what it is. > > >> Those ones are not > >> significant, and I referred to that situation as the sign bit "bleeding > >> down" into the other bits. Pencil and paper decimal math has no > >> corollary, because you don't write nines in front of negative numbers > >> and treat them like leading zeroes. I am glossing over the differences > >> between two's complement and the written decimal form that has an > >> explicit symbol for the sign of a number. > > > > That difference lies at the root of the matter. You can do ten's complement with pencil and paper, but as with binary, you need a beforehand choice of the number of digits. Try it. It might be enlightening. > > Yes, you can do ten's complement with pencil and paper, but then you're > doing something different that the basic long-hand math that every > school kid was taught.
Why do you believe that two's complement should be the same as the basic long-hand math that every school kid was taught?
> My whole point was that the positive numbers in two's complement happen > to look exactly like basic math that humans are taught. e.g., > determining the number of significant digits uses the same method: > ignore leading zeroes. The negative numbers look quite a bit different, > so it's less intuitive unless you study it specifically.
The front end of a fire engine looks like the front end of red semi-trailer tractor. Nobody expects the back ends to be the same.
> I'm not saying that I don't understand, or that it's not something that > can be done on paper. I was merely noting the similarities and differences.
Good. When relying on intuition, you need to keep the differences firmly in mind. Jerry -- Engineering is the art of making what you want from things you can get.

"Brian Willoughby"  wrote in message 
news:in46hv$h4t$1@nwnexus-news.nwnexus.com...

On 2011/03/30 19:06, glen herrmannsfeldt wrote:
> Jim Thomas<jthomas@bittware.com> wrote: > > (snip) >>> for these 4-bit two's comp numbers, there is NO difference between >>> what this circle is for signed or for unsigned numbers. adding 3 will >>> move you clockwise 3 places and subtracting 2 will move you counter- >>> clockwise 2 places. > >> This description is actually pretty close to the way ENIAC actually >> worked, except that it worked in base 10 (really!). > >> Each base-ten digit was represented by a ring of ten tubes. One of >> those tubes held a logical high, and all the rest were low (or maybe the >> reverse, I forget). To add 5, they would just shift the ring clockwise. >> When it crossed from 9 to 0, it would clock the digit to the left. > (snip) > > Before EINIAC, mechanical calculators with decimal wheels were > very popular. (Very much like a mechanical odometer.) The logic > was then ported to vacuum tubes. It took some time for the idea > of binary arithmetic, and the ability to use it, and convert > to/from decimal, to sink in.
Vintage visual documentation and description of such systems can be found here: http://www.adafruit.com/blog/2011/03/18/the-mechanical-computer/ Also http://retrocalculators.com/default.aspx Best wishes, --Phil