Re: shame on MISRA
- From: msg <msg@xxxxxxxxxxxxxxxxx>
- Date: Sat, 28 Apr 2007 15:12:48 -0500
CBFalconer wrote:
Arlet wrote:<snip>
On Apr 28, 2:24 am, Dan Henry <use...@xxxxxxxxxxxxx> wrote:
Seymour Cray's Control Data machines employed subtractors (there
No, negative zero can not be produced by a literal constant, like
'0'. Negative zero can only be the result of some expressions where
at least one argument is already negative zero, or by directly
manipulating the bits.
This is wrong. It depends on how the adders are configured. The
obvious method of subtracting by complementing and adding can
generate negative 0. The presence of a negative 0 can force such
an output. In fact, the means of avoiding negative zero is to use
a subtractor, rather than an adder, and prevent the injection of
any negative zero.
were of course ISAs designed by others at CDC); I found 2's complement
arithmetic alien after having been immersed in the CDC 1's complement
universe for so long. On the 160/8090 series (or the 6000/7000 PPU),
6000 series and 7000 series, '-0' is never generated by
arithmetic but only by manipulation.
Regards,
Michael
.
- Follow-Ups:
- Re: shame on MISRA
- From: Everett M. Greene
- Re: shame on MISRA
- References:
- Re: shame on MISRA
- From: Arlet
- Re: shame on MISRA
- From: Marcin Wolcendorf
- Re: shame on MISRA
- From: Marcin Wolcendorf
- Re: shame on MISRA
- From: Robert Adsett
- Re: shame on MISRA
- From: Marcin Wolcendorf
- Re: shame on MISRA
- From: CBFalconer
- Re: shame on MISRA
- From: Marcin Wolcendorf
- Re: shame on MISRA
- From: CBFalconer
- Re: shame on MISRA
- From: Dan Henry
- Re: shame on MISRA
- From: CBFalconer
- Re: shame on MISRA
- From: Dan Henry
- Re: shame on MISRA
- From: CBFalconer
- Re: shame on MISRA
- From: Dan Henry
- Re: shame on MISRA
- From: Arlet
- Re: shame on MISRA
- From: CBFalconer
- Re: shame on MISRA
- Prev by Date: Re: shame on MISRA
- Next by Date: Re: Selection of a USB microcontroller
- Previous by thread: Re: shame on MISRA
- Next by thread: Re: shame on MISRA
- Index(es):
Relevant Pages
|