answersLogoWhite

0

There is no single answer to this question. A byte is universally defined as a tuple of 8 bits (sometimes bytes are also called octets, therefore).

However, a word commonly refers to the natural word for a given processor, that is the processor's preferred entity for arithmetic operations. The word is therefore typically defined by the processor's ALU width.

Typical 8, 16 or 32 bit processors have 8, 16 or 32 bit words (containing 1, 2 or 4 bytes), respectively. Other processors have another word size, such as 3 bytes per word, or 8.

In Windows programming, a word is often thought to refer to a 16 bit entity, mostly because the classic 32-bit Windows API makes frequent use of DWORD, a double-word, 32 bits or 4 bytes wide. However, these data types are not generally portable and are not recommended for use outside the specific context of this API.

User Avatar

Wiki User

12y ago

Still curious? Ask our experts.

Chat with our AI personalities

BeauBeau
You're doing better than you think!
Chat with Beau
FranFran
I've made my fair share of mistakes, and if I can help you avoid a few, I'd sure like to try.
Chat with Fran
JudyJudy
Simplicity is my specialty.
Chat with Judy
More answers

Although a byte is typically 8-bits in length, there is no standard that actually specifies this. In general we say that a byte is the smallest unit of memory that may be addressed and since ANSI code pages use 7-bit encoding, a byte must be at least 7 bits in length. However, an 8-bit byte is notationally more convenient as we can represent any value it may hold using 2 hexadecimal digits, where each digit represents half-a-byte (commonly known as a nybble). In C++, all data types are measured in terms of whole bytes, however the standard does not specify the length of a byte other than it must be at least 8 bits. The char data type is the smallest data type and always has a length of 1 byte.

The length of a word is machine dependent but is typically some multiple of 8-bit bytes. For instance, a 32-bit system is said to have a word length of 4 bytes because that's the largest value that will fit in a single CPU register. A 64-bit system therefore has a word length of 8 bytes.

Some programming languages consider a word to be two bytes in length and a double word as being four bytes in length. However, these definitions are not universal and the actual lengths can vary according to the underlying architecture, even within the same language (different implementations may use different definitions).

User Avatar

Wiki User

10y ago
User Avatar

4, since by definition a byte is made up of 8 bits.

User Avatar

Wiki User

16y ago
User Avatar

4 bytes in 32 bits.

User Avatar

Wiki User

16y ago
User Avatar

Add your answer:

Earn +20 pts
Q: How long is a word and byte?
Write your answer...
Submit
Still have questions?
magnify glass
imp