lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


It was thus said that the Great Philippe Verdy once stated:
> the term "word" was chosen purpusely and accuretely: it indicates the basic
> unit of data managed at the instruction level by the instruction set used
> by the interpreting part of the engine. 

  I was taught that a "word" is the number of bits the CPU can handle
natively (or without addtional work).  That's fine for most CPUs, but things
do get fuzzy.  For instance, the Intel 8088.  Internally it can do 16-bit
arithmatic so clearly it's "word" is 16-bits.  *BUT* it only has an 8-bit
data bus, so retreiving a 16-bit word requires more work.  So what is the
"word" size on an 8088?  8-bits or 16-bits?

  The Motorols 68000 is similar---internally, it can handle 32-bit
artithmatic, but it too, has a data bus smaller than it's internal bus, in
this case, a 16-bit data bus.  So, what does "word" mean for the 68000? 
16-bits or 32-bits?  [1]

  Then you have the real odd-balls of the world, like the Intel 432 [2],
which didn't have a fixed size word.  Or the PERQ, a computer system with a
writable instruction set! (want 16-bit words?  Rewrite the instruction set.
13-bit words?  Fine, rewrite the instruction set)

> Even in the Lua.org's VM, this unit
> of information is the same a a standard Lua value: it has both a  a
> type and a  value (not necessarily numeric), which are unseparatable.
> In a classic CPU, the "word" has no distinctive type, it's just a
> fixed-size set of bits with arithmetic properties.
>
> In Lua.org's VM, the "word" is also fixed size but contain other bits that
> have no arithmetic properties but are assiocated with specific behavior
> affecting what the VM does or infers in addition to what is specified by
> the instruction set.

  Oh, then there are the various LISP machines, made in the late 70s---they
had tagged memory.  So in addition to the "data bits" part of the
"word", they also had "tag bits" that existly solely to impart type
information for the "data bits" part of the word.  So it's inaccurate to say
that a "word" is just a collection of undifferentiated set of bits.



> I used "word" exactly, I did not say "byte" or "bits", or "integer": "word"
> is the abstract term that covers other kind of data (here data which
> includes itself its own datatype information, something not encoded at all
> in "words" used by CPU where datatype is implicit and unchangeable, and
> only depends on the instructions in code, plus some other constraints like
> the state of internal registers, notably those controlling access to
> external memory when these words are used as "adresses" by specifically
> instructions).

  I could not follow this at all.  

  -spc 

[1]	For me, the 8088 has a 16-bit word, and the 68000 a 32-bit word, but
	I'm a software engineer.  Were I an electrical engineer, I'd give a
	different answer.

[2]	Never actually released as far as I can tell.