Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

LDCO LAB (PR) Lab manuals Prepared by Prof.

Thorat Sanjay D_IT Dept

EXPERIMENT NO. :1

TITLE: CODE CONVERTER.

AIM: To design and implement 4-bit BCD to Excess-3 code converter .

APPARATUS REQUIRED: X-OR Gate IC 7486 ( 1 no.s), AND Gate IC 7408 ( 1), OR Gate IC 7432
(1), NOT Gate IC 7404 (1), IC TRAINER KIT – 1, PATCH CORDS

THEORY:
The availability of large variety of codes for the same discrete elements of information results in the use of
different codes by different systems. A conversion circuit must be inserted between the two systems if each
uses different codes for same information. Thus, code converter is a circuit that makes the two systems
compatible even though each uses different binary code.
8421 BCD Code
In the 8421 Binary Coded Decimal (BCD) representation each decimal digit is converted to its 4-bit pure
binary equivalent. For example: 57dec = 0101 0111bcd
Addition is analogous to decimal addition with normal binary addition taking place from right to left. For
example,
6 0110 BCD for 6 42 0100 0010 BCD for 42
+3 0011 BCD for 3 +27 0010 0111 BCD for 27
____ __________
1001 BCD for 9 0110 1001 BCD for 69

Where the result of any addition exceeds 9(1001) then six (0110) must be added to the sum to account for
the six invalid BCD codes that are available with a 4-bit number. This is illustrated in the example below

8 1001 BCD for 8


+7 0111 BCD for 7
___
1111 exceeds 9 (1001) so
0110 add six (0110)
_________
0001 0101 BCD for 15

Note that in the last example the 1 that carried forward from the first group of 4 bits has made a new 4-bit

Svpm’s COE,Malegaon(bk), IT dept Page 1


LDCO LAB (PR) Lab manuals Prepared by Prof. Thorat Sanjay D_IT Dept

number and so represents the "1" in "15". In the examples above the BCD numbers are split at every 4-bit
boundary to make reading them easier. This is not necessary when writing a BCD number down. This
coding is an example of a binary coded (each decimal number maps to four bits) weighted (each bit
represents a number, 1, 2, 4, etc.) code.

Excess-3 code

This code is also self-complementing like 2421 code.

• Although this code is not weighted, it has an arithmetic relationship with the BCD code.
• The code word for each decimal digit is the corresponding BCD code word plus 0011 2.

0010 = 2 in BCD

+ 00112

---------------------------------------

= 0101 = 2 in excess-3

Procedure: -

1. The circuit connections are made as shown in fig.


2. Pin (14) is connected to +Vcc and Pin (7) to ground.
3. In the case of BCD to Excess 3 conversion, the inputs D0, D1, D2 and D3 are given at
respective pins and outputs E0, E1, E2, E3 are taken for all the 16 combinations of the input.
4. In the case of Excess 3 to BCD conversion, the inputs E0, E1, E2 and E3 are given at
respective pins and outputs D0, D1, D2, and D3 are taken for all the 16 combinations of
inputs.
5. The values of the outputs are tabulated
6. Repeat for other conversions

Svpm’s COE,Malegaon(bk), IT dept Page 2


LDCO LAB (PR) Lab manuals Prepared by Prof. Thorat Sanjay D_IT Dept

BCD TO EXCESS 3 Code Converter :

Truth table:

K-Maps for E3,E2,E1 and E0

Svpm’s COE,Malegaon(bk), IT dept Page 3


LDCO LAB (PR) Lab manuals Prepared by Prof. Thorat Sanjay D_IT Dept

Conclusion:
In this way we are designed, implement and Tested BCD to Excess 3 code convertor.

Svpm’s COE,Malegaon(bk), IT dept Page 4


LDCO LAB (PR) Lab manuals Prepared by Prof. Thorat Sanjay D_IT Dept

Content beyond syllabus:


Excess – 3 to BCD Converter :

NOTE: Remaining outputs are don’t cares ‘X’ for inputs 0000 to 0010 and inputs 1101 to

1111 in Kmap.

Svpm’s COE,Malegaon(bk), IT dept Page 5


