Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Unfortunately, it used big endian, whereas the DCPU-16 specifications called for little endian. This led to a severe bug in the included drivers, causing a requested sleep of 0x0000 0000 0000 0001 years to last for 0x0001 0000 0000 0000 years.

Mh, looks like he is off by a factor of 256 :)



The DCPU isn't byte-addressable - all memory addresses refer to 16-bit words. Endianness mixups would result in swapping 16-bit words, not 8-bit bytes.


I was under the impression that a byte is defined as the smallest unit of addressable memory; in the case of DCPU that would be a 16-bit byte.


That is an old meaning, which is slowly falling out of favor - it's very common to mean "8 bits" when you say byte.

Per Wikipedia - "The size of the byte has historically been hardware dependent and no definitive standards existed that mandated the size. The de facto standard of eight bits is a convenient power of two permitting the values 0 through 255 for one byte. With ISO/IEC 80000-13, this common meaning was codified in a formal standard. Many types of applications use variables representable in eight or fewer bits, and processor designers optimize for this common usage. The popularity of major commercial computing architectures have aided in the ubiquitous acceptance of the 8-bit size.[3]

The term octet was defined to explicitly denote a sequence of 8 bits because of the ambiguity associated at the time with the term byte."


If byte and octet become synonymous, what do we call the smallest addressable unit of memory?


Probably, the places that actually care about the difference will continue to use "byte", even though no one else will understand.

When I worked in embedded, whenever people were working on non-8-bit processors, they used the words "byte", "word", and "double word" in this way.


I would call that the word size. The word would be 2 bytes of 8 bits each.


I wouldn't - x86 does not have 8bit words...


Oh, I see. Thanks!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: