comp.lang.ada
 help / color / mirror / Atom feed
* ones complement
@ 1998-08-21  0:00 Richard Paladino
  1998-08-21  0:00 ` Samuel Tardieu
                   ` (3 more replies)
  0 siblings, 4 replies; 24+ messages in thread
From: Richard Paladino @ 1998-08-21  0:00 UTC (permalink / raw)


Hello,

Is there an ada function for the c ~ function?

Thanks





^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ones complement
  1998-08-21  0:00 ones complement Richard Paladino
@ 1998-08-21  0:00 ` Samuel Tardieu
  1998-08-21  0:00   ` dennison
  1998-08-21  0:00 ` Corey Ashford
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 24+ messages in thread
From: Samuel Tardieu @ 1998-08-21  0:00 UTC (permalink / raw)
  To: Richard Paladino

>>>>> "Richard" == Richard Paladino <rickp@bill.com> writes:

Richard> Hello, Is there an ada function for the c ~ function?

"not" works on modular types.

  Sam
-- 
Samuel Tardieu -- sam@ada.eu.org




^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ones complement
  1998-08-21  0:00 ones complement Richard Paladino
  1998-08-21  0:00 ` Samuel Tardieu
@ 1998-08-21  0:00 ` Corey Ashford
  1998-08-26  0:00 ` Jaap Douma
  1998-08-26  0:00 ` Jaap Douma
  3 siblings, 0 replies; 24+ messages in thread
From: Corey Ashford @ 1998-08-21  0:00 UTC (permalink / raw)



Richard Paladino wrote in message <35DD8731.F8E756AB@bill.com>...
>Hello,
>
>Is there an ada function for the c ~ function?
>
>Thanks
>

If you are using modular types, the unary operator "not" should do
the trick.

- Corey






^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ones complement
  1998-08-21  0:00 ` Samuel Tardieu
@ 1998-08-21  0:00   ` dennison
  0 siblings, 0 replies; 24+ messages in thread
From: dennison @ 1998-08-21  0:00 UTC (permalink / raw)


In article <m3k9429xm0.fsf@zaphod.enst.fr>,
  Samuel Tardieu <sam@ada.eu.org> wrote:
> >>>>> "Richard" == Richard Paladino <rickp@bill.com> writes:
>
> Richard> Hello, Is there an ada function for the c ~ function?
>
> "not" works on modular types.

"not" works on arrays of booleans too.

--
T.E.D.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum




^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ones complement
  1998-08-21  0:00 ones complement Richard Paladino
  1998-08-21  0:00 ` Samuel Tardieu
  1998-08-21  0:00 ` Corey Ashford
@ 1998-08-26  0:00 ` Jaap Douma
  1998-08-26  0:00 ` Jaap Douma
  3 siblings, 0 replies; 24+ messages in thread
From: Jaap Douma @ 1998-08-26  0:00 UTC (permalink / raw)
  To: Richard Paladino

Hello, i have the next two examples:

   -- image checksum is last 16 bits of ones complement of sum of 16-bit
bytes
   Srec_Image_Checksum := 16#FFFF# - Srec_Image_Checksum ;

   -- last 8 bits of ones complement of sum of bytes
   Sum := 16#Ff# - (Sum mod 16#100#) ;




 

Richard Paladino wrote:
> 
> Hello,
> 
> Is there an ada function for the c ~ function?
> 
> Thanks




^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ones complement
  1998-08-21  0:00 ones complement Richard Paladino
                   ` (2 preceding siblings ...)
  1998-08-26  0:00 ` Jaap Douma
@ 1998-08-26  0:00 ` Jaap Douma
  3 siblings, 0 replies; 24+ messages in thread
From: Jaap Douma @ 1998-08-26  0:00 UTC (permalink / raw)
  To: Richard Paladino

Hello, i have the next two examples:

   -- image checksum is last 16 bits of ones complement of sum of 16-bit
bytes
   Srec_Image_Checksum := 16#FFFF# - Srec_Image_Checksum ;

   -- last 8 bits of ones complement of sum of bytes
   Sum := 16#Ff# - (Sum mod 16#100#) ;




 

Richard Paladino wrote:
> 
> Hello,
> 
> Is there an ada function for the c ~ function?
> 
> Thanks




