comp.lang.ada
 help / color / mirror / Atom feed
From: Keith Thompson <kst-u@mib.org>
Subject: Re: KISS4691, a potentially top-ranked RNG.
Date: Fri, 29 Apr 2011 12:53:27 -0700
Date: 2011-04-29T12:53:27-07:00	[thread overview]
Message-ID: <lnoc3ox2a0.fsf@nuthaus.mib.org> (raw)
In-Reply-To: ipet84$5er$1@dont-email.me

glen herrmannsfeldt <gah@ugcs.caltech.edu> writes:
> In comp.lang.fortran Keith Thompson <kst-u@mib.org> wrote:
> (snip, I wrote)
>>> No.  You need CHAR_BIT to tell how many bits are in a char.
>>> It has been known to get to 64 on word addressed 64 bit machines.
>>> It must be at least 8, but can be more.
>  
>> Certainly CHAR_BIT *could* be 64 (or even more), but I've never heard
>> of a 64-bit system with CHAR_BIT==64.  Such an implementation would
>> have trouble dealing with octet-oriented data from other systems.
>> Some DSPs (digital signal processors) do have CHAR_BIT > 8.
>> There have been systems with, for example, 9-bit bytes, but they
>> had pretty much become obsolete by the time C was standardized.
>
> The story I remember was for a Cray machine, but I never used
> one to check on it.  I do know that there are some 64 bit
> word addressed machines, especially some from Cray.

I used to work on a Cray T90.  It had 64-bit words, and no direct
hardware access to smaller chunks of memory; to read an 8-bit byte,
you had to read the word containing it and then extract the bits
you wanted.  But the C compiler (C90, it never implemented C99)
had CHAR_BIT==8.  char was 8 bits; short, int, and long were all
64 bits.  A pointer to anything smaller than a 64-bit word stored
the byte offset in the high-order 3 bits (the address space was
much smaller than 64 bits, so the high-order bits weren't being
used for anything else).  This was all handled in software; the
compiler had to generate extra instructions to deal with byte data.

Making CHAR_BIT==64 would have made much more sense for the machine
itself in isolation, but it would have made interoperability with
other systems quite difficult.  It ran Unicos, Cray's BSDish Unix;
I'm not sure you can even implement Unix with bytes bigger than
8 bits.

It made it very slow for things like string processing, but since
it was primarily used for floating-point computations that wasn't
much of an issue.

Some older Cray vector systems ran other, non-Unix, operating systems
(COS, CTSS), but I never used any of those, and I don't know what
value their compilers used for CHAR_BIT -- if C was even supported.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Nokia
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"



  reply	other threads:[~2011-04-29 19:53 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4dae2a4b$0$55577$c30e37c6@exi-reader.telstra.net>
2011-04-28  1:14 ` KISS4691, a potentially top-ranked RNG robin
2011-04-28 11:42   ` e p chandler
2011-04-29  1:50     ` David Bernier
2011-04-29  2:09       ` Ian Collins
2011-04-29  3:01         ` Eric Sosman
2011-04-29  3:09           ` Ian Collins
2011-05-08  7:34             ` Uno
2011-05-11  5:38               ` Marni Zollinger
2011-04-29  6:15           ` nmm1
2011-04-29  3:16         ` David Bernier
2011-04-29  2:34       ` glen herrmannsfeldt
2011-04-29  7:04         ` Uno
2011-04-30 10:48           ` robin
2011-05-05  1:12             ` Uno
2011-04-29 15:13         ` Keith Thompson
2011-04-29 17:41           ` glen herrmannsfeldt
2011-04-29 19:53             ` Keith Thompson [this message]
2011-05-05 23:38               ` Michael Press
2011-04-29 22:45           ` Seebs
2011-04-30  4:36           ` Randy Brukardt
2011-04-29 22:43       ` Seebs
2011-04-29  9:43     ` robin
2011-05-01 15:31   ` Thad Smith
2011-05-01 19:58     ` Ian Collins
2011-05-02  0:01       ` James Kuyper
2011-05-02  0:42         ` Ian Collins
2011-05-02  2:34           ` James Kuyper
2011-05-02  2:50           ` glen herrmannsfeldt
2011-05-02  4:21       ` Thad Smith
2011-05-02  7:31         ` nmm1
2011-05-23  4:18           ` robin
2011-05-23  7:20             ` robin
2011-05-23  6:52           ` robin
2011-05-23  6:52           ` robin
2011-05-23  6:52           ` robin
2011-05-23  6:53           ` robin
2011-05-23  7:16             ` Georg Bauhaus
2011-06-28  7:19               ` robin
2011-06-28  8:44                 ` Vinzent Hoefler
2011-06-28  9:19                   ` Chris H
2011-06-28  9:14                 ` Georg Bauhaus
2011-06-28 11:59                   ` robin
2011-06-28 12:16                     ` Chris H
2011-06-28 15:44                       ` Peter Flass
2011-06-28 12:33                     ` James Kuyper
2011-06-28 13:53                     ` Georg Bauhaus
2011-06-28 22:39                       ` Brian Salter-Duke
2011-06-28 12:32                 ` James Kuyper
2011-06-28 13:03                   ` Chris H
2011-06-28 14:25                     ` James Kuyper
2011-06-28 15:01                       ` Chris H
2011-06-29  0:20                         ` James Kuyper
2011-06-29  8:38                         ` Michael Press
2011-06-28 16:04                 ` Joe Pfeiffer
2011-06-28 16:36                   ` Chris H
2011-06-28 16:51                     ` Joe Pfeiffer
2011-06-29  0:27                       ` James Kuyper
2011-06-29  1:00                         ` Joe Pfeiffer
2011-06-29 16:48                         ` Phil Carmody
2011-06-28 16:52                     ` Joe Pfeiffer
2011-06-28 17:06                     ` David Bernier
2011-06-28 21:11                     ` Gib Bogle
2011-06-29  4:47                       ` Mart van de Wege
2011-07-02  6:49                         ` Gib Bogle
2011-07-02 15:59                           ` Mart van de Wege
2011-07-02 21:57                             ` Gib Bogle
2011-06-29  7:36                       ` nmm1
2011-06-29  9:58                         ` Georg Bauhaus
     [not found] <a82cebe3-cdb9-48af-8080-bca935eeb9b1@l14g2000yql.googlegroups.com>
2010-07-25  0:49 ` Gene
2010-07-26  2:50   ` robin
2010-07-27  5:46 ` robin
2010-07-30 10:46   ` Uno
2010-08-03 10:41     ` robin
2010-08-03 17:15       ` James Waldby
2010-08-03 17:35         ` Dann Corbit
2010-08-03 20:34           ` Peter Flass
2010-08-04  4:20             ` Uno
2010-08-04  8:31           ` robin
2010-08-04  7:56         ` robin
2010-08-05 21:07           ` Uno
2010-08-06 10:11             ` robin
2010-08-09 14:52             ` mecej4
     [not found] ` <i2fir2$op4$1@speranza.aioe.org>
2010-07-27 10:19   ` robin
2010-07-30  8:33     ` Uno
replies disabled

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