2.2. CODE AND CODING

 Back  Elements of DCS  Next


Prerequisite for the successful communication of computers in data processing or exchange for an AGREEMENT on a set of characters who will be working with computer use and the associated binary combinations for each character and a task for each one has done. Who keeps agreements can not communicate with others who revere the agreement; himself digs 'pit'. Agreement is eventually extended and upgrades, and can become legalized state standard or recommendation of an international organization. This is not a term that is related to data protection (encryption), but applies only to mutual communication between computers and their users.

The set of all characters (graphemes) used in the communication referred to ABSTRACT ALPHABET, which, together with the corresponding binary (or other) forms a combination CODE. A sign in code called CODE ELEMENT, parent him a good replacement, whether it's the binary combination, another character, or something else, called CODE REPLACEMENT.

Number coding elements in abstract alphabet called SCOPE OF CODE. With the number of used computer elements is proportional to the number of bits that they want to use for code return the following expression (Equation of code):

 Equation of code

Example I

How many characters can be encoded if used code replacement of:

        A.) 2 bits,
        B.) 4 bits,
        C.) 8 bits,

A.) With two bits can be achieved by replacing the following code:

 Scope - 2 bit

B.) Expanding to four bits per code replacing a larger number of possible coding of used elements:

 Scope - 4 bit

Most significant bit (on the left) is often called LEADING BIT binary combinations. The least significant bit (Least Significant Bit) usually has a label LSB, and the leading bit has the greatest importance and designation MSB (Most Significant Bit).

C.) Microcomputers commonly used in eight-bit words, and the replacement code:

 Scope - 256 bit-a

What will be the sign to join some code combined (code replacement) will depend on the accepted user agreement.

The process of converting code to the code element replacement is called ENCODING, and the process of converting code replacing the corresponding character is called DECODING. For a computer coding procedure is typically done via keyboard, and the decoding process is seen as a display on the screen of the computer monitor or the printer.

Morse's code had various combinations of pulses only on schedule but also in the number of pulses and their duration. This is not suitable for uneven in computer technology due to the difficulty of synchronization and recognition. More appropriate when each code replacement equal time duration.

In computer technology widespread use of BCD and ASCII codes.



2.2.1. BCD code



BCD is an abbreviation of 'Binary Coded Decimal', which means binary coded decades. BCD code encoding is done replacing every decade digit with its four-bit binary equivalent term, and that means you can not use all the available combinations of four bits, but only the first ten from view B.) in the example. Binary number shown in the BCD code is similar to the hexadecimal number, only without the digits A, B, C, D, E and F.


Example II

Convert BCD to binary combinations of the decade.

 Coversion of numbers; BCD to decade

The basic purpose of the BCD code data that are primarily numerical values and therefore are very often used in measurement systems. How digital computer, except with numbers and operates with the letters and other special characters, it is necessary to take a larger number of binary combinations. The basis of today's computers is ASCII with the eight bit code replacements.



2.2.2. ASCII code



ASCII is an acronym of the first letters of sentences 'American Standard Code for Information Interchange'. During the development of computer technology has defined several variants of this code. Commonly in use eight bit variant in which the combination of the first 128 (0-127) standardized, and the other a combination of 128 (128-255) is left to the will of the user to independently create code elements. The first 128 elements of the code is shown in the following table.

 ASCII code
Table 2.2.1 The first 128 elements of the ASCII code.

The code is designed to allow you greater flexibility and speed. For example, all instructions have a bit of 'b6' and 'b5' equal to zero, and will 'b7' is zero when it comes to standardized signs, or one if it comes to characters defined by the user, which makes up the second group of 128 ASCII character code. Characters are uppercase and lowercase letters correspond to the first four bits (b0-b3) and are identified by analyzing 'b5', and for all the letters 'b6' is one. Table 2.2.1 image with the organizational display ASCII code, and our climate is mostly used code table shown in Appendix 9e, indicating the graphemes us interesting, especially since it was a DOS-like operating system is retired.

From the table it is easy to find a replacement binary code by reading the sign bit of 'b7-b0' and the hexadecimal value of the character reading the column-row. Very useful content of coding is at the site 'The Ultimate Guide to ASCII Encoding'.


Example III

Calculate the value of the ASCII character code expressed different numbering systems.

"STX" = 0000 00102 = 0316 = 310