^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ONES COMPLEMENT
  2006-07-18  1:48                       ` ONES COMPLEMENT (was: Ada vs Fortran for scientific applications) robin
@ 2006-07-18 18:41                         ` glen herrmannsfeldt
  2006-07-19 13:41                           ` robin
  2006-07-22  0:09                           ` Richard Steiner
  0 siblings, 2 replies; 24+ messages in thread
From: glen herrmannsfeldt @ 2006-07-18 18:41 UTC (permalink / raw)


robin wrote:
> glen herrmannsfeldt wrote in message ...

(snip)

>>Well, you want unsigned arithmetic to do multiple precision,
>>which is harder if a machine only supplies ones complement.

> In what way?
> The arithmetic is done using fewer bits than word.
> You have to do that with twos complement also.

The bits resulting in an unsigned addition or subtraction operation are 
the same as for a twos complement operation, but the detection of 
overflow (or carry/borrow) is different.  If you can properly detect
carry/borrow you can do it with all the bits in the word.

> The arithmetic required is addition; and all values
> manipulated are positive.  Results are the same in
> machines supporting ones or twos complement
> representation for negative values.

Hmm.  If you can detect the end around carry you can generate
the correct unsigned result, and so still use all the bits.
This is not usually easy in an high-level language, but should
be provided to the assembly programmer.

-- glen




^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ONES COMPLEMENT
       [not found]                     ` <20060717.7A4ADD0.10B1A@mojaveg.lsan.sisna.com>
@ 2006-07-19  6:54                       ` glen herrmannsfeldt
  2006-07-19 12:47                         ` Tom Linden
  2006-07-19 14:35                         ` robin
  0 siblings, 2 replies; 24+ messages in thread
From: glen herrmannsfeldt @ 2006-07-19  6:54 UTC (permalink / raw)


Everett M. Greene wrote:

(snip)

> A properly designed 1s complement machine would not
> generate -0 in normal arithmetic operations.  Thus,
> no need to perform a program check for -0.

As far as I know, they are designed either to not generate
-0 under normal conditions, or to compare -0 equal to +0,
or both.

One solution is to do subtraction as the basic operation,
such that subtracting two of the same number will generate +0,
and addition as subtraction of the complement.
-0 can still result if -0 is used as an operand, though.

For a parallel adder, as all machines have had for about 40 years now,
no extra hardware is needed, nor is more time needed.  The "add with 
carry" operation that some machines have is not available, though.

Twos complement machines might require extra hardware to handle the 
overflow on negate or absolute value, which can't overflow on ones 
complement machines.

For multiply and divide it might be that ones complement is a little 
easier, though the difference should be small.

-- glen




^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ONES COMPLEMENT
  2006-07-18 13:05                     ` ONES COMPLEMENT (was: Ada vs Fortran for scientific applications) Shmuel (Seymour J.) Metz
@ 2006-07-19 11:18                       ` Peter Flass
  2006-07-19 17:14                         ` glen herrmannsfeldt
  2006-07-19 13:41                       ` robin
  2006-07-19 17:11                       ` ONES COMPLEMENT (was: Ada vs Fortran for scientific applications) Everett M. Greene
  2 siblings, 1 reply; 24+ messages in thread
From: Peter Flass @ 2006-07-19 11:18 UTC (permalink / raw)


Shmuel (Seymour J.) Metz wrote:
> In <20060717.7A4ADD0.10B1A@mojaveg.lsan.sisna.com>, on 07/17/2006
>    at 06:26 PM, mojaveg@mojaveg.lsan.sisna.com (Everett M. Greene)
> said:
> 
>>A properly designed 1s complement machine would not
>>generate -0 in normal arithmetic operations.
> 
> 
> 0+(-0)?
> 
> 
>>Thus, no need to perform a program check for -0.
> 
> 
> I never saw a need to test for it regardless. Every 1s complement
> machine I know of lets you test for zero in a single instruction.
> 

What happens on a test for negative?  Did the machines just test the 
sign bit, making -0 a negative number?




^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ONES COMPLEMENT
  2006-07-19  6:54                       ` glen herrmannsfeldt
@ 2006-07-19 12:47                         ` Tom Linden
  2006-07-19 14:35                         ` robin
  1 sibling, 0 replies; 24+ messages in thread
