3 ms·
But how many bytes are there in a word?
by throwaway889900 2y ago
But how many bytes are there in a word?
- o11c 2y agoIf you're on x86, the answer can be simultaneously 16, 32, and 64.
- wvenable 2y ago"Word" is an outdated concept we should try to get rid of.
- pclmulqdq 2y agoIt's very useful on hardware that is not an x86 CPU.
- wvenable 2y agoAs an abstraction on the size of a CPU register, it really turned out to be more confusing than useful.
- o11c 2y agoFortunately we have `register_t` these days.
- bobmcnamara 2y agoIs it 32 or 64 bits on ARM64? Why not both?
- billti 2y agoARM64 has a 32-bit word, even though the native pointer size and general register size is 64 bits. To access just the lower 32 bits of a register Xn you refer to it as Wn.
- pclmulqdq 2y agoOn RISC machines, it can be very useful to have the concept of "words," because that indicates things about how the computer loads and stores data, as well as the native instruction size. In DSPs and custom hardware, it can indicate the only available datatype. The land of x86 goes to great pains to eliminate the concept of a word at a silicon cost.
- iwaztomack 2y agosuch as...?
- anigbrowl 2y agoYou're right. To be consistent with bytes we should call it a snack.
- SCUSKU 2y agoHenceforth, it follows that a doublesnack is called a lunch. And a quadruplesnack a fourthmeal.
- iwaztomack 2y agoor an f-word
- tetron 2y agoThere's only one right answer: Nybble - 4 bits Byte - 8 bits Snyack - 16 bits Lyunch - 32 bits Dynner - 64 bits
- cozzyd 2y agoAnd what about elevensies? (Ok,. I guess there's a difference between bits and hob-bits)
- kstrauser 2y agoIn the spirit of redefining the kilobyte, we should define byte as having a nice, metric 10 bits. An 8 bit thing is obviously a bibyte. Then power of 2 multiples of them can include kibibibytes, mebibibytes, gibibibytes, and so on for clarity.
- jaysonvantuyl 2y agoಠ_ಠ
- xigoi 2y agoThis is incompatible with cultures where lunch is bigger than dinner.
- BlueTemplar 2y agoHow exactly ? How else do you suggest CPUs do addressing ? Or are you suggesting to increase the size of a byte until it's the same size as a word, and merge both concepts ?
- wvenable 2y agoI'm saying the term "Word" abstracting the number of bytes a CPU can process in a single operation is an outdated concept. We don't really talk about word-sized values anymore. Instead we mostly explicit on the size of value in bits. Even the idea of a CPU having just one relevant word size is a bit outdated.
- kevin_thibedeau 2y agoAppeasing that attitude is what prevented Microsoft from migrating to LP64. Would have been an easier task if their 32-bit LONG type never existed, they stuck with DWORD, and told the RISC platforms to live with it.
- Taniwha 2y agoI've seen 6 8-bit characters/word (Burroughs large systems, they also support 8 6-bit characters/word)
- elteto 2y agoThere are 4 bytes in word: const char word[] = {‘w’, ‘o’, ‘r’, ‘d’}; assert(sizeof word == 4);