BINARY SYSTEM IN OUR DAILY LIVES
The binary system is extensively used in the world of computers. The binary is the language the computer systems understand and use for communicating. And that is why when the emulation of an instruction set from one system to another is required, it is done much more efficiently and effortlessly through the use of binary systems.
Binary translation happens in two ways
Static binary translation: This is a process where the system converts all the executable file codes into a code that is preset by the required system architecture. This method comes with the drawback of code being hidden from the translator and this will be noticeable only during execution. The universal super-optimizer peephole technology is used by various static binary translators to overcome the limitation.
Dynamic binary translation: This is a process that converts the codes on the go. A single basic block is translated before going to the next. The codes are worked on as and when they are found. The resulting sequence is then cached.
The Uses of Binary
- Speed: Data in binary makes the speed of input and output process much faster as compared to the characters. A 32-bit integer might not take much time to be converted, but when you have a collection of integers, the speed becomes significantly slow. For example, if you are dealing with an image file that consists of several millions of numbers or a similar file, the time required for an input or output would be higher. This would result in processes like games, videos etc.
- Size: The same amount of data will take up less space in the binary form as compared to a text file. This factor of size becomes important when the file concerned is an image, a video or an audio. The smaller the size, the lesser the storage space occupied, the faster transmissions happen. And since only a few bytes of data, input and output of these files are way faster. For example, a DVD would not be able to accommodate an entire movie if it wasn’t saved in the binary format.
- Data: A lot of time we do not view executable files and codes as data, but actual data that takes up space and affect the speed of the overall process based on their input and output speeds. Various programming data, for instance, byte codes in a Java class file or any kind executable file of a machine language. A Java compiler, therefore, reads a file and writes the resulting data in a binary form which is the bytecode file.
- Not important: The pixels behind a video or the millions of numbers making up an image is not of interest to a viewer. The overall picture or video is what actually matters. It, therefore, would not be required to save the text file. There are rare occasions though that a programmer might need to look into the individual data of a video or image for debugging purposes, he could use alternative services like hex dumps and various other programs.
