Byte

Share

The byte is an unit used to measure computer file sizes and data sizes. Just like grams measure weights and meters measure distances, bytes measure data. A single byte is equivalent to 8 bits. A single byte can contain enough data to represent a binary number from 0000000 to 1111111, which is equivalent to a decimal number from 0 to 255, or from -128 to 127 if you treat a bit as a sign flag, or a single text character (letter, number, punctuation, space, etc.) under ASCII text encoding. Because a single byte has 256, or 162 possible values, it's sometimes represented by 2 hexadecimal digits (e.g. 00, 0F, A0, FF, etc.). With 3 bytes, you can represent a single RGB color (00FF00 would be green). With 4 bytes, a RGBA color.

The RAM memory of a computer is typically byte-addressable, which means there's an unique address for each byte in the memory. A 32-bit processor uses 32 bits (or 4 bytes) to address the memory. For example, BAADF00D could be a 4-byte memory address. With 4 bytes, you can represent a decimal number from 0 to 4294967295 (232 possible values). Consequently, a 32 bit processor would only be able address and thus use up to 4 gibibytes of RAM (around 4 gigabytes). In a 64 bit processor, the same sort of limitation exist, but now a single address is 8 bytes long, which means we can have 264 memory addresses, and that's enough addresses to address 16 exbibytes worth of RAM (around 18 exabytes).

Comments

Leave a Reply

Leave your thoughts! Required fields are marked *