What is the prefix code?
The prefix code is a binary code structure that represents certain letters or characters. These code chains use computers to communicate. They consist of zeros and those that translate into certain commands or words. For example, the letter "A" may contain the prefix code 0, while the number 1010 represents the letter "D".
binary trees are used to represent how the numbers strings translate into certain letters, characters, or messages. Many software applications use a binary trees based code to compress their data. Several different combinations of binary code are merged into one "tree" that can contain one or more messages. Usually there is a root that is represented either 0 or 1, which is compared to one of the characters.
From the root, you can monitor the extension of numbers that translate into another letter. There may be several different branches stemming from the main line of the binary tree that translate into separate characters.Dopies do notBo figures that are represented by one binary numeral are called individual bits, while those represented by more than one binary digits are called two, three or four bits.
The number of bits is directly related to the number of binary numbers that represent a specific character in the code preference. Individual bits are usually used for characters that occur several times in the message, while the strings of two or more bits are used for those letters and characters that rarely occur. For example, if the prefix code encodes the word "relentless", one bit will most likely represent the letter "E".
words and messages are usually created by placing a binary code together that read from left to right from the tree code. For example, one binary tree can contain a letter "r", which is represented by binary digits 0, the letter "E", which is represented by Binary String 011 andthe letter "D", which is represented by a binary chain 0110. In this case the word "red" would join as 00110110.
using codes of prefixes, computers and applications are able to save space. Because many commands and messages use the same letters and characters, each can be represented by certain binary code translations. Separate these words may need additional storage space due to the amount of bits each containing. Binary trees reduce the amount of bits desired, sometimes increase storage space by up to 50 percent.