From: Tom Linden @ 2006-07-19 12:47 UTC (permalink / raw)


On Tue, 18 Jul 2006 23:54:39 -0700, glen herrmannsfeldt  
<gah@ugcs.caltech.edu> wrote:

> One solution is to do subtraction as the basic operation,
> such that subtracting two of the same number will generate +0,
> and addition as subtraction of the complement.
> -0 can still result if -0 is used as an operand, though.

or mask the sign bit for a zero compare instruction



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ONES COMPLEMENT
  2006-07-18 13:05                     ` ONES COMPLEMENT (was: Ada vs Fortran for scientific applications) Shmuel (Seymour J.) Metz
  2006-07-19 11:18                       ` ONES COMPLEMENT Peter Flass
@ 2006-07-19 13:41                       ` robin
  2006-07-19 17:11                       ` ONES COMPLEMENT (was: Ada vs Fortran for scientific applications) Everett M. Greene
  2 siblings, 0 replies; 24+ messages in thread
From: robin @ 2006-07-19 13:41 UTC (permalink / raw)


Shmuel (Seymour J.) Metz wrote in message <44bceab6$29$fuzhry+tra$mr2ice@news.patriot.net>...
>In <20060717.7A4ADD0.10B1A@mojaveg.lsan.sisna.com>, on 07/17/2006
>   at 06:26 PM, mojaveg@mojaveg.lsan.sisna.com (Everett M. Greene)
>said:
>
>>"robin" <robin_v@bigpond.com> writes:
>
>>> Some implementations of ones complement used two forms of
>>> zero
>
>FSVO "some" equal to "all".

Not all.

>>>which required two tests.
>
>That  makes no sense.

One test for all bits zero, the other required for all ones.

>>A properly designed 1s complement machine would not
>>generate -0 in normal arithmetic operations.
>
>0+(-0)?
>
>>Thus, no need to perform a program check for -0.
>
>I never saw a need to test for it regardless. Every 1s complement
>machine I know of lets you test for zero in a single instruction.

(-0) looked like a negative value on some machines.

>>> How many machines now offer ones complement arithmetic?
>
>Before the S/360 captured the market there were large numbers of
>machines in the lines started with the CDC 160, CDC 6660 and the
>UNIVAC 1107. The shift seemed to be a copycat issue more than a
>technological one.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ONES COMPLEMENT
  2006-07-18 18:41                         ` ONES COMPLEMENT glen herrmannsfeldt
@ 2006-07-19 13:41                           ` robin
  2006-07-22  0:09                           ` Richard Steiner
  1 sibling, 0 replies; 24+ messages in thread
From: robin @ 2006-07-19 13:41 UTC (permalink / raw)


glen herrmannsfeldt wrote in message ...
>robin wrote:
>> glen herrmannsfeldt wrote in message ...
>
>(snip)
>
>>>Well, you want unsigned arithmetic to do multiple precision,
>>>which is harder if a machine only supplies ones complement.
>
>> In what way?
>> The arithmetic is done using fewer bits than word.
>> You have to do that with twos complement also.
>
>The bits resulting in an unsigned addition or subtraction operation are
>the same as for a twos complement operation, but the detection of
>overflow (or carry/borrow) is different.  If you can properly detect
>carry/borrow you can do it with all the bits in the word.

The CDC cybers did not provide that.

>> The arithmetic required is addition; and all values
>> manipulated are positive.  Results are the same in
>> machines supporting ones or twos complement
>> representation for negative values.
>
>Hmm.  If you can detect the end around carry

The CDC cyber did not provide that.

>you can generate
>the correct unsigned result, and so still use all the bits.
>This is not usually easy in an high-level language,

Naturally.

> but should
>be provided to the assembly programmer.

The CDC Cyber did not provide that.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ONES COMPLEMENT
  2006-07-19  6:54                       ` glen herrmannsfeldt
  2006-07-19 12:47                         ` Tom Linden
@ 2006-07-19 14:35                         ` robin
  1 sibling, 0 replies; 24+ messages in thread
From: robin @ 2006-07-19 14:35 UTC (permalink / raw)


