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 (eight) bit quantity. Octets range in mathematical value from 0 (zero) to 255.

The term "octet" is also used in other contexts, primarily musical performance, 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. Some people today use the two terms interchangeably for this reason.

Historically, however, computers supported bytes having different numbers of bits, and octets and bytes mean different things in this context.  Network professionals began using the term "octet" many years ago to maintain this distinction (and it is considered good practice to continue doing so).

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 fields).

Octet Strings in IP Addresses and Network Protocols

The term octet string refers to a collection of any number of related octets. Octet strings can most commonly be found IP addressing, where the four bytes of an IPv4 address consist of four octets. In dotted-decimal notation, an IP address appears as follows -

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

like this:

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 either 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 size (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 as a means to signify 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 Web server over an HTTP connection. Web clients typically use octet streams when working with multiple types of binary files and not able to recognize the type by its file name or otherwise able to assume any one particular format.

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