0% found this document useful (0 votes)
27 views

Code Converters

The document describes an experiment to design and test binary-to-gray and gray-to-binary code converters using logic gates. The aim is to convert between the two codes. The procedure involves implementing the logic diagrams on a breadboard and checking the outputs against a truth table. The conclusion discusses applications of code converters and importance of different codes like BCD and Gray codes.

Uploaded by

Mohamed Kamil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

Code Converters

The document describes an experiment to design and test binary-to-gray and gray-to-binary code converters using logic gates. The aim is to convert between the two codes. The procedure involves implementing the logic diagrams on a breadboard and checking the outputs against a truth table. The conclusion discusses applications of code converters and importance of different codes like BCD and Gray codes.

Uploaded by

Mohamed Kamil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

University of Tripoli

Faculty of Engineering
Electrical and Electronic Engineering Department

EE331N – Digital Laboratory


Fall 2022 |2023

Report of the Experiment #9


Code Converters

‫ محمد مصطفى كميل‬: ‫اإلسم‬


0652022212 : ‫رقم القيد‬
)3( : ‫المجموعة‬
‫ حسين سعيد‬.‫ د‬: ‫تحت اشراف‬
Pg. 01 Introduction

Introduction
Binary codes are a system of representing information using only two distinct symbols, typically 0
and 1. Binary codes are used in digital systems such as computers to store, process, and transmit
data. Binary codes can also be used to represent text and other types of data.

BCD Codes
BCD (Binary Coded Decimal) is a type of code used to represent decimal numbers in a binary
format. It is used to store numerical values in a computer system, and is often used to convert
between binary and decimal formats. BCD codes are composed of four bits, each representing a
single decimal digit.

Gray Codes
Gray codes, also known as reflected binary codes, are a type of binary code where each successive
value differs in only one bit. This is useful for reducing the number of errors that can occur when
transmitting data. Gray codes are often used in position encoders, which measure the position of a
rotating shaft.

Code converters
Code converters in digital are circuits that convert one type of digital code into another type of
digital code. They are used to translate between different types of digital signals, such as between
binary and BCD (Binary Coded Decimal). Code converters can also be used to convert analog signals
into digital signals.
Pg. 02 Code Converters Lab

Code Converters Lab


Aim of lab
• To design binary-to-gray and gray-to-binary converters.

Equipment List
 Digital breadboard
 6 Chip – IC 7486 (4-XOR Gates)
 Power supply 5V
 Wires

Procedure

1) Implement the logic diagram of functions 𝑮𝟎, 𝑮𝟏, 𝑮𝟐 & 𝑮𝟑 on the breadboard.

a) Connect inputs 𝑩𝟎, 𝑩𝟏, 𝑩𝟐 & 𝑩𝟑 to four switches.

b) Connect outputs to LEDs or indicator lamp.

2) Flip the switches On/Off, and check the outputs for all possible combinations of inputs.
Tabulate output values for all inputs in a truth table.
Pg. 03 Code Converters Lab

Part 1: Binary-To-Gray (4-bits)

𝑮𝟎 = 𝑩𝟏 ⊕ 𝑩𝟎

𝑮𝟏 = 𝐁𝟐 ⊕ 𝐁𝟏

𝑮𝟐 = 𝐁𝟑 ⊕ 𝐁𝟐

𝑮𝟑 = 𝐁𝟑

Part 2: Gray-To-Binary (4-bits)

𝑩𝟎 = (𝑮𝟑 ⊕ 𝑮𝟐) ⊕ (𝑮𝟏 ⊕ 𝑮𝟎)

𝑩𝟏 = 𝑮𝟑 ⊕ 𝑮𝟐 ⊕ 𝑮𝟏

𝑩𝟐 = 𝑮𝟑 ⊕ 𝑮𝟐

𝑩𝟑 = 𝐆𝟑
Pg. 04 Code Converters Lab

Note: we can simplify the implementation of previous logic diagram from 6-XOR
gates to only 3-XOR gates.
Pg. 05 Code Converters Lab

Result
 The truth table is identical to the circuit outputs for each converter, so the realization of the
design is true.

Conclusion
 The code converter is too important in the digital systems. It's a way to represent the outputs
by the inputs to perform many functions.
 The code converters have many applications like in the Encoders and Decoders.
 The K-maps are the best way to simplify the circuits then you can establish your design.
 One of the important codes is the BCD code, it's a way to express each of the decimal digit with
a binary code. So it's used in the BCD to seven segments Decoder or Encoder where you can put
the BCD values then get the decimals values.
 Gray codes are used in digital communications, where they can reduce the amount of data that
needs to be transmitted by encoding multiple bits into a single symbol.

You might also like