mardi 28 juillet 2020

what is "powers of 2" and "word"?

I'm recently following C++ Primer Book In chapter 2 and I'm at this point

Most computers deal with memory as chunks of bits of sizes that are powers of 2. The smallest chunk of addressable memory is referred to as a “byte.” The basic unit of storage, usually a small number of bytes, is referred to as a “word.” In C++ a byte has at least as many bits as are needed to hold a character in the machine’s basic character set. On most machines a byte contains 8 bits and a word is either 32 or 64 bits, that is, 4 or 8 bytes.

Most computers associate a number (called an “address”) with each byte in memory. On a machine with 8-bit bytes and 32-bit words, we might view a word of memory as follows

I don't understand well what does he mean with chunks of bits of sizes that are powers of 2 and what's a word also? he say a small number of bytes but that's not clear for me, can anyone explain?

Aucun commentaire:

Enregistrer un commentaire