From: Ron Flory <ron.flory@adtran.com>
To: Gabriel Paubert <paubert@iram.es>
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: Re: char type is unsigned with PPC gcc?
Date: Thu, 20 Apr 2000 11:50:11 -0500 [thread overview]
Message-ID: <38FF3543.19894457@adtran.com> (raw)
In-Reply-To: Pine.HPX.4.10.10004192203100.19933-100000@gra-ux1.iram.es
Hi-
Despite the strongly worded exchanges, this isn't really a big deal.
We all have opinions, which is good. So long as the compiler lets us
config it the way we think it should be, then I'm happy.
There are some problems with chars having different signed'ness, such
as many of the GNU tools not compiling correctly on some platforms
though-
Gabriel Paubert wrote:
>
> No, God meant bit 0 to be the MSB ;-) There is no other way around.
> Personnally I always think in big endian with bits numbered from MSB to
> LSB.
Ummm, endianness has nothing to do with bit ordering from MSB->LSB, it
refers to the order BYTES (or the minimum quanta of assessable data) are
ordered in memory when accessing multi-byte values. On big-endian
machines the 2-bytes value 0x1234 is stored sequentially as 0x12, 0x34,
whereas little-endian machines store it at 0x34, 0x12. Notice the bits
in these bytes are not 'mirrored' as you suggest.
All CPUs I'm aware of (even the PPC) correctly refer to the LSB as
being the rightmost bit, being consistent with the conventions of number
theory and representation, however the PPC is (almost) unique, and
incorrect in labeling the LSB as D31 instead of D0.
> Brain damage is believing that the fact that bit n represents 2 to the
> n has any advantage or mathematical weight.
Actually not. The association of data bits Dn as representing 2^n is a
fundamental identity in computer science, electrical engineering, and
mathematics. A binary numerical value is defined as a polynomial of the
form 2^n-1 + 2^n-2 + n^n-3 + .... 2^0. The fact that IBM chose to
ignore Mr. Boole's work is an unfortunate historical oversight that we
are stuck with.
> Ok, I have very strong and definitive opinions about these questions, so
> let us agree to disagree. I don't expect to convince you anyway...
That's OK, I wish you well. I've got this out of my system now... ;)
ron
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next parent reply other threads:[~2000-04-20 16:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.HPX.4.10.10004192203100.19933-100000@gra-ux1.iram.es>
2000-04-20 16:50 ` Ron Flory [this message]
2000-04-20 21:58 ` char type is unsigned with PPC gcc? Gabriel Paubert
2000-04-19 13:57 Stephane Laroche
2000-04-19 14:21 ` Gabriel Paubert
2000-04-19 14:24 ` Stephane Laroche
2000-04-19 14:42 ` Gabriel Paubert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=38FF3543.19894457@adtran.com \
--to=ron.flory@adtran.com \
--cc=linuxppc-embedded@lists.linuxppc.org \
--cc=paubert@iram.es \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).