Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

comp.lang.c

96 views
Skip to first unread message

M.gowtham M.gowtham

unread,
Apr 22, 2013, 10:05:15 AM4/22/13
to
On Sun, 21 Apr 2013 14:50:55 -0700, gpietsch08618 wrote:

>> Finally, why would anyone want char to be other than 8 bits? *Is* char
>> on any platform *not* 8 bits?
>
> Think Unicode.


That's normally supported via wchar_t.

As has been pointed out elsewhere, in spite of the name, a "char" isn't
necessarily a character. The semantics of "char" appear to be designed
around the assumption that it's a byte, i.e. the hardware's unit of
addressable memory.

AFAICT, all general-purpose microprocessors use an 8-bit byte, and thus so
do systems built around them. Some systems whose CPU was built from
discrete logic used other sizes (I'm aware of 6, 10, and 12 bits).
Dedicated DSPs often have 32-bit bytes (i.e. memory is addressed in words).

website--> http://www.win2job.info/

Ed Prochak

unread,
Apr 22, 2013, 10:31:36 AM4/22/13
to
On Monday, April 22, 2013 10:05:15 AM UTC-4, M.gowtham M.gowtham wrote:
[]
>
> As has been pointed out elsewhere, in spite of the name, a "char" isn't
>
> necessarily a character. The semantics of "char" appear to be designed
>
> around the assumption that it's a byte, i.e. the hardware's unit of
>
> addressable memory.
>
>
>
> AFAICT, all general-purpose microprocessors use an 8-bit byte, and thus so
>
> do systems built around them. Some systems whose CPU was built from
>
> discrete logic used other sizes (I'm aware of 6, 10, and 12 bits).
>
> Dedicated DSPs often have 32-bit bytes (i.e. memory is addressed in words).
>

it is conventional nowadays, but there were other options in the past, with 9bit bytes on 36 bit machines. And bit slice hardware to build your own custom processor width.

If I were to hazard a guess, I'd say the 8bit byte became the overall standard when CPU manufacturers were no longer memory manufacturers. IOW, when memory became a commodity product.


Mark Bluemel

unread,
Apr 22, 2013, 10:37:42 AM4/22/13
to
On 22/04/2013 15:05, M.gowtham M.gowtham wrote:
...
>
> website--> http://www.win2job.info/
>
Go to hell!

Mark Bluemel

unread,
Apr 22, 2013, 10:38:41 AM4/22/13
to
On 22/04/2013 15:31, Ed Prochak wrote:
> On Monday, April 22, 2013 10:05:15 AM UTC-4, M.gowtham M.gowtham wrote:

He didn't - he quoted another's post just to add his gratuitous website
link. May he rot in hell.

Eric Sosman

unread,
Apr 22, 2013, 11:12:00 AM4/22/13
to
On 4/22/2013 10:31 AM, Ed Prochak wrote:
>[...]
> If I were to hazard a guess, I'd say the 8bit byte became the overall standard when CPU manufacturers were no longer memory manufacturers. IOW, when memory became a commodity product.

Despite the fact that you're replying to a spammer, you raise
a point that might be worthy of discussion. Briefly, I think
your guess may be a bit too hazardous. ;-)

The first 8-bit byte I encountered was on an IBM S/360, and
the year was 1968. At that time memory was far from being a
commodity; computer manufacturers made their own (out of little
ferrite doughnuts strung on wires, mostly) and charged a lot of
money for it. (There were also manufacturers of "compatible"
memory and peripherals who'd undercut the prices of IBM, DEC,
et al., and all sides spent a lot of money on lawyers.)

For the S/360, I suspect the decision to use an 8-bit byte
was not driven by IBM's wish to install more memory, nor by
nonchalance about how much somebody else could sell. Rather,
I'd point at the intended commercial applications, and their
expected use of a lot of packed decimal arithmetic. It's easy
to fit two decimal digits in an 8-bit byte, much harder to do
it with 7 bits (BCD won't work), and, er, *very* difficult to
cram two decimal digits into 6 bits ...

Lots of other manufacturers also adopted the 8-bit byte,
perhaps because they followed reasoning similar to IBM's, or
maybe because they wanted to improve program portability from
IBM's gear to their own systems. For whatever reason, 8 bits
became the norm very quickly -- and once standardization set
in, commoditization could follow.

--
Eric Sosman
eso...@comcast-dot-net.invalid

Robert Wessel

unread,
Apr 22, 2013, 2:04:13 PM4/22/13
to
In addition to what Eric said, much early commodity memory was
bit-wide. Pretty much all DRAM was, although nibble and byte wide
SRAM and ((E)P)ROM were fairly common. Although that was likely more
due to most of the processors needing those widths, rather than the
other was around.

The first commodity memory chip, the Intel 3101 SRAM, was 16x4,
closely followed* by the SRAM 1101 (256x1) and DRAM 1103 (1024x1).
Fairchild's 4100, a 256x1 SRAM, was produced within a few months of
the 1101, but was not generally available until later.

At one point the 1103 was the single most popular chip in the world.


*It was actually intended to ship the 1101 first, but manufacturing
issues delayed it a few months.

Keith Thompson

unread,
Apr 22, 2013, 2:35:35 PM4/22/13
to
Mark Bluemel <mark_b...@pobox.com> writes:
> On 22/04/2013 15:05, M.gowtham M.gowtham wrote:
> ...
>>
>> website--> http://www.DELETED.info/
>>
> Go to hell!

I applaud any insults directed at spammers, but there's no need to
share them with the rest of us as well.

It wasn't immediately obvious that the message you're replying
to was spam (it plagiarized a previous message and added a URL
that I initially assumed was merely a signature) -- but since you
obviously did recognize it as spam, I suggest that re-quoting the
spammed URL was not the best thing to do.

In general, publicly replying to spammers tends to be counterproductive.
Pointing out that the message was spam would have been reasonable in
this case; I'm not the only one who didn't immediately recognize it as
spam.

--
Keith Thompson (The_Other_Keith) ks...@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"

BartC

unread,
Apr 22, 2013, 3:29:51 PM4/22/13
to
"Robert Wessel" <robert...@yahoo.com> wrote in message
news:eqtan89sqscerq4pr...@4ax.com...
> On Mon, 22 Apr 2013 07:31:36 -0700 (PDT), Ed Prochak
> <edpr...@gmail.com> wrote:

>>If I were to hazard a guess, I'd say the 8bit byte became the overall
>>standard when CPU manufacturers were no longer memory manufacturers. IOW,
>>when memory became a commodity product.
>
>
> In addition to what Eric said, much early commodity memory was
> bit-wide. Pretty much all DRAM was, although nibble and byte wide
> SRAM and ((E)P)ROM were fairly common. Although that was likely more
> due to most of the processors needing those widths, rather than the
> other was around.

Using 4- and 8-bit wide memory had a number of advantages. If only a small
amount of memory was needed, then you could just use one or two chips
instead of eight (saving costs and space).

When extra bandwidth was needed (video memory for example), then again only
1/4 or 1/8 the number of chips was needed.

In the case of ROM memory, it was convenient to have that 8-bit wide
(otherwise you'd either need two 4-bit chips, one programmed with odd
nibbles, the other with even ones, or 8 1-bit chips, each containing one
bit of each byte of the program!).

DRAMs also started to use 4-bit widths when the capacities become larger,
partly because of the problem of having to use multiples of 8 (or 16 or 32
depending on bus width) of the things in any application. (This also
increased the available bandwidth for a given memory capacity.)

> The first commodity memory chip, the Intel 3101 SRAM, was 16x4,
> closely followed* by the SRAM 1101 (256x1) and DRAM 1103 (1024x1).
> Fairchild's 4100, a 256x1 SRAM, was produced within a few months of
> the 1101, but was not generally available until later.
>
> At one point the 1103 was the single most popular chip in the world.

(1Kb static rams were the first I ever bought. Both 1024x1 and 256x4. The
latter cost about £3 each in 1981. Although contrary to what I said above, I
used x1 for video, and x4 for program ram...)

--
Bartc

glen herrmannsfeldt

unread,
Apr 22, 2013, 4:12:01 PM4/22/13
to
Ed Prochak <edpr...@gmail.com> wrote:

(snip, someone wrote)

>> AFAICT, all general-purpose microprocessors use an 8-bit byte, and thus so
>> do systems built around them. Some systems whose CPU was built from
>> discrete logic used other sizes (I'm aware of 6, 10, and 12 bits).
>> Dedicated DSPs often have 32-bit bytes (i.e. memory is addressed in words).


(snip)
> it is conventional nowadays, but there were other options in the past,
> with 9bit bytes on 36 bit machines. And bit slice hardware to build
> your own custom processor width.

Well IBM S/360, byte addressed with 8 bit (EBCDIC) characters was
the successor for various machines with 6 bit character sets.

The 7090 was the popular IBM scientific machine before S/360,
with 36 bit words and a 6 bit (BCDIC) character set.

The IBM machines for business use before S/360 also used a six
bit character set, and most allowed for variable length operations
with a word mark bit in memory.

The scientific and business machines used different mappings for some
of the characters, which complicated things all around.

From Blauuw and Brooks' "Computer Architecture, Concepts and Evolution":

"Desiderata and constraits. The principle desiderata and constraints
established for EBCDIC design follow:

1) The code was to be an extension of BCD, compatible except as
in desiderata 2.

2) There were to be no duals -- that is, the BCD duals had to be
"unwound," and separate codes assigned for these graphics. The
character set had to include at least 53 characters.

3) The character set had to be suitable for interchange. It had to
fit all then-existing media and devices, including tape, disks,
cards, printers, typewriters, and keypunches. These realization
constraints were:

