Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.unix.programmer > #856 > unrolled thread

Queston about the word

Started byMateusz_madi <madi.czadi@gmail.com>
First post2011-06-23 04:09 -0700
Last post2011-06-24 17:29 +0100
Articles 8 — 7 participants

Back to article view | Back to comp.unix.programmer


Contents

  Queston about the word Mateusz_madi <madi.czadi@gmail.com> - 2011-06-23 04:09 -0700
    Re: Queston about the word Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-06-23 13:59 +0100
      Re: Queston about the word Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-06-23 14:16 +0100
        Re: Queston about the word Nobody <nobody@nowhere.com> - 2011-06-23 18:21 +0100
        Re: Queston about the word scott@slp53.sl.home (Scott Lurndal) - 2011-06-24 00:43 +0000
      Re: Queston about the word Casper H.S. Dik <Casper.Dik@OrSPaMcle.COM> - 2011-06-23 13:29 +0000
      Re: Queston about the word Nomen Nescio <nobody@dizum.com> - 2011-06-24 04:56 +0200
        Re: Queston about the word Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-06-24 17:29 +0100

#856 — Queston about the word

FromMateusz_madi <madi.czadi@gmail.com>
Date2011-06-23 04:09 -0700
SubjectQueston about the word
Message-ID<78b08098-fb5c-4184-a9c3-06bc012bf270@v10g2000yqn.googlegroups.com>
Hi,
what is the word in computer memmory?
Problem: Let's say we have a buddy system in which some block in
memmory has address 011011110000, if block have a size 4 words what is
the address of it's buddy?

regards,
madi

[toc] | [next] | [standalone]


#857

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2011-06-23 13:59 +0100
Message-ID<0.f8cafbc4b7f19f7e1021.20110623135941BST.87vcvwaeki.fsf@bsb.me.uk>
In reply to#856
Mateusz_madi <madi.czadi@gmail.com> writes:

> what is the word in computer memmory?

In my opinion, the term has stopped being useful.  There used to
word-addressed machines where storage was made up of chunks larger that
were larger than you'd use for a character.  In a machine like that, the
term has a well-defined meaning.  When byte addressing became the norm,
many systems kept the term.  For example, the IBM 360 had half words,
words and double words but it's getting less and less clear what the
undecorated term "word" should really mean.

Nowadays, it does not mean much more than "some unit of memory" though
it will always be some unit that makes at least minimal sense to the
hardware (i.e. you would not talk about 36-bit words on a 64-bit
machine).

I think that in some communities (e.g. C programmers working on Windows)
there might be a well-established meaning, but it won't necessarily
apply to any other group of people.

> Problem: Let's say we have a buddy system in which some block in
> memmory has address 011011110000, if block have a size 4 words what is
> the address of it's buddy?

You can't say without knowing the address structure and the word size.
011011110000 might represent a segmented address rather than an
address from a flat address space.  The addresses might point to words
or they may point to bytes or even bits in some rare cases.  If the
question was asked of you by someone, you need to get clarification.  If
it is your own question, it hides a lot of assumption about how you
think about memory and addresses.

