Browse Definitions :
Definition

binary file

What is a binary file?

A binary file is a file whose content is in a binary format consisting of a series of sequential bytes, each of which is eight bits in length. The content must be interpreted by a program or a hardware processor that understands in advance exactly how that content is formatted and how to read the data. Binary files include a wide range of file types, including executables, libraries, graphics, databases, archives and many others.

Electronic files are typically categorized as either binary files or text files. It could be argued that text files are also a type of binary file because, like any electronic file, they're made up of sequences of bytes. However, the two are generally considered to be different types. Text files are in a human-readable format and typically adhere to specific character sets, such as Unicode.

How is a binary file used?

Binary files are not human readable and require a special program or hardware processor that knows how to read the data inside the file. Only then can the instructions encoded in the binary content be understood and properly processed.

The following screenshot shows part of the content from a file on a Mac computer. The content can be understood only by specific system architectures such as Mac. The file in this figure is a Unix executable binary file. As is typical with binary files, the file's content is a series of sequential bytes, lined up one after the other. Although we can view the bytes that make up the binary data, the file can be properly interpreted only by the target platform.

Ones and zeros making up the contents of a binary file
Example of a binary file, which consists of a series of sequential bytes lined up one after the other and can only be properly interpreted by the target platform -- in this case, Unix.

A binary file often includes some type of header that indicates the type of file. The header might include a few human-readable characters, but a binary file as a whole requires specific software or hardware to read the file and take action. On the other hand, a user can open a text file in a wide range of editors and make sense of the content without needing any special type of interpreter.

Binary files are commonly used when building applications and other types of software. However, developers do not work directly with the binary files. Instead, they build their applications in a high-level programming language such as C++ or Java. The languages use human-readable text files to define the application logic.

At certain intervals in the development process, the text files are submitted to a compiler that translates the source code into machine code, bytecode or another programming language. If the compiler generates bytecode, the bytecode will eventually be converted to machine code.

Machine code is submitted to a computer's processor in the form of binary files. The machine code files must target a specific computer platform, which refers to the combination of operating system and hardware architecture. For example, the binary machine code might target Windows and the Intel line of microprocessors, or it might target macOS and the Apple M-series chips. A different compiler is usually required for each computer platform.

In general, executable -- or ready-to-run -- programs are identified as binary files and given a filename extension such as .bin or .exe. Programmers often talk about an executable program as a binary or will refer to their compiled application files as binaries. These types of files might also be referred to as object code.

In terms of transmitting files from one place to another, a file can be transmitted as a binary, meaning the programs handling it don't attempt to look within it or change it. Instead, they just pass it along as a chunk of ones and zeros, the meaning of which is unknown to any network device.

Learn the differences between interpreted vs. compiled languages, declarative vs. imperative programming and Kotlin vs. Swift open source programming languages.

This was last updated in June 2022

Continue Reading About binary file

Networking
  • network management system

    A network management system, or NMS, is an application or set of applications that lets network engineers manage a network's ...

  • host (in computing)

    A host is a computer or other device that communicates with other hosts on a network.

  • Network as a Service (NaaS)

    Network as a service, or NaaS, is a business model for delivering enterprise WAN services virtually on a subscription basis.

Security
  • Common Vulnerability Scoring System (CVSS)

    The Common Vulnerability Scoring System (CVSS) is a public framework for rating the severity of security vulnerabilities in ...

  • Dridex malware

    Dridex is a form of malware that targets victims' banking information, with the main goal of stealing online account credentials ...

  • crypto wallet (cryptocurrency wallet)

    A crypto wallet (cryptocurrency wallet) is software or hardware that enables users to store and use cryptocurrency.

CIO
  • blockchain decentralization

    Decentralization is the distribution of functions, control and information instead of being centralized in a single entity.

  • outsourcing

    Outsourcing is a business practice in which a company hires a third party to perform tasks, handle operations or provide services...

  • chief operating officer (COO)

    A chief operating officer (COO) is the corporate executive who oversees ongoing business operations within the company.

HRSoftware
  • team collaboration

    Team collaboration is a communication and project management approach that emphasizes teamwork, innovative thinking and equal ...

  • employee self-service (ESS)

    Employee self-service (ESS) is a widely used human resources technology that enables employees to perform many job-related ...

  • learning experience platform (LXP)

    A learning experience platform (LXP) is an AI-driven peer learning experience platform delivered using software as a service (...

Customer Experience
  • market segmentation

    Market segmentation is a marketing strategy that uses well-defined criteria to divide a brand's total addressable market share ...

  • sales pipeline

    A sales pipeline is a visual representation of sales prospects and where they are in the purchasing process.

  • market basket analysis

    Market basket analysis is a data mining technique used by retailers to increase sales by better understanding customer purchasing...

Close