- The typewriter allowed 88 characters plus blank
- The IBM bar printer allowed 52+b or 64+b.
- The IBM chain printer allowed (240/n)+b. The chain was 240
characters long. One could have an integral number of n
repeats, or indeed fractional numbers at some higher cost.
- The keypunch's interpreing printer had a decoding mechanism
that could move nine steps in one direction, and seven in the
other. It could interpret (9 x 7 = 63) + b.
- Although blank did not need to occupy a spot on printer chains
and bars, since it could be printed by supressing hammer
firing, it occupied a code point.

4) The primary character set was to be representable in 6 bits,
but 8 bit versions had to include the lowercase alphabet,
distinguished by only one bit from the uppercase alphabet.

5) The character set was to be universal across the Latin-alphabet
natural languages. The alphabets had to include 29 letters, to
accomodate the German, French, and Scandinavian languages.
(A whole separate language-by-language story shows why 29
is a suitable number ofr many European languages.)

6) The character set was to include punctuation marks needed by
natural language. These were operationally defined by the
character set of a "correspondence" typewriter. This requirement
meant adding the unwound BCD characters : ; ? " ! and ideally
¢.

7) The designers of programming language PL/I wanted the FORTRAN
operators and delimiters, plus the logical operators & | ~,
the relational operators < >, and the brackets [ ]."

