English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

how i open binary file? how i extract that what contains?what is a binary file?

2006-12-24 07:12:22 · 2 answers · asked by viorel_4you_now 1 in Computers & Internet Software

2 answers

Binary refers to the base-2 counting system, which is what the computer uses. Since computers deal in 1s and 0s, any file on the computer is effectively a binary file.

When it comes to text, which uses alphabets, rather than numbers, it gets trickier. Each letter needs to be mapped to a number, which can then be represented in a binary number. There are countless mappings, although the most well known would be ASCII, UTF-16, and UTF-8. These mappings are known as character encodings, and all they are is a giant table saying what character equals what number.

So basically, text means you try to map 1s and 0s to an alphabet in the character encoding. When you open a file in notepad, or another text editor, that's precisely what happens. The program takes the binary numbers and tries to get alphabets out of them.

So we can now distinguish a binary file and a text file by how it should be handled. A text file is a file that can be interpreted as characters. Those 1s and 0s need to correspond to the values in an appropriate character encoding. A binary file has no character encoding. It really is nothing more than the binary numbers it contains.

Binary files are intended to be opened by specific programs. For example, an image file like JPG files are intended to be opened by image viewers with JPG support. So with binary files, you open them up in the appropriate application.

You can't open them up in Notepad or another text editor, because the editors will try to interpret the file as text, which is not what you want. Instead, to view the raw numbers, you need to use a hex editor. A hex editor will collapse the binary into hexadecimal making it easy to view and edit.

2006-12-24 07:35:45 · answer #1 · answered by csanon 6 · 0 0

A binary file is basically any file that contains data in binary. In computer terms, it's distinct from "ASCII files", in which resides, as you guess it, ASCII data. In PC/Windows, anything that's NOT text (i.e. cannot be opened by NOTEPAD or equivalent and read) is a binary file.

Open a binary file... Depends on what you're using. In general, binary files are created by specific programs and you need that program to open it back up.

Extract... You don't, if you don't know what is its structure. There's no such thing as "universal" structure. Each programmer can define their own structure, first X bytes being this, next Y bytes being that, then next Z bytes mean something else. Without knowing the structure, you can't extract anything.

2006-12-24 15:33:49 · answer #2 · answered by Kasey C 7 · 0 0

fedest.com, questions and answers