Statement 2

Consecutively download the files named cod1, cod_gray, cod_xs3 and cod_gray_xs3 available in Moodle to complete the attached table. In the table you must specify what binary combination shows each number. The first is the BCD (it will be the starting one).

Student activity: Complete the following table with the numbers from 0 to 9.

BCD

0000

0001

0010

 

 

 

 

 

1000

1001

XS3

0011

 

 

 

 

 

 

 

 

1100

Gray

 

 

 

 

 

 

 

 

 

 

Gray XS3

 

 

 

 

 

 

 

 

 

 

Output the signals to drive a seven-segment display

0

1

2

 

 

 

 

 

8

9

1. To obtain the XS3 table you have to access to ud-pld and download the file cod_xs3 available in Moodle.

2. Now the path is the reversed: test with which combination we get a 0 and take note of it. And thus, number by number. You can also input combinations and find out what is seen. In the attached figure you can see the 0 (0011) and the 4 (0111).

 

1. How do you obtain the rest of numbers with XS3?

2. Do the same with the remaining files cod_gray and cod_gray_xs3 available in Moodle.

QUESTIONS:

(1) What is special about the BCD-XS3? How do you obtain it?

(2) Hint about the BCD-XS3: Look at the table split in two: from 0 to 4 and from 5 to 9, compare them; do you know what nine´s complement means?

(3) What is special about the BCD-gray code?

(4) Hint about the BCD-Gray: Look at the difference between a number and the following, between 0 and 1, between 1 and 2, and thus, successively.

(5) What is special about the code BCD-Gray-XS3?

(6) Hint about BCD-Gray-XS3: Observe the previous Answers and analyse if both features are mixed.