The Use of Octets in Computers and Networking

Octets are bytes... sometimes

In computer and network technology, an octet represents an 8-bit quantity. Octets range in mathematical value from 0 to 255. The term octet is also used in other contexts, such as musical performance, to refer to a group of eight people or parts.

Octets vs. Bytes

All modern computer systems implement a byte as an eight-bit quantity. Octets and bytes are the same from this perspective. For this reason, the two terms are used 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 four-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 commonly found in Internet protocol (IP) addressing, in which the four bytes of an IPv4 address consist of four octets. In dotted-decimal notation, an IP address appears as [octet].[octet].[octet].[octet], as in

An IPv6 address contains 16 octets rather than four. Whereas IPv4 notation separates every single octet with a dot (.), IPv6 notation separates pairs of octets with a colon(:), for example, [octet][octet]:[octet][octet]: ... :[octet][octet].

Headers and Footers

Octets also refer to individual byte units within network protocol headers and footers. Network engineers sometimes classify protocols as octet stuffing or octet counting.

  • An octet stuffing protocol supports message units with 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 in the protocol header.

Both approaches allow message recipients to determine when they are finished processing the incoming data. Each has advantages depending on the intended use 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.

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 the user to identify the file type of an octet stream by saving the file with a specific filename extension.

Was this page helpful?