Share on Facebook Share on Twitter Email
Answers.com

Binary file

 
Sci-Tech Dictionary: binary file
(′bīn·ə·rē ′fīl)

(computer science) A computer program in machine language that can be directly executed by the computer.


Search unanswered questions...
Enter a question here...
Search: All sources Community Q&A Reference topics

A computer file format in which each character position can hold any one of 256 different binary codes. Binary files are contrasted to "ASCII files," which contain a smaller set of codes for only alphabetic letters, numeric digits, special symbols and a few control codes. Binary files can contain ASCII and many more codes because they use all eight bits of the byte, whereas ASCII files use only seven bits, which limits the possible combinations.

Executable software (machine language programs), most word processing files and database, spreadsheet and multimedia files are binary files. However, text and source program files as well as HTML and XML files are ASCII text files, not binary.

Attachments Must Be Encoded

The binary vs. ASCII distinction is made when attaching files via e-mail. The Internet's SMTP mail protocol supports only ASCII. When binary files are attached to e-mail messages, their 8-bit format is converted into a temporary 7-bit format to pass through mail servers, especially older ones. Encoding formats such as MIME, UUcoding and BinHex are used, and at the receiving end, they convert the 7-bit code back into 8-bit binary files. The 8-bit to 7-bit conversion makes attached files larger as they traverse the Internet. See binary, byte and ASCII.

Download Computer Desktop Encyclopedia to your iPhone/iTouch

WordNet: binary file
Top
Note: click on a word meaning below to see its connections and related words.

The noun has one meaning:

Meaning #1: (computer science) a computer file containing machine-readable information that must be read by an application; characters use all 8 bits of each byte


Wikipedia: Binary file
Top
A hex dump of the 318 byte Wikipedia favicon, or Wikipedia-favicon.png. The first column numerates the line's starting address, while the * indicates repetition.

A binary file (commonly, but not necessarily, with the extension .bin) is a computer file which may contain any type of data, encoded in binary form for computer storage and processing purposes; for example, computer document files containing formatted text. Many binary file formats contain parts that can be interpreted as text; binary files that contain only textual data - without, for example, any formatting information - are called plain text files. In many cases, plain text files are considered to be different from binary files because binary files are made up of more than just plain text. When downloading, a completely functional program without any installer is also often called program binary, or binaries (as opposed to the source code).

Contents

Structure

Binary files are usually thought of as being a sequence of bytes, which means the binary digits (bits) are grouped in eights. Binary files typically contain bytes that are intended to be interpreted as something other than text characters. Compiled computer programs are typical examples; indeed, compiled applications (object files) are sometimes referred to, particularly by programmers, as binaries. But binary files can also contain images, sounds, compressed versions of other files, etc. — in short, any type of file content whatsoever.

Some binary files contain headers, blocks of metadata used by a computer program to interpret the data in the file. For example, a GIF file can contain multiple images, and headers are used to identify and describe each block of image data. If a binary file does not contain any headers, it may be called a flat binary file.

Manipulation

To send binary files through certain systems (such as e-mail) that do not allow all data values, they are often translated into a plain text representation (using, for example, Base64). This encoding has the disadvantage of increasing the file's size by approximately 30% during the transfer, as well as requiring translation back into binary after receipt. See Binary-to-text encoding for more on this subject.

Microsoft Windows allows the programmer to specify a system call parameter indicating if a file is text or binary; Unix does not, and treats all files as binary. This reflects the fact that the distinction between the two types of files is to a certain extent arbitrary.

Viewing

A hex editor or viewer may be used to view file data as a sequence of hexadecimal (or decimal, binary or ASCII character) values for corresponding bytes of a binary file.

If a binary file is opened in a text editor, each group of eight bits will typically be translated as a single character, and you will see a (probably unintelligible) display of textual characters. If the file were opened in some other application, that application will have its own use for each byte: maybe the application will treat each byte as a number and output a stream of numbers between 0 and 255 — or maybe interpret the numbers in the bytes as colors and display the corresponding picture. If the file is itself treated as an executable and run, then the operating system will attempt to interpret the file as a series of instructions in its machine language.

Interpretation

Standards are very important to binary files. For example, a binary file interpreted by the ASCII character set will result in text being displayed. A custom application can interpret the file differently, a byte may be a sound, or a pixel, or even an entire word. Binary itself is meaningless, until such time as an executed algorithm defines what should be done with each bit, byte, word or block. Thus, just examining the binary and attempting to match it against known formats can lead to the wrong conclusion as to what it actually represents. This fact can be used in steganography, where an algorithm interprets a binary data file differently to reveal hidden content. Without the algorithm, it is impossible to tell that hidden content exists.

Binary compatibility

Two files that are binary compatible will have the same pattern of zeros and ones in the data portion of the file. The file header, however, may be different.

The term is used most commonly to state that data files produced by one application are exactly the same as data files produced by another application. For example, some software companies produce applications for Windows and the Macintosh that are binary compatible, which means that a file produced in a Windows environment is interchangeable with a file produced on a Macintosh. This avoids many of the conversion problems caused by importing and exporting data.

See also


 
 

 

Copyrights:

Sci-Tech Dictionary. McGraw-Hill Dictionary of Scientific and Technical Terms. Copyright © 2003, 1994, 1989, 1984, 1978, 1976, 1974 by McGraw-Hill Companies, Inc. All rights reserved.  Read more
Computer Desktop Encyclopedia. THIS COPYRIGHTED DEFINITION IS FOR PERSONAL USE ONLY.
All other reproduction is strictly prohibited without permission from the publisher.
© 1981-2009 Computer Language Company Inc.  All rights reserved.  Read more
WordNet. WordNet 1.7.1 Copyright © 2001 by Princeton University. All rights reserved.  Read more
Wikipedia. This article is licensed under the Creative Commons Attribution/Share-Alike License. It uses material from the Wikipedia article "Binary file" Read more