PDA

View Full Version : Bits, Nibbles, Bytes, Words'n stuff



per
January 11th, 2009, 02:40 PM
As we all know, a bit is an 1 or a 0. Everybody have agreed of that since the early days of computing.

I don't know the background for the Nibble, but most people associate it with a 4-bit value.

Bytes have been around since the early days of microcomputers, reffering to an 8-bit value.

But Words.
Originally a word was the bit-size of one adress in memory. This could vary from just a few bits but typically something more like around twenty bits. When Intel made the 8008, 8080, and 8085, they used a word length of 8 bits. However, the 8086 got an data bus of 16 bits, and as of I guess, it should then use 16-bit words. But intel also made the 8088. This only had a 8-bit data bus, and was operating with 8-bit words, however, Intel somehow standarized one word to 16-bit.

My question is: Do the 8086 see one word at one adress as 2 bytes in one adress (like: Mov [DS:0234h],ax only stores data in DS:0234h), or does it see it as 1 byte over 2 adresses (mov [DS:0234h],ax uses both DS:0234h and DS:0235h)?

mbbrutman
January 11th, 2009, 02:52 PM
The 8086 sees one word (16 bits) as two bytes at two different addresses.

And to be technically correct, the address should be aligned on a 16 bit boundary. For example, an address ending in a 0 is capable of addressing a byte or a word, while an address ending in a 1 is only capable of addressing a single byte.

8086 will handle unaligned word accesses to memory, but they get broken up into byte operations.

Chuck(G)
January 11th, 2009, 03:33 PM
And before there were bytes and nibbles (old spelling: "nybble"), there were syllables and parcels. But "snaque" is the coolest term that I've ever run into.

carlsson
January 11th, 2009, 04:04 PM
I remember some discussion I had about 14 years ago with elders in computer science, who claimed the term "byte" could mean a varying number of bits depending on the architecture, e.g. on a 36-bit PDP a byte would be longer than it is on a 8-bit micro computer. I am not sure if it was a case of term misuse and they really meant "word" (which I agree depends on the architecture), or if in the old days the size of a byte also depended on which computer you spoke about. Chuck, as you seem like one of those CS elders, any insight on this?

tezza
January 11th, 2009, 04:30 PM
I remember some discussion I had about 14 years ago with elders in computer science, who claimed the term "byte" could mean a varying number of bits depending on the architecture, e.g. on a 36-bit PDP a byte would be longer than it is on a 8-bit micro computer. I am not sure if it was a case of term misuse and they really meant "word" (which I agree depends on the architecture), or if in the old days the size of a byte also depended on which computer you spoke about. Chuck, as you seem like one of those CS elders, any insight on this?

Hmm..I seem to remember this too. A byte for a 4-bit processor was 4 bits, for an 8-bit processor, 8 bits and so on?

Tez

Chuck(G)
January 11th, 2009, 04:46 PM
6 bit "bytes" were not uncommon and there were a few systems (e.g. IBM Stretch) that had a variable byte size. I think the Univac 1107/1108 had a similar capability.

But historically, there's no authority to insist that a byte is 8 bits--its coinage predates IBM's 8 bit systems. Many programmers used the term "byte" when they meant the same number of bits a character occupies, but not necessarily a character value--much the same way we do now.

FWIW, a "snaque" when I saw it mentioned, was 56 bits (less than a word, but more than a byte; quiz: name the machine).

Come to think of it, I'm not sure that IBM liked the idea of "byte" when S/360 was introduced. Although their documentation was full of the word, the opcode mnemonics stayed with "character". For example, IC (Insert Character) and MVC (move characters).

patscc
January 11th, 2009, 05:50 PM
You guys forgot slab.
http://wapedia.mobi/en/Slab_(NCR)
patscc

pontus
January 11th, 2009, 11:20 PM
I remember some discussion I had about 14 years ago with elders in computer science, who claimed the term "byte" could mean a varying number of bits depending on the architecture, e.g. on a 36-bit PDP a byte would be longer than it is on a 8-bit micro computer.