glen herrmannsfeldt wrote in message ...
>Everett M. Greene wrote:
>
>(snip)
>
>> A properly designed 1s complement machine would not
>> generate -0 in normal arithmetic operations.  Thus,
>> no need to perform a program check for -0.
>
>As far as I know, they are designed either to not generate
>-0 under normal conditions, or to compare -0 equal to +0,
>or both.

Or none.
In some cases, -0 is treated as a negative number,
and +0 as a positive, and -0 is not equal to +0.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ONES COMPLEMENT
  2006-07-19 11:18                       ` ONES COMPLEMENT Peter Flass
@ 2006-07-19 17:14                         ` glen herrmannsfeldt
  2006-07-19 23:43                           ` robin
  0 siblings, 1 reply; 24+ messages in thread
From: glen herrmannsfeldt @ 2006-07-19 17:14 UTC (permalink / raw)


Peter Flass wrote:

> Shmuel (Seymour J.) Metz wrote:

(snip on negative zero)

>> I never saw a need to test for it regardless. Every 1s complement
>> machine I know of lets you test for zero in a single instruction.

> What happens on a test for negative?  Did the machines just test the 
> sign bit, making -0 a negative number?

Well, consider the 704, which is actually sign magnitude but has the
same problem.  (The easiest way to do sign magnitude arithmetic is
to convert to ones complement first, and convert back later.)

The 704 has a three way test instruction recently discussed in some
newsgroup, with branch destinations for negative, zero, and positive.
Any questions about the origin of the arithmetic IF statement?

-- glen




^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ONES COMPLEMENT
  2006-07-19 17:14                         ` glen herrmannsfeldt
@ 2006-07-19 23:43                           ` robin
  0 siblings, 0 replies; 24+ messages in thread
From: robin @ 2006-07-19 23:43 UTC (permalink / raw)


glen herrmannsfeldt wrote in message <5qednejm5MHL9SPZnZ2dnUVZ_oSdnZ2d@comcast.com>...
>Peter Flass wrote:
>
>> Shmuel (Seymour J.) Metz wrote:
>
>(snip on negative zero)
>
>>> I never saw a need to test for it regardless. Every 1s complement
>>> machine I know of lets you test for zero in a single instruction.
>
>> What happens on a test for negative?  Did the machines just test the
>> sign bit, making -0 a negative number?
>
>Well, consider the 704, which is actually sign magnitude but has the
>same problem.  (The easiest way to do sign magnitude arithmetic is
>to convert to ones complement first, and convert back later.)

It doesn't follow.
Twos complement for neg. values is just as easy.
In fact, for a serial machine, not only it [twos complement] easier,
it is done in less time! when consideration of the ensuing arithmetic
is considered.

>The 704 has a three way test instruction recently discussed in some
>newsgroup, with branch destinations for negative, zero, and positive.
>Any questions about the origin of the arithmetic IF statement?

This is off-topic, and completely irrelevant.
It has nothing to do with ones complement.






^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ONES COMPLEMENT
  2006-07-20 21:47                             ` Shmuel (Seymour J.) Metz
@ 2006-07-21 17:23                               ` glen herrmannsfeldt
  2006-07-21 18:04                                 ` John W. Kennedy
  2006-07-23  0:26                                 ` robin
  2006-07-21 20:05                               ` glen herrmannsfeldt
  2006-07-23  0:26                               ` robin
  2 siblings, 2 replies; 24+ messages in thread
From: glen herrmannsfeldt @ 2006-07-21 17:23 UTC (permalink / raw)


Shmuel (Seymour J.) Metz wrote:

(snip)

> Robin wrote "A properly designed 1s complement machine would not
> generate -0 in normal arithmetic operations."

> I responded "0+(-0)?".

> You responded "A subtractive adder."

> I'm trying to say that there's nothing about 0+(-0) requiring a
> subtractive adder.

There are adder designs that reduce the generation of -0.

In any case, Seymour Cray, who probably knows more about fast
processor design than anyone reading this newsgroup, designed
ones complement machines for many years.  There is also a lot
of literature on processor design.

Fortran and C definitely allow ones complement arithmetic, so a standard 
conforming program for those languages has to allow for it.

(I didn't look it up for PL/I or ADA, but most likely they do, too.
Java is the only language that I know doesn't allow it.)

Unless someone wants to go to the literature and find the known
answers, there doesn't seem to be much point in arguing it here.

-- glen




^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ONES COMPLEMENT
  2006-07-21 17:23                               ` ONES COMPLEMENT glen herrmannsfeldt
