The Use of Octets in Computers and Networking

Piano Octet (1929)
Piano Octet (1929). Moviepix - Getty Images

In computer and network technology, an octet represents any 8-bit quantity. Octets range in mathematical value from 0 to 255.

The term octet is used in other contexts, also — primarily musical performances — to refer to a group of eight people or parts.

Octets vs. Bytes

All modern computer systems implement a byte as an 8-bit quantity. Octets and bytes are the same from this perspective. For this reason, some people use the two terms interchangeably.

Historically, however, computers have supported bytes having different numbers of bits; octets and bytes mean different things in this context. Network professionals began using the term octet many years ago to maintain this distinction.

Computer systems engineers often use the term nibble when referring to a 4-bit quantity (half of one octet or byte) rather than calling it a "half octet" (or "quartet," as is common in music).

Octet Strings in IP Addresses and Network Protocols

The term octet string refers to a collection of any number of related octets. Octet strings are most commonly found in Internet protocol (IP) addressing, in which the 4 bytes of an IPv4 address consist of 4 octets. In dotted-decimal notation, an IP address appears as follows:

[ octet ] . [ octet ] . [ octet ] . [ octet ]

For example:

192.168.0.1

An IPv6 address contains 16 octets rather than four. Whereas IPv4 notation separates each single octet with a dot (.), IPv6 notation separates pairs of octets with a colon, as follows:

[octet][octet]:[octet][octet]::::::[octet][octet]

Octets also can refer to individual byte units within network protocol headers or footers. Network engineers sometimes classify protocols as octet stuffing or octet counting. An octet-stuffing protocol supports message units with special (hard-coded) sequences of bits (one or more octets) inserted to signify the end of the message.

An octet counting protocol supports message units with their sizes (number of octets) encoded within the protocol header. Both approaches allow message recipients to determine when they are finished with processing the incoming data, although each has its advantages depending on the intended usage of the protocol. (A third method, called connection blasting, has the message sender terminate its end of the connection to signify that no more data is being sent.)

What Is an Octet Stream?

In web browsers, the MIME type application/octet-stream refers to a binary file that is delivered by the server over an HTTP connection. Web clients typically use octet streams when working with multiple types of binary files and when they're unable to recognize the type by its file name or to assume any one particular format.

Browsers often prompt to the user to identify the file type of an octet stream by saving the file with a specific filename extension.