Why don't files show their bits?

For example, I open a file .exe with notepad and see instead of 100101 I see a lot strange characters why this? What characters are those?

Is a file .txt also binary?

How can I see the bits of a file and maybe edit them? If right edit one .exe can I program in binary? Even if it's hard.

Author: Maniero, 2020-05-15

2 answers

I open a file .exe with notepad and see instead of 100101 I see a lot strange characters why this? What characters are those?

Because notepad wanted to show like this. What you see is just a graphical representation (in a broad sense) of an information. Each software shows the way it sees fit for the person. And the person who goes to see chooses the software that is most suitable so that it is regretted the way it wants. Open a executable in a notepad is not usually a very good idea, even if it works.

The notepad was made to show texts, so it takes what it has in the file and tries to show it in the best possible way as if it were a text according to the extended ASCII table.

I answered about it .

Is a file .txt also binary?

Probably not, but I can't guarantee, the file extension doesn't guarantee what's inside it. In general this is a case that has more limited characters and makes more sense to a human. Of course it is binary in the sense that every file is formed by bits, but at another level of abstraction classification as binary only files that have more than human-readable texts.

How can I see the bits of a file and maybe edit them?

You can't see the bits as they are on the computer because it's just electric or magnetic energy (to name the more common types, it is possible to have other forms). Do you see the energy somewhere?

You can see a representation of what they are. You have to take a software that shows the data of a file bit by bit in an abstract way that you can understand.

Examples:

I'm not recommending any of them, I don't know the quality or problem of any.

If I edit a .exe correctly can I program in binary?

Can, but the last one who did it ended up in a hospice. : P: D

 4
Author: Maniero, 2020-05-19 13:22:13

From 8 to 8 bits forms a byte, each byte in extended ASCII encoding is shown as a character (or in some other encoding; the number of bits representing the character may vary).

Or trying to explain better:

Notepad was made to handle text. Text on the computer is displayed by taking the bits in groups of 7, 8 or more and displaying a character in place, this character is defined in a table, for example the ASCII table, if this was used encoding.

Files .txt are also saved as bits.

To see the bits you need a hex editor (hex editor) and know how to handle numbers in hexadecimal base (i.e. base 16). Or find a binary editor, but as 8-bit groups are easy to see in base 8 (octal)or 16 hexadecimal editors do well.

The basis we learned in school is base 10, the 16 is similar only with the addition of the letters A (10), B (11), C (12), D (13), E (14) and F (15). The operations sum, subtract etc. they also have a specific way of doing it.

You should not edit one .exe in a text editor because it truncates and corrupts the original file when it is loaded and saved on top.

You can play around in a hexadecimal editor by messing around with some bytes that you know what they are, for example small texts mixed into the code, or else edit a binary file (for example one that saves your save state of a computer game) and fiddle with the number of points, powers, etc.

If you know that your character has 138 Health Points, you go there in hex editor and find where is the value 8A (which is 138 in hexadecimal, you can see this in the Windows calculator in programmer mode) and change to FF. If changed in the right place, your character gets 255 health points: D

Has programs that help you do this.

 3
Author: Piovezan, 2020-05-16 00:45:39