Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How many bits is a "word"?

Tags:

byte

bit

This is from the book Assembly Language Step By Step, Jeff Duntemann:

Here’s the quick tour: A bit is a single binary digit, 0 or 1. A byte is 8 bits side by side. A word is 2 bytes side by side. A double word is 2 words side by side. A quad word is 2 double words side by side.

And this is from the book Principles of Computer Organization and Assembly Language: Using the Java Virtual Machine, Patrick Juola:

For convenience, 8 bits are usually grouped into a single block, conventionally called a byte. The next-largest named block of bits is a word. The definition and size of a word are not absolute, but vary from computer to computer. A word is the size of the most convenient block of data for the computer to deal with.

So is a word 2 bytes (16 bits), or is it the most convenient block of data for the computer to deal with? (I am also not sure what this means..)

like image 525
Koray Tugay Avatar asked Jan 21 '15 11:01

Koray Tugay


People also ask

Is a word always 32 bits?

In Intel docs, a "Word" (Win32 WORD ) is 16 bits. A "Doubleword" (Win32 DWORD ) is 32 bits. A "Quadword" (Win32 QWORD ) is 64 bits.

Is word 16 bit or 32 bit?

WORD is a Windows specific 16-bit integer type, and is hardware independent.


1 Answers

I'm not familiar with either of these books, but the second is closer to current reality. The first may be discussing a specific processor.

Processors have been made with quite a variety of word sizes, not always a multiple of 8.

The 8086 and 8087 processors used 16 bit words, and it's likely this is the machine the first author was writing about.

More recent processors commonly use 32 or 64 bit words.

In the 50's and 60's there were machines with words sizes that seem quite strange to us now, such as 4, 9 and 36. Since about the 70's word size has commonly been a power of 2 and a multiple of 8.

like image 100
Don Roby Avatar answered Sep 25 '22 07:09

Don Roby