@ 2006-07-21 18:04                                 ` John W. Kennedy
  2006-07-23  0:26                                   ` robin
  2006-07-23  0:26                                 ` robin
  1 sibling, 1 reply; 24+ messages in thread
From: John W. Kennedy @ 2006-07-21 18:04 UTC (permalink / raw)


glen herrmannsfeldt wrote:
> (I didn't look it up for PL/I or ADA, but most likely they do, too.
> Java is the only language that I know doesn't allow it.)

Apart from Java's requirement of 2's-complement, the only case I can 
recall is that Ada goes out of its way to /permit/ 2's-complement. PL/I 
certainly doesn't have any particular requirement.

-- 
John W. Kennedy
"The blind rulers of Logres
Nourished the land on a fallacy of rational virtue."
   -- Charles Williams.  "Taliessin through Logres: Prelude"



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ONES COMPLEMENT
  2006-07-20 21:47                             ` Shmuel (Seymour J.) Metz
  2006-07-21 17:23                               ` ONES COMPLEMENT glen herrmannsfeldt
@ 2006-07-21 20:05                               ` glen herrmannsfeldt
  2006-07-21 21:00                                 ` Dick Hendrickson
  2006-07-23  0:26                               ` robin
  2 siblings, 1 reply; 24+ messages in thread
From: glen herrmannsfeldt @ 2006-07-21 20:05 UTC (permalink / raw)


Shmuel (Seymour J.) Metz wrote:
(snip)

> Robin wrote "A properly designed 1s complement machine would not
> generate -0 in normal arithmetic operations."

> I responded "0+(-0)?".

> You responded "A subtractive adder."

> I'm trying to say that there's nothing about 0+(-0) requiring a
> subtractive adder.

Well, even more, the way I understand the logic of some machines,
as long as no arguments are negative zero they won't generate a
negative zero.  0+(-0) doesn't satisfy that case.

For those who care, consider that ones complement arithmetic
will normally generate -0 instead of +0.  Adding x and -x generates
all ones with no end around carry.  If you add the ones complements
of the two operands you get the complement of the result, and still
negative zero for zero sum.  The complement of that will be the correct
sum, and won't be negative zero unless both of the arguments are -0.

In addition, note that ECL supplies a signal and its complement without
any extra logic needed.

In any case, a high level language has to get it right even
if it takes extra instructions.

-- glen




^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ONES COMPLEMENT
  2006-07-21 20:05                               ` glen herrmannsfeldt
@ 2006-07-21 21:00                                 ` Dick Hendrickson
  2006-07-22  6:19                                   ` glen herrmannsfeldt
  0 siblings, 1 reply; 24+ messages in thread
From: Dick Hendrickson @ 2006-07-21 21:00 UTC (permalink / raw)




glen herrmannsfeldt wrote:

> Shmuel (Seymour J.) Metz wrote:
> (snip)
> 
>> Robin wrote "A properly designed 1s complement machine would not
>> generate -0 in normal arithmetic operations."
> 
> 
>> I responded "0+(-0)?".
> 
> 
>> You responded "A subtractive adder."
> 
> 
>> I'm trying to say that there's nothing about 0+(-0) requiring a
>> subtractive adder.
> 
> 
> Well, even more, the way I understand the logic of some machines,
> as long as no arguments are negative zero they won't generate a
> negative zero.  0+(-0) doesn't satisfy that case.
> 
> For those who care, consider that ones complement arithmetic
> will normally generate -0 instead of +0.  Adding x and -x generates
> all ones with no end around carry.  If you add the ones complements
> of the two operands you get the complement of the result, and still
> negative zero for zero sum.  The complement of that will be the correct
> sum, and won't be negative zero unless both of the arguments are -0.

It's been a long time, but my recollection is that the CDC
machines used a subtractor rather than an adder.  This was
done to mostly eliminate the -0 problem.  Rather than do
X + Y, they did X - (-Y).  Then, if Y happened to be -X the
subtractor saw X + (-X) as X - (--X) which worked out to
X - X and then to zero.

I think the only problem was  0 + 0 which became 0 - (-0)
and then -0 .

> 
> In addition, note that ECL supplies a signal and its complement without
> any extra logic needed.

Maybe, but the CDC 1604s used discrete parts.  Transistors,
resistors, on a 3 inch by 3 inch circuit board.  I'm pretty
sure that some design decisions were heavily influenced by
parts count.

> 
> In any case, a high level language has to get it right even
> if it takes extra instructions.

Absolutely.

Dick Hendrickson
> 
> -- glen
> 




^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ONES COMPLEMENT
  2006-07-18 18:41                         ` ONES COMPLEMENT glen herrmannsfeldt
  2006-07-19 13:41                           ` robin
@ 2006-07-22  0:09                           ` Richard Steiner
  1 sibling, 0 replies; 24+ messages in thread
