Question

i had weird question or rather stupid question when i open a binary file using text editor it doesn't seem like it represented in binary 0 and 1 or hex so what representation is that???

IHDR\00\00k\00\00\C3\00\00\00\A2\B6\8D$\00\00\00sBIT|d\88\00\00 \00IDATx\9C̽Y\AC-\CBy\DF\F7\FB\AA\AA\BBװ\87\B3\CFtϹ󽼗

Was it helpful?

Solution

The hard disk (as well as any other digital device in your computer) transmits data as 0 and 1. And all files are just sequences of numbers, and they are all 'binary' in the sense that they all are bunch of bits. But some of the files can be read by a human (after a simple decoding that is performed by text viewers), and we call those 'text' files; and others are in machine-oriented language and are not targeted to human's perception at all or at least without a special software (those are called 'binary').

A text editor tries to display these data as text. As "plain" text files usually contain a text encoded by 8 bits per 1 character, your editor interprets each binary octet (each byte) as an integer number containing a character's code, and displays the appropriate character. For some codes, there are no printable characters in the encoding table; these characters are usually displayed with squares, question marks or (as in your case) with their numerical (hexadecimal) codes.

Some editors can show pure hexadecimal representation of file, and it's rather convenient feature for low-level data analysis since hexadecimals are compact and can be quite easily converted to a binary representation.

OTHER TIPS

This is hexadecimal representation along with ASCII representation of characters your software is able to display..

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top