weird characters

When I opened a bump photo with a notepad I found these characters :

00 00 00 00
01 05 02 04



what are they ??


PS: I could not past the characters because when I posted them here , they disappeared
Last edited on
What's a "bump photo"? I'm assuming it's some kind of binary file.


All files are just strings of numbers. If you get a hex editor (like HxD), you can open files and see the raw information more-or-less as the computer sees it.

What an editor like notepad does, is it just takes those numbers and interprets each one as if it were a character in text. Different numbers correspond to different characters.

The garbage characters you saw probably were control codes or something (numbers which don't really have a textual display).
Sorry I mean BMP extension : .bmp a photo extension .

In the BMP photo , I found those characters I mentioned in my first post . I used a hex editor to view them but they are invisible in hex editor and I cannot paste them here because when I did they were invisible too . So I guess what they are ???
I used a hex editor to view them but they are invisible in hex editor


Nothing is invisible in a hex editor.

So I guess what they are ???


This question is ill-founded and doesn't really make sense. What those characters are is simply a textual representations of the bytes in the file. But that doesn't really help you understand it, and you won't understand it unless you understand how files work.

So here's a big explanation:





A file is just a [very large] series of bytes. Each byte is 8 bits, each bit is either a 1 or a 0.

That's it. There is nothing more to them than that*. Files do not actually contain images... or text... or anything. The only thing they contain is bytes. Just lots, and lots of bytes.

Now the reason you can have a bmp file that contains an image is because programs like Paint look at those bytes and interpret the numbers to be colors. And the reason you can have text files is because programs like Notepad look at those bytes and interpret the numbers to be text.

So when you open an image file in Notepad, it will try to interpret the data as text, even though it is supposed to be interpretted as image data. So you'll end up seeing meaningless garbage.

What makes hex editors special is that they do not interpret the data as anything -- they merely load it and display it for what it is: A raw series of bytes.

For example... here is what a simple text file looks like in a text editor (Notepad++):
http://imgur.com/DmEjFo8,rS84nGx#0

Here is what that same file looks like in a hex editor (HxD):
http://imgur.com/DmEjFo8,rS84nGx#1


In the hex editor... see all those numbers in black in the center? Those are the bytes. That is what is actually inside the file.

When you look at the file in Notepad++, it is not showing you those numbers. Instead, it looks at the number and say "what character should this number be interpretted as?", and will display a textual character.

The number '41' gets interpretted as the letter 'A'. The number '20' gets interpretted as a space, and the number sequence '0D 0A' gets interpretted as a new line.





For an example of a bmp file, here is one as viewed in any image viewer:
http://imgur.com/gwk9Wo8,IZDJvE4#0

And here is that same image viewed in a hex editor (HxD):
http://imgur.com/gwk9Wo8,IZDJvE4#1

As you can see, this file contains a lot of numbers like '00', which doesn't have a [visible] character representation. So if you were to try to look at this in a text editor like Notepad, it would look like garbage... either not showing those bytes or putting some filler character in.


*except for metadata and stuff, but nevermind that
Not all data is meant to be interpreted as text. There is no intrinsic data type associated with data - meaning is in the eye of the beholder.
Last edited on
thank you very much for this long explanation . It really helped me clear some points that I are ignore .
Not to add to your confusion OP, but but I feel like someone should mention that not all data in a file is relevant. Just like with uninitialized RAM, some of the things you see might just be left over from what previously occupied that storage location. There is some "padding" and a bunch of "white-space" in a COFF (Common Object Formatted File) to start with and then when you take into account the specifics of the file you are dealing with, is the disk or file compressed? what format is that using? etc. things can get really confusing really fast.
Topic archived. No new replies allowed.