" W " = 0101 01112 = 5716 = 8710

" k " = 0110 10112 = 6B16 = 10710

Convert from hexadecimal the decade form is not too difficult because it comes just two hexadecimal digits. The first four bits of binary number (with readings from right to left) are hexadecimal digit lower order, and the next four bits of binary digit hexadecimal number consists of a higher order.

Thus, each character or instructions are described with a combination of 4 bits of higher and lower order and grouped so quickly recognizes the sign of which is the word. Bits of 'b0-b6' called informative bits and will 'b7' extra point.

Meaning of each instruction ASCII code is:

        NUL -- logical device without affecting or response to a message (black hole)
        SOH -- beginning tag control information before the message block
        STX -- marks the end of the control data and the beginning of a block message
        ETX -- marks the end of a block message
        EOT -- marks the end of data transfer (control and message)
        ENQ -- request for a reply destination
        ACK -- acknowledgment of the receipt of destinations
        BEL -- activate audible call
        BS --- clear the cursor backward (to the left) in a row
        HT --- control tabulations (rebounds) in the row
        LF --- set the cursor to the next row
        VT --- control tabulations (jumps) by rows
        FF --- setting up printers on paper start a new page
        CR --- return to the starting position in the same row
        SO --- beginning of a block of characters different meanings
        SI --- end of block character different meanings
        DLE -- changes in the meanings of control characters
        DC1 to DC4 -- user-defined control signs
        NAK -- answer set of unfulfilled receiving
        SYN -- maintain synchronization (compliance) transfer
        ETB -- marks the end of a block of data
        CAN -- message incorrectly despatched data
        EM --- physical end of the dispatch data
        SUB -- followed by replacement of the faulty data
        ESC -- gives the possibility to use the enlargement code
        FS --- separator blocks of data (files)
        GS --- separator group data in the block
        RS --- separator individual records in this group
        US --- separator units
        SP --- space (blank)
        DEL -- delete the character to the right of the cursor

1968th The International Organization for telecommunications and transport (CCITT) has established international code number 5, which is in essence no different from the ASCII code.

Extension of ASCII code (another 128 characters) initially contained mainly signs of Greek letters, signs, locations and characters to create a frame attached to 9a and 9c, but the penetration of the Windows operating system and all usage for Unicode is increasingly being used by the example code tables attached 9g which are separated only graphemes, and the previously mentioned code tables are leaving or have gone into oblivion. How PC graphics cards, in principle, to support all the features of legacy DOS program support, and if you run old software support developed in QBASIC-in or something similar, on screen neatly displays all special characters specific to the 437 code table in color programmer then were available, no matter what the application is executed in say 'XP' environment. Doing the old games, but not all. With regard to ensuring full compatibility to older work of software to be installed emulator (DOSBox or VDMSound), to supplement the operating system that knows how to interpret the old application, or use Virtual PC which will be installed with the old operating system and 'old' software support him.

It is interesting that international standards in computing have some weight as legislation, but are mostly recommendations. If someone sends a message that is based on the use of ASCII code, all the code that can be applied to understand. If someone uses an individual solutions is questionable how ga 'fall' incompatibility with other community members. Who is going to buy a DVD player that does not comply with the recommended standards, if you can watch movies on it? Regardless of what is perhaps technically more advanced.

Like the characters, the same principles can be converted to image or sound elements in binary combinations using the appropriate codec, program records that describe a way of converting contents in binary notation. The reverse process is called decoding. Very often both methods are unified as a single programming notation called CODEC (short for COder-DECoder / COmpressor-DECompressor). In essence, their work is based on mathematical algorithms that unless conversion to binary form is also performed and compressing the original signal and vice versa.

Compression can be done in two ways:

Some algorithms are protected by patent rights and some freely available but often not reliable on any willingness to use his more profitable. And here an important role recommendations of an international organization such as the method of processing the analog TV signals to digital images in DVB-T (terrestrial), DVB-S (satellite broadcasting) and DVB-C (cable broadcast) standards.

 Back
 Search
 Next

 Content - Home
 Content  Informatics Alphabet
 
Citing this page:
Radic, Drago. " IT - Informatics Alphabet " Split-Croatia.
{Date of access}. <http://www.informatics.buzdo.com/>.
Copyright © by Drago Radic. All rights reserved. | Disclaimer