Different Digital Codes and their conversion
Name : Samyak Ravindra Tayde
Enrollment No. : 24410260171
Branch : Computer Engineering
College : Government Polytechnic Murtizapur
Technical Report: Digital Codes and Their Conversion
Introduction
Digital codes allow data to be represented, stored, and manipulated in modern digital
systems. The most common digital codes are Binary Coded Decimal (BCD), Gray code,
Excess-3 code, ASCII (alphanumeric code), and error-detecting/correcting codes like Parity and
Hamming codes. Each code serves unique applications, has distinct characteristics, and
sometimes requires code conversion to ensure compatibility across devices and systems.
Below is a detailed comparison chart for these digital codes, including their format, working
example, advantages, disadvantages, and primary applications.
Digital Codes Comparison Table
Code Information/ Exampl Advantages Disadvantag Application
Type Description e es Areas
BCD Each decimal digit is Decima Easy decimal-to- Not space- Digital
(Binary coded using its 4-bit l 37 = binary mapping; efficient for clocks,
Coded binary value 0011 simple for display large calculators,
Decima (weighted). 0111 devices numbers display
l) (BCD) drivers
Gray A non-weighted Decima Reduces errors in Not suitable Rotary/
Code code where only l 5: mechanical/electro for optical
one bit changes Binary nic switching; arithmetic encoders,
between 0101 → simple error operations Karnaugh
consecutive Gray avoidance maps
numbers, reducing 0111
transition errors.
Excess- Non-weighted code; Decima Self- Not Early digital
3 each digit is the l 4: complementing, intuitive; computers,
corresponding BCD 4+3=7 good for error less space- some
+ 3, encoded in → detection efficient calculators
binary. Binary than pure
0111 binary
ASCII Alphanumeric code 'A' = Standardized, Original Text storage,
uses 7 or 8 bits to 100000 interoperable version computer
encode letters, 1 across systems limited to communicati
numbers, and (binary) only English on
symbols. Widely characters
adopted as a
character encoding
standard.
Different Digital Codes and their conversion
Code Conversion Examples
1. Binary to BCD
Binary 110010 (decimal 50)
Separate digits: 5 = 0101, 0 = 0000
BCD: 0101 0000
2. Binary to Gray
Binary 1011:
First bit same: 1
1⊕0 = 1, 0⊕1 = 1, 1⊕1 = 0
Gray: 1110
3. BCD to Excess-3
Decimal 6:
BCD: 0110
Add 3: 0110 + 0011 = 1001
Excess-3: 1001
Key Takeaways
Code choice depends on application: display and calculators use BCD, rotary encoders
use Gray, memory communication adopts parity/Hamming, and most text is handled by
ASCII.
Code converters are necessary where systems with different coding schemes
interface, such as BCD-to-seven-segment drivers in digital displays or Gray-to-binary
converters in mechanical encoders.
Advantages and disadvantages highlight trade-offs in efficiency, error resistance,
complexity, and ease of use.
This report summarizes the essential technical details, conversion methods, and real-world
implications of choosing specific digital codes in electronic systems.