The last charcter in 6) is the cent sign. The book has a tilde (~) where
I believe the PL/I logical not (¬) sign should go.

continuing:

"Size of the printer subset of EBCDIC. Considering these constraints
and desiderata, the size z of the EBCDIC printer's uppercase subset
becomes a mathematical exercise:

1) The upper limit for z, including blank, is 64.

2) The characters of z plus the 29 lower case alphabetics had
to be representable on the 88+b typewriter. Hence z<=89-29,
which reduces the maximum to 60.

3) The lower limit of z derives from the 48 of BCD plus 5 to unwind
the duals; it is 53.

4) A 240 character print chain printer could not accomodate five
iterations of 53 characters each, but if restricted to four
iterations, each could have 60 characters. With the blank, it
would give 61 characters, which is greater than the maximum of
60 for the typerwriters one-case subset. Therefore, z=60
(including blank) was the best size."

"The steps taken to select a set of 60 graphics were as follows:

1) ?? was discarded completely because it was used rarely, according
to a customer survey.

2) & was made to serve both as the PL/I symbol for AND, and as the
commercial character.

3) $ was dedicated as one of the three uppercase national alphabet
characters, to be replaced by other currency symbols (for
example, the British pound symbol) as required. The
latin-alphabet languages needing larger alphabets fortunately do
not use unique currency symbols. Notice that the national
alphabet symbols are duals (even multiples) by definition.

