Binary Codes

BCD stands for Binary-Coded Decimal. • The binary number system is the most natural system for a computer, but people are accustomed to the decimal system. So, to resolve this difference, computer uses decimals in coded form which the hardware understands. • Binary coded decimal (BCD) represents each decimal digit with four bits.
• A BCD number is a four-bit binary group that represents one of the ten decimal digits 0 through 9.
• It is also called natural binary codes because of the 8,4,2 and 1 weights attached to it.
• It is a weighted code.
• The main advantage of this code is its ease of conversion to and from decimal.
• It is less efficient than pure binary in the sense that it requires more bits.
• Another disadvantage of BCD code is that arithmetic operations are more complex than they are in pure binary.
• The BCD code 1010,1011,1100,1101,1110, and 1111 are not used.


Error-Detection codes

Binary information can be transmitted from one location to another by electric wires or other communication medium. • Any external noise introduced into the physical communication medium may change some of the bits from 0 to 1 or vice versa. • The purpose of an error-detection code is to detect such bit-reversal errors. • One of the most common ways to achieve error detection is by means of a parity bit. • A parity bit is the extra bit included to make the total number of 1's in the resulting code word either even or odd. • In an odd-parity code, the parity bit is specified so that the total number of ones is odd. • In an even-parity code, the parity bit is specified so that the total number of ones is even.During the transmission of information from one location to another, an even parity bit is generated in the sending end for each message transmission. – The message, together with the parity bit, is transmitted to its destination. • The parity of the received data is checked in the receiving end. – If the parity of the received information is not even, it means that at least one bit has changed value during the transmission.


Gray Code

It is a binary coding scheme used to represent digits generated from a mechanical sensor that may be prone to error. • Used in telegraphy in the late 1800s, and also known as "reflected binary code”. • The reflected binary or Gray code is used to represent digital data converted from analog information. • Non-weighted code • In Gray code, there is only one bit location different between two successive values, which makes mechanical transitions from one digit to the next less error prone. The Gray code’s most important characteristic is that only one digit changes as you increment or decrement the count. • The Gray code is commonly associated with input/output devices such as an optical encoder of a shaft’s angular position. • The Gray code is NOT a BCD code. The Gray code is used in applications where the normal sequence of binary numbers may produce an error or ambiguity during the transition from one number to the next. • Conversion from Binary to Gray code:  Step 1: Write MSB of given Binary number as it is.  Step 2: Ex-OR this bit with next bit of that binary number and write the result.  Step 3: Ex-OR each successive sum until LSB of that binary number is reached. Eg.: (1010011) 2 to its equivalent Gray code.

Alphanumeric Codes

Alphanumeric codes are codes used to encode the characters of alphabet in addition to the decimal digits. • Alphanumeric characters is a set of elements that include – 26 alphabets with capital and small letters – Numbers from 0 to 9 – Punctuation marks and other symbols – special characters such as $, %, + etc. • Alphanumeric codes represent numbers and alphabetic characters. – They also represent other characters such as punctuation symbols and instructions for conveying information.They are used primarily for transmitting data between computers and its I/O devices such as printers, keyboards and video display terminal • Therefore instead of using only single binary bits, a group of bits is used as a code to represent a symbol.

ASCII CODE

ASCII is acronym for American Standard Code for Information Interchange • Standard alphanumeric binary code is ASCII • Represents numbers, letters, punctuation marks and control characters • Standard ASCII is a 7-bit code (127 characters) • In the ASCII character set, each binary value between 0 and 127 represents a specific character. • Extended ASCII (IBM ASCII), an 8-bit code, is also very popular • Extended ASCII adds graphics and math symbols to code (total of 256 symbols). In general, ASCII works by assigning standard numeric values to letters, numbers, punctuation marks and other characters such as control codes. • An uppercase "A," for example, is represented by the decimal number 65."

EBCDIC-(Extended Binary Coded Decimal Interchange Code)

EBCDIC is eight bits, or one byte, wide. • This is a coding system used to represent characters-letters, numerals, punctuation marks, and other symbols in computerized text. • A character is represented in EBCDIC by eight bit. • Total 256 characters are possible, however all are not used. • There is no parity bit used to check error in this code set.Single byte EBCDIC takes up eight bits, which are divided in two pieces. – The first four bits are called the zone and represent the category of the character, whereas the last four bits are the called the digit and identify the specific character

If you want to download this file as pdf then

0 Comments