From: Richard Steiner @ 2006-07-22  0:09 UTC (permalink / raw)


Just a related link for interested folks (from the UNIVAC 110x world):

  http://www.fourmilab.ch/documents/univac/minuszero.html

The current Unisys Clearpath IX/Dorado mainframe line still uses the
same architecture, so it's still an issue.  :-)

-- 
 -Rich Steiner >>>---> http://www.visi.com/~rsteiner >>>---> Mableton, GA USA
    Mainframe/Unix bit twiddler by day, OS/2+Linux+DOS hobbyist by night.
       WARNING: I've seen FIELDATA FORTRAN V and I know how to use it!
                   The Theorem Theorem: If If, Then Then.



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ONES COMPLEMENT
  2006-07-21 21:00                                 ` Dick Hendrickson
@ 2006-07-22  6:19                                   ` glen herrmannsfeldt
  0 siblings, 0 replies; 24+ messages in thread
From: glen herrmannsfeldt @ 2006-07-22  6:19 UTC (permalink / raw)


Dick Hendrickson wrote:

(snip, I wrote)

>> In addition, note that ECL supplies a signal and its complement without
>> any extra logic needed.

> Maybe, but the CDC 1604s used discrete parts.  Transistors,
> resistors, on a 3 inch by 3 inch circuit board.  I'm pretty
> sure that some design decisions were heavily influenced by
> parts count.

Well, the IBM 360/91 used ASLT, which is pretty much ECL built
from discrete transistors glued on a ceramic substrate.
Most 360's were SLT, which is pretty much discrete TTL.

-- glen




^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ONES COMPLEMENT
  2006-07-20 21:47                             ` Shmuel (Seymour J.) Metz
  2006-07-21 17:23                               ` ONES COMPLEMENT glen herrmannsfeldt
  2006-07-21 20:05                               ` glen herrmannsfeldt
@ 2006-07-23  0:26                               ` robin
  2 siblings, 0 replies; 24+ messages in thread
From: robin @ 2006-07-23  0:26 UTC (permalink / raw)


Shmuel (Seymour J.) Metz wrote in message <44c00809$1$fuzhry+tra$mr2ice@news.patriot.net>...
>In <20060720.79BD230.8698@mojaveg.lsan.sisna.com>, on 07/20/2006
>   at 08:46 AM, mojaveg@mojaveg.lsan.sisna.com (Everett M. Greene)
>said:
>
>>"Shmuel (Seymour J.) Metz" <spamtrap@library.lspace.org.invalid>
>>writes: > mojaveg@mojaveg.lsan.sisna.com (Everett M. Greene) said: >
>>> >A subtractive adder.
>>>
>>> How so? 0+(-0) is a straight addition of 0...0 and 7...7, requiring
>>> no complementation.
>
>>Context was deleted so I have no idea what you're trying to say
>>above.
>
>Robin wrote "A properly designed 1s complement machine would not
>generate -0 in normal arithmetic operations."

They are not my words.  From earlier posts, it looks like E. Green's post.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ONES COMPLEMENT
  2006-07-21 17:23                               ` ONES COMPLEMENT glen herrmannsfeldt
  2006-07-21 18:04                                 ` John W. Kennedy
@ 2006-07-23  0:26                                 ` robin
  1 sibling, 0 replies; 24+ messages in thread
From: robin @ 2006-07-23  0:26 UTC (permalink / raw)


glen herrmannsfeldt wrote in message ...
>Shmuel (Seymour J.) Metz wrote:
>
>> I'm trying to say that there's nothing about 0+(-0) requiring a
>> subtractive adder.
>
>There are adder designs that reduce the generation of -0.
>
>In any case, Seymour Cray, who probably knows more about fast
>processor design than anyone reading this newsgroup, designed
>ones complement machines for many years.

That doesn't make it [ones complement] a good design.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: ONES COMPLEMENT
  2006-07-21 18:04                                 ` John W. Kennedy
