CREATE OWN LIBRARY

Weighted and Un-weighted BCD

 

The BCD can be classified into two categories weighted and non-weighted code. Weighted code can also be categorized as positive or negative weighted code.

 

Un-weighted code is gray code 

(Visit here to see Gray Code Gray Code (Non-weighted BCD)) 

 

Another unweighted code is Excess-3 code.

Excess-3 codes are unweighted and self-complementary code BCD which can be obtained by adding 3 to each decimal number and represented by 4 - bit binary number.

 

[See Self-complement Code Binary Coded Decimal (BCD)]

 

Decimal

8421 Binary

Excess – 3

0

0000

0011

1

0001

0100

2

0010

0101

3

0011

0110

4

0100

0111

5

0101

1000

6

0110

1001

7

0111

1010

8

1000

1011

 

Weighted code can also be categorized as positive or negative weighted code.

Some positive weighted code: 8421, 3321, 2241, 2421, etc. 

 

Weighted and Unweighted Codes:

 

 

8 4 2 1: 

(a) Equivalent to binary representation. Here, 10, 11, 12, 13, 14, 15 are valid, unused codes.

(b) 8 4 2 1 is sequential code.

(c) 8 4 2 1 is not self-complementing. [8 + 4 + 2 + 1 ≠9]

 

[See Self-complement Code Binary Coded Decimal (BCD)]

 

3 3 2 1: 

(a) Not sequential

(b) Self-complementing (0, 9), (1, 8), (2, 7), (3, 6), (4, 5)

 

2 2 4 1:

(a) Not sequential

(b) Self-complementing (0, 9), (1, 8), (2, 7), (3, 6), (4, 5)

 

2 4 2 1:

(a) Not sequential

(b) Self-complementing (0, 9), (1, 8), (2, 7), (3, 6), (4, 5)

 

3 3 2 1 – Code [Explanation]

Say, number 3 is to be represented in 3 3 2 1 code.

It can have several possibilities like,

 

For 2 2 4 1 code also, the representation will be of the same type. (Only, when digits are less than or equal to 4).

 

# Some negative BCD weighted code: 8 4-2-1, 6 4 2-3

 

Decimal digit

8 4 2 1

8 4 -2 -1

6 4 2 -3

0

0000

0000

0000

1

0001

0111

0101

2

0010

0110

0010

3

0011

0101

1001

4

0100

0100

0100

5

0101

1011

1011

6

0110

1010

0110

7

0111

1001

1101

8

1000

1000

1010

9

1001

1111

1111

 

8 4 -2 -1: 

(a) Negative weighted BCD.

(b) 8 4 -2 -1 is not a sequential code.

(c) 8 4 2 1 is a self-complementing. [8 + 4 -2 - 1 =9]

 

6 4 2 -3:

(a) Negative weighted BCD.

(b) 6 4 2 3 is not a sequential code.

(c) 8 4 2 1 is a self-complementing. [8 + 4 -2 - 1 =9]

 

[See Self-complement Code Binary Coded Decimal (BCD)]