Jump to content

Octet

From Rosetta Code

An octet is a byte of exactly 8 bits. An array of octets, string of octets, or octet stream contains a whole number of bytes, being a multiple of 8 bits.

In ancient history, computers had different sizes for bytes. Different systems had 7-bit bytes, 8-bit bytes, or 9-bit bytes. (The PDP-10 was famous for its 36-bit words, where each word can hold 5 of 7-bit bytes, or 4 of 9-bit bytes.) The word "octet" specifies the 8-bit flavor.

A long time ago, the 8-bit bytes became ubiquitous. (Folks invented the PDP-11, and the 8086, and the 6502, and so on.) These days, a "byte" and an "octet" are exactly the same thing, unless you have an extremely old computer. Many programming languages prefer "byte" over "octet".

Cookies help us deliver our services. By using our services, you agree to our use of cookies.