LDCO LAB (PR) Lab manuals Prepared by Prof. Thorat Sanjay D_IT Dept

K_Maps:

Svpm’s COE,Malegaon(bk), IT dept Page 6


LDCO LAB (PR) Lab manuals Prepared by Prof. Thorat Sanjay D_IT Dept

Fig: Excess 3 to BCD Code Convertor

Conclusion :

In this way we are designed, implement and Tested 04 Bit BCD to Excess 3 code convertor and Excess 3 to
BCD Code convertor.

Svpm’s COE,Malegaon(bk), IT dept Page 7


LDCO LAB (PR) Lab manuals Prepared by Prof. Thorat Sanjay D_IT Dept

Sample ORAL Questions : Do not write ..Just for reference


Department Of Information Technology
Oral questions for Practical Examination
Class:- S.E. ( SEM-I) Subject:-DIGITAL ELECTRONICS LAB (DEL)
Name Of Staff:- Prof. Thorat S.D.
----------------------------------------------------------------------------------------------------------------------
Title : Design (truth table, K-map) and implementation of 4 bit BCD to Excess-3 Code converters.
--------------------------------------------------------------------------------------------------------------------
Likely ORAL Questions:
1. What is gray Code
Ans: Gray code is a unit distance code in which two consecutive (adjacent)
codes differ only one bit position. For example 1 binary 0000 gray 0000
binary 0001 gray 0001
2. How you can convert gray to Binary , convert gray 11001110 into Binary
Ans: 1 1 0 0 1 1 1 0
repeat
---------------------------------
1 0001011
3. How you can convert binary to gray, Convert 10101100 into Gray.

Ans : 1 0 1 0 1 1 0 0

----------------------------------------
1 1 1 1 1 0 1 0
4. What is Difference between binary and gray code.
Ans : binary codes appers sequentially and it is weighted codes
Gray code unweighted code , Gray code is a unit distance code in which two consecutive
(adjacent) codes differ only one bit position.
For example 1
binary 0000 gray 0000
binary 0001 gray 0001

5. What is BCD code?


Ans: BCD stands for binary coded decimal, in which each decimal digit is encoded with
corresponding four bit binary code.
6. Is number (10)10 is BCD? if yes what is it’s BCD code
Ans : Yes : 1 0
0001 0000
7. Is number 15 is BCD? if yes What is it’s BCD Code
Ans : Yes 1 5

Svpm’s COE,Malegaon(bk), IT dept Page 8


LDCO LAB (PR) Lab manuals Prepared by Prof. Thorat Sanjay D_IT Dept

0001 0101
8. What are Rules of BCD Addition? Explain with Example
Ans:if Sum > 9 & Carry=0 ,ADD 6(0110)
if Sum \< 9 & Carry=1, ADD 6(0110)
if Sum\< 9 & Carry=0 ,ADD 0(0000) (no correction needed)

Examples:

9. What are rules of BCD subtraction? Explain with Example


Ans: Add 3 (0011) ,if carry = 1 and
Add 13 (1101) or -3 (1101),if carry = 0.
10. What is Excess 3 codes? What is Excess 3 code for 10?
Ans: Excess 3 = 8-4-2-1 BCD + 0011 (3)
Excess 3 for 10= BCD for 10= 0001 0000
0011 0011
-------------------
0100 0011 Excess 3 for 10
11. What are rules of BCD subtraction? Explain with Example
Ans: Rules of BCD subtraction: 1) take 9’s complement of – ve number
2) Perform BCD addition with second no
3) if carry generated ,add carry called end
around carry Ans in it’s true form

4) if carry not generated , ans is – ve and in it’s


9’s complement form

12. What is difference between BCD and Gray.


Ans : BCD stands for binary coded decimal, in which each decimal digit is encoded with
corresponding four bit binary code
Gray code is un-weighted code , Gray code is a unit distance code in which
two consecutive (adjacent) codes differ only one bit position.
For example 1 binary 0000 gray 0000
Binary 0001 gray 0001

Svpm’s COE,Malegaon(bk), IT dept Page 9

You might also like