Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » What exactly is a "word"?
- SC_DStwo_Master
- Scratcher
100+ posts
What exactly is a "word"?
So I've been told a word is a number of bytes which many design aspects of a processor are based on. For example, on amd64 platforms a word is 8 bytes. The memory addresses are 8 bytes, the registers are 8 bytes, etc. But then programs like ghex refer to 2 bytes as a “word”, and 4 bytes as a “longword”. What is going on here?
Last edited by SC_DStwo_Master (Oct. 4, 2016 18:30:48)
- CodeLegend
- Scratcher
500+ posts
What exactly is a "word"?
According to the Windows calculator:
QWORD = 64 bits = 8 bytes
DWORD = 32 bits = 4 bytes
WORD = 16 bits = 2 bytes
QWORD = 64 bits = 8 bytes
DWORD = 32 bits = 4 bytes
WORD = 16 bits = 2 bytes
- gdpr533f604550b2f20900645890
- Scratcher
1000+ posts
What exactly is a "word"?
According to According to the Windows calculator:this Stack Overflow post, a word is the amount of bits that can be processed, and the Windows “words” are irrelevant to its definition.
QWORD = 64 bits = 8 bytes
DWORD = 32 bits = 4 bytes
WORD = 16 bits = 2 bytes
The size of a word varies between CPUs, so I have no idea why Ghex gave it a specific size.
Last edited by gdpr533f604550b2f20900645890 (Oct. 4, 2016 21:58:16)
- novice27b
- Scratcher
1000+ posts
What exactly is a "word"?
Yep. It depends on the architecture and context.According to According to the Windows calculator:this Stack Overflow post, a word is the amount of bits that can be processed, and the Windows “words” are irrelevant to its definition.
QWORD = 64 bits = 8 bytes
DWORD = 32 bits = 4 bytes
WORD = 16 bits = 2 bytes
The size of a word varies between CPUs, so I have no idea why Ghex gave it a specific size.
You could have some really obscure hardware with 7 bit words, for example.
i use arch btw
- CodeLegend
- Scratcher
500+ posts
What exactly is a "word"?
You could have some really obscure hardware with 7 bit words, for example.*shudders*
- novice27b
- Scratcher
1000+ posts
What exactly is a "word"?
https://www.ietf.org/rfc/rfc4042.txtYou could have some really obscure hardware with 7 bit words, for example.*shudders*
(that was an April Fools joke)
i use arch btw
- Discussion Forums
- » Advanced Topics
- » What exactly is a "word"?