-
No way to read binary files You have to know the format of the file first to read the text file and convert it into binary, which is very easy.
But it's almost impossible to convert binary to text (without knowing the file format), and a text file is a byte by byte reading all the data.
So whether it's a binary or a text file, as long as it's text information, you can open it with Notepad.
Because the character only occupies one byte.
Other data types are not, and therefore cannot be read.
If you really want to know what that gibberish represents, you have to understand the file format first.
-
The description of the binary tie-in file and the text file is incorrect ().
a.Text files are stored in ASCII codes that correspond to one byte for each character.
b.A binary file stores data in a file as it is stored in memory.
c.Celery base files are slower to read and write than text files.
When language processes files, it does not distinguish between types, but treats them as a stream of characters and processes them by bytes.
Correct answer: c
-
There are two types of file types: text files and binary files.
Text files are saved in a character-encoded manner. Binary files leave the in-memory data intact to the file, and are suitable for non-character-based data. If you open it in Notepad, you will only see a bunch of garbled characters.
In fact, all data except text files can be considered binary files. The advantages of binaries are fast access, small footprint, and random access to data.
There are two types of file access methods: sequential access and random access.
Sequential reading is the reading of the contents of a file from top to bottom, one by one. When you save data, append it to the end of the file. This type of access is often used for text files, while the files that are accessed are called sequential files.
Random access is mostly based on binary files. It reads and writes data in a complete unit, usually in structures.
In fact, all files are based on binary files, and text files are just artificially limited to binary files. Sequential read/write methods must also be performed in a limited mode, so sequential read/write methods are not used for binary files, but only for predetermined sequential files!
-
If it is a number, 1000 can be stored in a 16-bit integer, which only occupies 2 bytes. A 32-bit integer would take up 4 bytes.
If it is text, "1000" occupies 4 characters. If the format requires it"c string"way to write, there will be more than one'\0', which occupies 1 byte more, for a total of 5. If you do not make such a special request, you can use 4.
2. Take 10 as an example"When to 0x 0000 000a"This is when it is a 32-bit integer, and when C is a long int. This is true for both with and without signs. Since you wrote the 0x prefix, it's just a hexadecimal number, and there is no difference between the big and small ends.
When to 0x 0001 0000"It's hard to see this uncommonly, but there is the closest BCD format, which is a binary-encoded decimal number format, which encodes data as 0x 0000 0010, and uses 4 bits to represent a decimal digit, instead of 16 bits in the example.
-
This is the principle of the microcomputer and the storage of data, just look at the book.
-
In fact, all files on a computer are binary files, and a "text file" is a file that does not contain special characters, and it is essentially still a binary file.
The format in which the number 33 is stored in a file depends on its type:
If it is byte, it is stored as 00100001 (that is, 21 in hexadecimal, for convenience to illustrate, the following are all expressed in hexadecimal), occupying 1 byte (8 bits);
If it is an integer, the storage is 21 00, which occupies 2 bytes (16 bits);
If it is a long integer, the storage is 21 00 00 00, which occupies 4 bytes (32 bits);
If it is a single-precision floating-point (sing), it is stored as 00 00 04 42 (the explanation of floating-point numbers is yours, and it is estimated that a book will not explain it all), which occupies 4 bytes;
If it is a double, the storage is 00 00 00 00 00 80 40 40, which occupies 8 bytes.
If you store 33 as text, you will store the ASCII code for each character: 33 33 (Note that 33 here is not the same thing as the number 33 mentioned earlier, characters.)"3"The ASCII code is 51, and the conversion to hexadecimal is exactly 33), which occupies two bytes.
In the same way, text strings are stored in the ASCII code of each character, e.g. "angebaby" is 61 6e 67 65 62 61 62 79.
If the string contains the Handong Bureau word, the situation is much more complicated, and it is decided according to the encoding format, so I will not go into detail here. Nasdaq.
-
1.Text files can be encoded in more than just ASCII codes. For ASCII code data, it can be stored as a text file for easy opening and viewing.
2.Text files are stored in binary on disk and in memory, but the storage order may not be in the original order, and the character code stored on the disk may not be the one you see. It has a certain form of conversion.
Binary files are also stored in binary, which is the code you see. It can be stored in memory in two ways: big-endian and small-endian, which is simply stored in the order and reverse order in which the file is opened.
3.I didn't understand what you were talking about.
Here's how to solve it:
1. Open Excel to create a new worksheet, click the "Data" tab in the menu bar of Excel, select "From Text", find the text file you want to import in the pop-up dialog box, and click "OK". >>>More
Text document (text file): A file that can be opened with a program such as Notepad to view the clear code, usually with a name extension. txt .log .ini .. >>>More
Without the slip 101 template, you can't write it well according to the content structure of the document. It's better to paste the back part of the original text in its entirety. >>>More
Yeti Translation Software (CAT) - Simple, fast and practical, it is an efficient tool for translators! >>>More
Don't think so much, keep your mind at ease. There is still a long way to go in life, and it is all the path you choose and come out of by yourself. >>>More