@ 2006-07-23  0:26                                   ` robin
  0 siblings, 0 replies; 24+ messages in thread
From: robin @ 2006-07-23  0:26 UTC (permalink / raw)


John W. Kennedy wrote in message ...
>glen herrmannsfeldt wrote:
>> (I didn't look it up for PL/I or ADA, but most likely they do, too.
>> Java is the only language that I know doesn't allow it.)
>
>Apart from Java's requirement of 2's-complement, the only case I can
>recall is that Ada goes out of its way to /permit/ 2's-complement. PL/I
>certainly doesn't have any particular requirement.

PL/I was designed at a time when ones and twos complement machines
were in use.  There's no reason why PL/I won't run on either
architecture.





^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2006-07-23  0:26 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-08-21  0:00 ones complement Richard Paladino
1998-08-21  0:00 ` Samuel Tardieu
1998-08-21  0:00   ` dennison
1998-08-21  0:00 ` Corey Ashford
1998-08-26  0:00 ` Jaap Douma
1998-08-26  0:00 ` Jaap Douma
  -- strict thread matches above, loose matches on Subject: below --
2006-05-22  4:54 Ada vs Fortran for scientific applications Nasser Abbasi
2006-05-22 13:02 ` Jean-Pierre Rosen
2006-05-22 15:23   ` Dan Nagle
2006-05-23  8:25     ` Jean-Pierre Rosen
2006-05-23 17:09       ` Dick Hendrickson
2006-05-24 14:50         ` robin
2006-05-24 15:19           ` Dick Hendrickson
2006-05-25  3:40             ` robin
2006-05-25  5:04               ` Nasser Abbasi
2006-05-25  6:04                 ` Richard Maine
     [not found]                   ` <20060712.7A4E6E0.D028@mojaveg.lsan.sisna <20060714.7A4E988.A30D@mojaveg.lsan.sisna.com>
2006-07-16  9:07                     ` glen herrmannsfeldt
2006-07-18  1:48                       ` ONES COMPLEMENT (was: Ada vs Fortran for scientific applications) robin
2006-07-18 18:41                         ` ONES COMPLEMENT glen herrmannsfeldt
2006-07-19 13:41                           ` robin
2006-07-22  0:09                           ` Richard Steiner
     [not found]                   ` <20060712.7A4E6E0.D028@mojaveg.lsan.sisna <20060717.7A4ADD0.10B1A@mojaveg.lsan.sisna.com>
2006-07-18 13:05                     ` ONES COMPLEMENT (was: Ada vs Fortran for scientific applications) Shmuel (Seymour J.) Metz
2006-07-19 11:18                       ` ONES COMPLEMENT Peter Flass
2006-07-19 17:14                         ` glen herrmannsfeldt
2006-07-19 23:43                           ` robin
2006-07-19 13:41                       ` robin
2006-07-19 17:11                       ` ONES COMPLEMENT (was: Ada vs Fortran for scientific applications) Everett M. Greene
2006-07-19 19:40                         ` Shmuel (Seymour J.) Metz
2006-07-20 16:46                           ` Everett M. Greene
2006-07-20 21:47                             ` Shmuel (Seymour J.) Metz
2006-07-21 17:23                               ` ONES COMPLEMENT glen herrmannsfeldt
2006-07-21 18:04                                 ` John W. Kennedy
2006-07-23  0:26                                   ` robin
2006-07-23  0:26                                 ` robin
2006-07-21 20:05                               ` glen herrmannsfeldt
2006-07-21 21:00                                 ` Dick Hendrickson
2006-07-22  6:19                                   ` glen herrmannsfeldt
2006-07-23  0:26                               ` robin
     [not found]                     ` <20060717.7A4ADD0.10B1A@mojaveg.lsan.sisna.com>
2006-07-19  6:54                       ` glen herrmannsfeldt
2006-07-19 12:47                         ` Tom Linden
2006-07-19 14:35                         ` robin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox