|
|
|
|
|
by wtbob
3573 days ago
|
|
> To reinterpret a 64-bit number as 32-bit in BE, you have to add 4 bytes to your pointer. In LE, the pointer doesn't change. But one shouldn't do that very often: those are two different types. The slight cost of adding a pointer is negligible. > Just about any arithmetic operation on integers (e.g. adding) starts from the least-significant bits and moves up. It's nice if that can mean iterating forward from the start instead of backwards from the end, e.g. when implementing a "bignum" library. -- is a thing, just as ++ is. > There's really no good argument for big-endian encoding except that it's the ordering that we humans use in writing. That's like saying, 'there's really no good argument for pumping nitrogen-oxygen mixes into space stations except that it's the mixture we humans use to breathe.' It's simplicity itself for a computer to do big-endian arithmetic; it's horrible pain for a human being who has to read a little-endian listing. A computer can be made to do the right thing. Who is the master: the computer or the man? |
|