Assignment No.
-2
TITLE: CODE CONVERTER
Aim: To Design (truth table, K map) and
implement the circuit for the following 4bit Code conversion.
Code Conversions:
Binary to Gray Code
Gray to Binary Code
BCD to Excess 3 Code
Excess-3 to BCD Code
Objective:
To study and design different code converters using
gates.
Its significance and applications in digital systems.
Theory:
Need of code conversion
Often it is required to convert from one code to
another. For example the input to a digital system
may be in natural BCD and output may be 7-segment
LEDs. The digital system used may be capable of
processing the data in straight binary format.
Different types of codes (Significance and
applications)
Binary code
i) Weighted code straight binary code.
Gray code
i) Non Weighted code, single bit change from one
code word to the next in sequence.
ii) Used in Shaft encoders, angle-measuring devices,
K-map, to take output from ADC.
BCD code
i) Decimal number representation using 4-bit
binary. Weighted code (8-4-2-1)
ii) Used in arithmetic operations
Theory (Contd.)
Excess-3 code
i) Non weighted code used to express decimal
numbers
ii) Self complementing code
iii) Used to perform subtraction operation in digital
systems
Theory (Contd.)
Binary to Gray Conversion
Convert 0011 binary to Gray.
Theory (Contd.)
Gray to Binary Conversion
Convert 1011 Gray to Binary code.
Theory (Contd.)
BCD to Excess-3 code conversion
Convert BCD 0010 to Excess 3 code
0010 + 0011 = 0101 Excess 3 code for BCD 0010
Excess 3 code to BCD conversion
Convert 4-bit Excess-3 value 0101 to equivalent BCD
0101-0011= 0010 BCD for 2
Design
Truth Table
K-Map
Logical Circuit Diagram
Hardware Requirements
Binary to Gray Conversion
1) Truth Table:
2) K-map for reduced Boolean expressions of each output:
3) Circuit diagram:
4) Hardware requirements:
Conclusion:
Thus, we studied different codes and their
conversions including applications.
The truth tables have been verified using IC
7486, 7432, 7408, and 7404.
Design for different code conversions are
implemented.
FAQs:
Q.1) What is the need of code converters?
Q.2) What is Gray code?
Q.3) What is the significance of Gray code?
Q.4) What are applications of Gray code?
Q.5) What are weighted codes and non-weighted
codes?
Q.6) Why is Excess-3 code called as selfcomplementing code?
Q.7) What is invalid BCD?
References :
Digital Fundamentals by Floyd & Jain
Modern Digital Electronics by R P Jain
Digital Principles and Applications by Malvino,
Leach, Saha
Digital Electronics by Bignell