This triggered a memory of me speaking to one of the "elders" in the computer club. He mentioned the capability of the PDP-10(36 bit machine) to use an arbitrary number of bits for a byte. And indeed, I found this quote on wikipedia(PDP-10 (http://en.wikipedia.org/wiki/PDP-10)):


Some aspects of the instruction set are unique, most notably the "byte" instructions, which operated on arbitrary sized bit-fields (at that time a byte was not necessarily eight bits).

DEC had some peculiarities in their machines.. look up "middle-endian" :)

carlsson
January 12th, 2009, 01:12 AM
So on a PDP-10 a word is 36 bits but a byte can in theory be 1-35 bits?

pontus
January 12th, 2009, 02:31 AM
So on a PDP-10 a word is 36 bits but a byte can in theory be 1-35 bits?

From what I gather at least. But I don't know what was common practice, possibly most people used 7 or 8 bits most of the time anyway.

patscc
January 12th, 2009, 06:36 AM
CDC-6600's, Cray's famous big box. used, used a 6-bit character "byte"
patscc

Chuck(G)
January 12th, 2009, 09:24 AM
From what I gather at least. But I don't know what was common practice, possibly most people used 7 or 8 bits most of the time anyway.

When I ported Adventure from a Decsystem-10 tape given to me by a DEC FE, I noted that 5 7-bit characters were stored in each 36-bit word.

There were loads of 6-bit character machines before 1970. But I don't recall how many of them officially used the word "byte" to describe the bit quantum occupied by a character.

Note that on a CDC 6600, the notion of a fixed byte isn't enforced at all in the CPU itself. The PPUs use 12-bit words; the CPU isn't byte-addressable. Peripherals used 6-bit characters. But cramming 8 bit characters into a 60-bit word leads to some interesting programming and breaks a lot of existing code. The scheme eventually adopted, ISTR, was to use 6 bits of 00 as a control flag to indicate lowercase characters following.

valency
January 14th, 2009, 01:13 PM
I remember some discussion I had about 14 years ago with elders in computer science, who claimed the term "byte" could mean a varying number of bits depending on the architecture, e.g. on a 36-bit PDP a byte would be longer than it is on a 8-bit micro computer. I am not sure if it was a case of term misuse and they really meant "word" (which I agree depends on the architecture), or if in the old days the size of a byte also depended on which computer you spoke about.

No, they were using the term correctly according to the jargon of their day. A "byte" is the smallest addressable unit of memory on a machine. A "word" is the standard size of data the processor operates on, ie the usual register size. The industry standardised on 8-bit bytes, but they needn't have. The CDC Cyber had 36-bit words and 12-bit bytes, for example.

mbbrutman
January 14th, 2009, 01:36 PM
And what a relevant and on-topic first post. Welcome to the group!

Chuck(G)
January 14th, 2009, 01:37 PM
No, they were using the term correctly according to the jargon of their day. A "byte" is the smallest addressable unit of memory on a machine. A "word" is the standard size of data the processor operates on, ie the usual register size. The industry standardised on 8-bit bytes, but they needn't have. The CDC Cyber had 36-bit words and 12-bit bytes, for example.

Nope, the CDC Cyber had 60 bit words and the smallest addressable unit on the CPU is a word (60 bits). I'm certain that there are other more modern (i.e. RISC) architectures that lack character-level addressability but still refer to "byte" quantities. It's true that the PPUs had 12 bit words, but they didn't share the CPU architecture--theirs resembled the 160-A more. As if that weren't confusing enough, several peripheral controllers (e.g. for the 844 disk drives and the 66x tapes) used a 16-bit 1700-style architecture. And there were two 6-bit character sets in use on the machine--an internal "display code" and an external "BCD" (based on the IBM 7090 code).

On the other hand, the smallest addressable unit on the CDC STAR was 1 bit. But we still talked about 8-bit bytes--and the assembly mnemonics made use of the term (e.g. "Search Masked Key Byte").

In the end, I don't imagine that sub-word addressability contributes a lot to the utility of a given architecture and that "byte" addressability plays a part in whether or not the term "byte" applies.