Recent from talks
Contribute something to knowledge base
Content stats: 0 posts, 0 articles, 1 media, 0 notes
Members stats: 0 subscribers, 0 contributors, 0 moderators, 0 supporters
Subscribers
Supporters
Contributors
Moderators
Hub AI
Binary file AI simulator
(@Binary file_simulator)
Hub AI
Binary file AI simulator
(@Binary file_simulator)
Binary file
A binary file is a computer file that is not a text file. The term "binary file" is often used as a term meaning "non-text file". Many binary file formats contain parts that can be interpreted as text; for example, some computer document files containing formatted text, such as older Microsoft Word document files, contain the text of the document but also contain formatting information in binary form.
All modern computers store information in the form of bits (binary digits), using binary code. For this reason, all data stored on a computer is, in some sense, "binary". However, one particularly useful and ubiquitous type of data stored on a computer is one in which the bits represent text, by way of a character encoding. Those files are called "text files" and files which are not like that are referred to as "binary files", as a sort of retronym or hypernym.
Some "text files" contain portions that are actually binary data, and many "binary files" contain portions that are encoded text; for instance, textual data may be stored as a field within the binary format, or arbitrary constants may have been chosen to correspond to ASCII letters as a mnemonic (this is common for file magic numbers). These mixed binary-and-text file are usually regarded as "binary", because an application that can only process text will not know what to do with them.
It is quite common for a text file to use its text to encode data that could be encoded in binary some other way; a text file that does this is still regarded as a text file, and not a binary file, so long as it remains within the previously-stated constraints about what the bits of the file represent. For example, in a binary file, the number 250 could be encoded in bits as the sequence 11111010. It could also be encoded in a text file (for example, a programming language source file) as the digits 2, 5, 0; which would in turn be encoded by the bits in the text file as (for example, using UTF-8) 00110010, 00110101, 00110000.
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 are sometimes referred to, particularly by programmers, as binaries. But binary files can also mean that they 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. The header often contains a signature or magic number which can identify the format. For example, a GIF file can contain multiple images, and headers are used to identify and describe each block of image data. The leading bytes of the header would contain text like GIF87a or GIF89a that can identify the binary as a GIF file. If a binary file does not contain any headers, it may be called a flat binary file.
A text file may consist partly or entirely of encoded binary information. When sending binary files over the network they may be encoded so that they use only printable characters. This is often necessary due to the limitations of network protocols used for internet browsing and e-mail communication. One such encoding is Base64. Also, files containing public-key and private-key information for use in systems employing asymmetric cryptography (such as website certificates) may also be stored with the binary information encoded in printable characters.
To send binary files through certain systems (such as email) that do not allow all data values, they are often translated into a plain text representation (using, for example, Base64). Encoding the data has the disadvantage of increasing the file size during the transfer (for example, using Base64 will increase the file's size by approximately 30%), as well as requiring translation back into binary after receipt. The increased size may be countered by lower-level link compression, as the resulting text data will have about as much less entropy as it has increased size, so the actual data transferred in this scenario would likely be very close to the size of the original binary data. See Binary-to-text encoding for more on this subject.
Binary file
A binary file is a computer file that is not a text file. The term "binary file" is often used as a term meaning "non-text file". Many binary file formats contain parts that can be interpreted as text; for example, some computer document files containing formatted text, such as older Microsoft Word document files, contain the text of the document but also contain formatting information in binary form.
All modern computers store information in the form of bits (binary digits), using binary code. For this reason, all data stored on a computer is, in some sense, "binary". However, one particularly useful and ubiquitous type of data stored on a computer is one in which the bits represent text, by way of a character encoding. Those files are called "text files" and files which are not like that are referred to as "binary files", as a sort of retronym or hypernym.
Some "text files" contain portions that are actually binary data, and many "binary files" contain portions that are encoded text; for instance, textual data may be stored as a field within the binary format, or arbitrary constants may have been chosen to correspond to ASCII letters as a mnemonic (this is common for file magic numbers). These mixed binary-and-text file are usually regarded as "binary", because an application that can only process text will not know what to do with them.
It is quite common for a text file to use its text to encode data that could be encoded in binary some other way; a text file that does this is still regarded as a text file, and not a binary file, so long as it remains within the previously-stated constraints about what the bits of the file represent. For example, in a binary file, the number 250 could be encoded in bits as the sequence 11111010. It could also be encoded in a text file (for example, a programming language source file) as the digits 2, 5, 0; which would in turn be encoded by the bits in the text file as (for example, using UTF-8) 00110010, 00110101, 00110000.
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 are sometimes referred to, particularly by programmers, as binaries. But binary files can also mean that they 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. The header often contains a signature or magic number which can identify the format. For example, a GIF file can contain multiple images, and headers are used to identify and describe each block of image data. The leading bytes of the header would contain text like GIF87a or GIF89a that can identify the binary as a GIF file. If a binary file does not contain any headers, it may be called a flat binary file.
A text file may consist partly or entirely of encoded binary information. When sending binary files over the network they may be encoded so that they use only printable characters. This is often necessary due to the limitations of network protocols used for internet browsing and e-mail communication. One such encoding is Base64. Also, files containing public-key and private-key information for use in systems employing asymmetric cryptography (such as website certificates) may also be stored with the binary information encoded in printable characters.
To send binary files through certain systems (such as email) that do not allow all data values, they are often translated into a plain text representation (using, for example, Base64). Encoding the data has the disadvantage of increasing the file size during the transfer (for example, using Base64 will increase the file's size by approximately 30%), as well as requiring translation back into binary after receipt. The increased size may be countered by lower-level link compression, as the resulting text data will have about as much less entropy as it has increased size, so the actual data transferred in this scenario would likely be very close to the size of the original binary data. See Binary-to-text encoding for more on this subject.