A binary file is any file on your computer other than text files. They are known as “binary” because all files on your computer are stored as 0s and 1s, known as binary form. Binary files can include such items as sound files, graphics files, or software.
A binary file, unlike an ASCII file, contains more than plain text. It may contain additional code information for photos, sounds, a spreadsheet, or formatted word-processing text. Binary files are frequently referred to as binaries.
Also See: ASCII
Frequently Asked Questions
Why 0 and 1?
Despite everything they can do, at their most basic level, computers only understand two commands: 0 and 1. In order to accomplish complex tasks, they need to string together several combinations of those two letters, each representing something different to the computer.
While that’s fine for the computer to read, an endless list of 1s and 0s doesn’t make much sense to people, so higher level programming code has been developed that people can understand and computers can interpret. Every file on your computer, regardless of its content, is somehow made up of a language that the computer interprets in its own binary form. Yes, even that hilarious cat video you just downloaded from YouTube is just 1s and 0s to your computer, albeit very funny 1s and 0s.
What is the difference between a binary file and a text file?
Text files can only represent a limited number of characters, so they are much easier for a computer to translate into binary code. For example, while an ASCII file can contain any length of text from a short note to an entire novel, that text can only utilize a predefined selection of 128 letters, numbers, special characters, and formatting features. While other text systems may permit a larger character set, they are still generally much simpler than other types of files, such as software program and media files.
Text files can also be edited in a simple text editor. Attempting to open a binary file in a text editor will result in a long, indecipherable stream of 1s and 0s. Binary files require more complex applications to view and edit, such as hex editors, graphics editor, or other file-type specific applications.
Can I make changes to a binary file?
When you think of editing a binary file, it’s probably better to think of it not as a binary file, but as a specific type of program file. For instance, an MP3 file, commonly used for storing music on the Internet, is a type of binary file, but in order to edit an MP3, you need special audio-editing software specifically designed to handle the MP3 format. MS Word documents, though primarily used for editing text, also contain a number of additional elements that text editors cannot handle, such as formatting rules, embedded pictures, and special font information; therefore, they must be opened in MS Word or a compatible word processing program. Binary files can be created in an infinite number of formats, and each format requires its own special handling.