Question: Explain in brief weighted and non-weighted codes with one example each.

Mumbai University > Computer Engineering > Sem 3 > Digital Logic Design and Analysis

Marks: 10M

Year: Dec 2016

modified 2.1 years ago by gravatar for Yashbeer Yashbeer ♦♦ 130 written 2.1 years ago by gravatar for Barkha Barkha750

Weighted Codes:

  1. The main characteristic of a weighted code is, each binary bit is assigned by a “weight” and values depend on the position of the binary bit.

  2. The sum of the weights of these binary bits, whose value is 1 is equal to the decimal digit which they represent.

  3. In other words, if w1, w2, w3 and w4 are the weights of the binary digits, and x1, x2, x3 and x4 are the corresponding bit values, then the decimal digit N=w4x4 + w3x3+w2x2+w1x1 is represented by the binary sequence x4x3x2x1.

  4. A sequence of binary bits which represents a decimal digit is called a “code word”.

  5. Thus x4x3x2x1 is a code word of N.

  6. Example of these codes is: BCD, 8421, 6421, 4221, 5211, 3321 etc.

  7. Weighted codes are used in:

    a) Data manipulation during arithmetic operation.

    b) For input/output operations in digital circuits.

    c) To represent the decimal digits in calculators, volt meters etc.

Non-Weighted Codes:

  1. Non-weighted or un-weighted codes are those codes in which the digit value does not depend upon their position i.e., each digit position within the number is not assigned fixed value.

  2. Examples of non-weighted codes are: Un-weighted BCD code, Excess-3 code and gray code.

  3. Non weighted codes are used in:

    a) To perform certain arithmetic operations.

    b) Shift position encodes.

    c) Used for error detecting purpose.

modified 2.1 years ago  • written 2.1 years ago by gravatar for Barkha Barkha750
Please log in to add an answer.