Basic Electrical and Electronics Engineering: Unit IV: Digital Electronics

Binary Code

Advantages, Types, Application

The group of symbols is called as a code the digital data is represented stored and transmitted as group of binary bits.

BINARY CODE

The group of symbols is called as a code the digital data is represented stored and transmitted as group of binary bits. This group is also called as binary code. The binary code is represented by the number as well as alphanumeric letters.

Advantages of binary codes

(i) Binary codes are suitable for computer applications

(ii) It is used in the digital communications

(iii) It is very useful in Analysis and designing of digital circuits

Types of binary codes

(i) Weighted codes

(ii) Nonweighted codes

(iii) Binary coded decimal Alphanumeric codes

Weighted codes

Weighted codes are those binary codes which follow the position weight principle. Each position of the number represents a specific weight examp 8-4-2-1 code has 4 bit.

The 8-4-2-1 code expresses each decimal digit by its 4 bit binary equivalent.


Binary Coded Decimal (BCD) is a base of binary encodings of decimal numbers where each digit is represented by a 4 bit binary codes. Example 42 decimal number each bit represented by a 4 bit binary number


(42)d (01000010) BCD

Non Weighted codes

This type of binary codes, the positional weights are not assigned. Example for non weighted codes are excess-3 code and gray code.

Excess-3 code

Excess-3 code is also called as XS-3 code. It is non-weightes code used to express decimal numbers.

The excess-3 codes are derived from the 8421 BCD code adding with (0011)2 (or) (3)d to each code in 8421.




Gray code

It is a non-weighted code and it is not arithmetic code. There is no specific weights assigned to the bit position.

This gray code has special feature, only one bit will change each time the decimal number is incremented. The gray code is called as a unit distance code. The gray code is a cyclic code.


Example

Binary to gray code conversion


Steps

 (i) Copy the MSB from binary to gray

(ii) next two bit perform the Ex-OR gate operation

(iii) Put the results in corresponding

(iv) Same procedure follow upto LSB

Application of gray code

(i) It is used in shaft position encodes

Binary Coded Decimal (BCD)

In this code each decimal digit is represented by a 4 bit binary number

Example (16)decimal → (0 0 0 10110)BCD

Alphanumeric codes

A binary digit can represent only two symbols as it has only two states 0 (or) 1. But this is not possible to communication between two computers.

We need many symbols for communication. These symbols are 2b alphabets with capital and small letters, number from 0 to 9, punctuation marks and other symbols. Most commonly used alphanumeric codes are

(i) ASCII (American Standard Code for Information Interchange)

(ii) EBC DIC (Extended Binary Coded Decimal Interchange Code)

Basic Electrical and Electronics Engineering: Unit IV: Digital Electronics : Tag: : Advantages, Types, Application - Binary Code