3 ms·
Wait, isn't this the definition of a byte?
by Yoric 7y ago
Wait, isn't this the definition of a byte?
- sanxiyn 7y agoIt isn't in Texas Instruments TMS320. I will quote from http://processors.wiki.ti.com/index.php/C89_Support_in_TI_Compilers http://processors.wiki.ti.com/index.php/C89_Support_in_TI_Co... > The C standard uses the term byte to mean the minimum addressable unit in the implementation, which is char, which means a byte on these targets is 16 bits. This is in conflict with the widespread use of byte to mean 8 bits exactly. This is an unfortunate disagreement between C terminology and widespread industry terminology that TI can't do anything about.
- detaro 7y agoByte is also often defined as the smallest addressable unit in a computer. Which nowadays most commonly is 8 bit, to the point where you can generally assume it, but this was different in the past (6 and 9 bit being especially common alternatives) and is still in some niches like DSPs, which sometimes only can work on wider types. But at least those then are typically powers of two, which makes it easier for many tools.
- hyperman1 7y agoAbsolutely not. A byte is the smallest block of memory with an address. E.g you can't take the address of 7 combined bits on x86 but you can for 8. In the past, architectures differed wildly in number of bits per byte, e.g 36 for the machine where the Pascal language was created. Today, the industry mostly standardized on 8 bits per byte, but see e.g the PIC architecture for an example relevant today with a different choice: 8 bit bytes for data, but 10 bit bytes for instructions. https://en.m.wikipedia.org/wiki/PIC_microcontrollers https://en.m.wikipedia.org/wiki/PIC_microcontrollers
- cwzwarich 7y ago> A byte is the smallest block of memory with an address. E.g you can't take the address of 7 combined bits on x86 but you can for 8. I think that's an anachronistic/incorrect usage. A lot of machines (including several with 36-bit words that you mentioned) supported larger basic addressable units of memory, but didn't call these larger units "bytes", and distinguished between "bytes" and "words". In fact, one of the elements of the early RISC philosophy was that CPU support for byte accesses (as opposed to word accesses) was extraneous, based on statistics gathered from real programs. Early MIPS/Alpha/etc. machines did not support byte addressing, but the people using them still called 8 bits a byte.
- justincormack 7y agoArguably the first Alphas could have had a C compiler with 64 bit bytes but that would have made porting hard. Even then they were forced to add byte operations pretty early on.