(I take "buddy" to mean adjacent in memory -- I don't know the term.)

I'm sorry that this is so imprecise but I think it's the best answer I
give without knowing more.

-- 
Ben.

[toc] | [prev] | [next] | [standalone]


#858

FromRainer Weikusat <rweikusat@mssgmbh.com>
Date2011-06-23 14:16 +0100
Message-ID<87fwn0d6xg.fsf@sapphire.mobileactivedefense.com>
In reply to#857
Ben Bacarisse <ben.usenet@bsb.me.uk> writes:
> Mateusz_madi <madi.czadi@gmail.com> writes:
>> what is the word in computer memmory?
>
> In my opinion, the term has stopped being useful.  There used to
> word-addressed machines where storage was made up of chunks larger that
> were larger than you'd use for a character.  In a machine like that, the
> term has a well-defined meaning.  When byte addressing became the norm,
> many systems kept the term.  For example, the IBM 360 had half words,
> words and double words but it's getting less and less clear what the
> undecorated term "word" should really mean.

The usual meaning would be 'an integer whose width is equal to the
width of the general-purpose integer registers of the machine'. 

[...]

> I think that in some communities (e.g. C programmers working on Windows)
> there might be a well-established meaning, but it won't necessarily
> apply to any other group of people.

In the community of people who can't get their head out of DOS, a
'word' is a sixteen bit integer, independent of any properties of the
hardware they are using because the word size of the CPUs the
programming documentation they picked up them term from referred to
was 16 bits (the Intel 8086, to be precise).

But Windows programmers are not supposed to communicate with anyone
who isn't because this makes them sligtly easier to control.

[toc] | [prev] | [next] | [standalone]


#861

FromNobody <nobody@nowhere.com>
Date2011-06-23 18:21 +0100
Message-ID<pan.2011.06.23.17.21.03.491000@nowhere.com>
In reply to#858
On Thu, 23 Jun 2011 14:16:27 +0100, Rainer Weikusat wrote:

> The usual meaning would be 'an integer whose width is equal to the
> width of the general-purpose integer registers of the machine'. 

That's one interpretation, but not the only one.

E.g. the 68000 had 32-bit registers but a 16-bit data bus, and used "word"
to mean 16 bits and "long" for 32 bits (e.g. mnemonics had a suffix of
".b", ".w" or ".l" to indicate byte/word/long = 8/16/32 bit operation).
Later variants with 8-bit (68008) or 32-bit (68020+) data buses retained
the terminology for compatibility.

On a system where the register width is equal to the external data bus
width and which requires reads to be word-aligned, the concept is
relatively clear-cut (although I wouldn't be surprised if Microsoft
continues to use WORD => 16 bits even on ARM).

[toc] | [prev] | [next] | [standalone]


#862

Fromscott@slp53.sl.home (Scott Lurndal)
Date2011-06-24 00:43 +0000
Message-ID<L4RMp.42228$Hb6.21754@news.usenetserver.com>
In reply to#858
Rainer Weikusat <rweikusat@mssgmbh.com> writes:
>Ben Bacarisse <ben.usenet@bsb.me.uk> writes:
>> Mateusz_madi <madi.czadi@gmail.com> writes:
>>> what is the word in computer memmory?
>>
>> In my opinion, the term has stopped being useful.  There used to
>> word-addressed machines where storage was made up of chunks larger that
>> were larger than you'd use for a character.  In a machine like that, the
>> term has a well-defined meaning.  When byte addressing became the norm,
>> many systems kept the term.  For example, the IBM 360 had half words,
>> words and double words but it's getting less and less clear what the
>> undecorated term "word" should really mean.
>
>The usual meaning would be 'an integer whose width is equal to the
>width of the general-purpose integer registers of the machine'.

And when a machine doesn't have general purpose registers?

I've worked on one system that could operating on variable length
BCD strings of one  up to 100 digits or bytes[*] in length.   The processor
internally had a bus width of 40 bits (5 bytes), but that wasn't
exposed to the programmer in any way.  Memory was addressed to the
digit (4-bit nibble).

Pointers, such as existed, were 7SN (7 digit, signed numeric) values,
stored big-endian, with a leading sign.   A null pointer was the value
@CxEEEEEE@ where 'x' indicates any digit value (0-9).   x was a
'base indicant' which selected one of eight base-limit pairs which
described an up to 1 million digit (500,000 byte) segment.  C was
the positive sign value, D negative.

A single ADD instruction could add two 100-digit values in memory and
store as a third value directly in memory - no registers.

A single MVW instruction could move 20,000 bytes in a single instruction.

A single SLT instruction could search a complete linked list for a key which
matched one of nine different conditions, with the key up to 100 bytes for
alpha data, and 100 digits for numeric data.

A hard target for a C compiler, but a natural for a COBOL compiler (almost
one instruction per source line).

scott

[*] the processor would ignore the EBCDIC zone digit when processing
    byte (UA - Unsigned Alphanumeric) data, so no data conversion was
    required between compuational numeric data and displayable alphanumeric
    data for any of the math instructions.   Made reading core dumps dead
    simple - no hex conversions required. 

[toc] | [prev] | [next] | [standalone]


#859

FromCasper H.S. Dik <Casper.Dik@OrSPaMcle.COM>
Date2011-06-23 13:29 +0000
Message-ID<4e033f9f$0$14134$e4fe514c@news.xs4all.nl>
In reply to#857
Ben Bacarisse <ben.usenet@bsb.me.uk> writes:

>Mateusz_madi <madi.czadi@gmail.com> writes:

>> what is the word in computer memmory?

>In my opinion, the term has stopped being useful.  There used to
>word-addressed machines where storage was made up of chunks larger that
>were larger than you'd use for a character.  In a machine like that, the
>term has a well-defined meaning.  When byte addressing became the norm,
>many systems kept the term.  For example, the IBM 360 had half words,
>words and double words but it's getting less and less clear what the
>undecorated term "word" should really mean.

It is usually defined in the architecture for any architecture but
outside of the context of a specific architecture it has no
clear meaning.

Casper
-- 

[toc] | [prev] | [next] | [standalone]


#863

FromNomen Nescio <nobody@dizum.com>
Date2011-06-24 04:56 +0200
Message-ID<c589bdc6cb7a91360ec0fc7014cc7f49@dizum.com>
In reply to#857
Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:

> Mateusz_madi <madi.czadi@gmail.com> writes:
> 
> > what is the word in computer memmory?
> 
> In my opinion, the term has stopped being useful.

That's patently untrue if you write assembly code. See how far you get if
you don't know exactly how big a word is on your target machine.

> There used to word-addressed machines where storage was made up of chunks
> larger that were larger than you'd use for a character.  In a machine like
> that, the term has a well-defined meaning.  When byte addressing became
> the norm, many systems kept the term.  For example, the IBM 360 had half
> words, words and double words but it's getting less and less clear what
> the undecorated term "word" should really mean.

It's meaningful on one platform. Across platforms it's not. So what?

Are you implying the IBM 360 could only address storage in units of
halfwords, words, doublewords, etc? That is not true. Everything on the
IBM 360 was byte addressable just like it is today. Or did you just mean
that the IBM 360 used archaic terms? That's also false, since those terms
have direct impact on numbering and instruction formats and alignment now in
the year 2011. 

And guess what else? 50 years later the naming conventions for words,
halfwords, doublewords etc. on IBM equipment remain unchanged and in common
use.

[toc] | [prev] | [next] | [standalone]


#864

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2011-06-24 17:29 +0100
Message-ID<0.c6299d0712d8077f5f08.20110624172934BST.87sjqz6vm9.fsf@bsb.me.uk>
In reply to#863
Nomen Nescio <nobody@dizum.com> writes:

> Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:
>
>> Mateusz_madi <madi.czadi@gmail.com> writes:
>> 
>> > what is the word in computer memmory?
>> 
>> In my opinion, the term has stopped being useful.
>
> That's patently untrue if you write assembly code. See how far you get if
> you don't know exactly how big a word is on your target machine.
>
>> There used to word-addressed machines where storage was made up of chunks
>> larger that were larger than you'd use for a character.  In a machine like
>> that, the term has a well-defined meaning.  When byte addressing became
>> the norm, many systems kept the term.  For example, the IBM 360 had half
>> words, words and double words but it's getting less and less clear what
>> the undecorated term "word" should really mean.
>
> It's meaningful on one platform. Across platforms it's not. So what?

The OP gave no context.  That what makes it unhelpful.  I agree that
useless is too strong a word -- there are lots of contexts that define
it and it is useful in those contexts -- but trying to give it some
universal meaning (as the OP seemed to be asking for) is unhelpful.

> Are you implying the IBM 360 could only address storage in units of
> halfwords, words, doublewords, etc? That is not true. Everything on the
> IBM 360 was byte addressable just like it is today.

Yes, I cited it as an example of an architecture with a well-defined
word despite being byte addressed.

> Or did you just mean
> that the IBM 360 used archaic terms? That's also false, since those terms
> have direct impact on numbering and instruction formats and alignment now in
> the year 2011. 
>
> And guess what else? 50 years later the naming conventions for words,
> halfwords, doublewords etc. on IBM equipment remain unchanged and in common
> use.

Yes.  That's an example of the paragraph you snipped.

-- 
Ben.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.unix.programmer


csiph-web