4) @ and #, whose usage is mainly in the United States, were
dedicated as uppercase national alphabet characters, along with $.

5) ", ¢, ! were made lowercase national alphabet characters, thereby
getting them onto the typewriter but not onto the 60 character
printer. These three plus the 59 uppercase characters were put
on the 63+b keypunch. This left one remaining code that could be
printed on the keypunch; it was repersented on the card by 0-8-2.
This code was specifically forbidden from having a graphic,
because that would violate typewriter and printer
representability.

6) PL/I was force to give up two graphics. The language designers
chose to give up [ ]. This was a bad mistake -- as delimiters,
brackets are much more powerful than operators in making a
langauge easy to write, read, and parse. It would have been
better to give up < >. (Even after the character set was frozen,
the language designers could have used < > as brackets rather
than as operators. The chose not to; a bad decision, we
believe.)"

So, that is what goes into an eight bit code.

> If I were to hazard a guess, I'd say the 8bit byte became the overall
> standard when CPU manufacturers were no longer memory manufacturers.
> IOW, when memory became a commodity product.

Well, S/360 was pretty popular, and using 8 bits made it easier to
work with the 360. The HP machines with 16 bit words were also pretty
popular in the years before the 8080.

Intel originally developed the 4004 for a BCD calculator, and then
extended it to the 8 bit 8008. Most of the RAM chips at that time were
one bit wide, but EPROMs got popular at 8 bits, presumably to go along
with the 8008 and 8080.

If the microprocessor originated while IBM was in the 36 bit machine
business, things might have been different.

-- glen

glen herrmannsfeldt

unread,
Apr 22, 2013, 4:38:56 PM4/22/13
to
Eric Sosman <eso...@comcast-dot-net.invalid> wrote:

(snip)

> For the S/360, I suspect the decision to use an 8-bit byte
> was not driven by IBM's wish to install more memory, nor by
> nonchalance about how much somebody else could sell. Rather,
> I'd point at the intended commercial applications, and their
> expected use of a lot of packed decimal arithmetic. It's easy
> to fit two decimal digits in an 8-bit byte, much harder to do
> it with 7 bits (BCD won't work), and, er, *very* difficult to
> cram two decimal digits into 6 bits ...

Also from Blaauw and Brooks: (section 2.3)

"Byte resolution provides that addressing freedom. A group of
bits sufficient to represent one character is called a byte --
a term coined in 1958 by Werner Buchholz [Brooks, et al., 1959].
The storage space model is a matrix whose row dimension is the
byte size of 6 or 8 bits, as shown for the 360 in Program 2-20."

> Lots of other manufacturers also adopted the 8-bit byte,
> perhaps because they followed reasoning similar to IBM's, or
> maybe because they wanted to improve program portability from
> IBM's gear to their own systems. For whatever reason, 8 bits
> became the norm very quickly -- and once standardization set
> in, commoditization could follow.

-- glen

Robert Wessel

unread,
Apr 23, 2013, 11:26:43 PM4/23/13
to
There may well have been x4 DRAM before the 256kbit generation, but
the first ones I recall with any sort of common use were the 64Kx4s.
As you said, this was for cost/capacity issues, since at that time
many of these were going into 8-bit and (small) 16-bit systems.

But wider RAMs and ROMs do have the obvious advantage that you need
fewer of them for small configurations. Although the need slice
memory words amongst several was largely a non-issue (and was required
on many 16-bit systems using x8 ROMs anyway). But the sizes were more
driven by the users (CPUs), rather than the other way around as was
speculated up-thread (IOW, CPUs didn't settle on 8-bit bytes because
that was a common size of RAM chip, rather the RAM were built to
accommodate CPUs that used 8-bit bytes).

Increased width didn't really help bandwidth in that era on most
systems, as everything was on one bus, and there was no memory
pipelining either. All that came later. And for larger memory
configurations, the x1 chips were physically smallest anyway.
0 new messages