0% found this document useful (0 votes)
377 views8 pages

Experiment 4 - Code Conversion

This document discusses code conversion in digital systems. It describes three types of codes: binary coded decimal (BCD) code, weighted codes, and non-weighted codes. For two code conversion tables, it instructs using K-maps to obtain conversion expressions and creating VHDL projects to simulate the conversions and view the RTL schematics. The goal is to familiarize students with representing data in different coding systems and converting between codes.

Uploaded by

Mustafa Maher
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)
377 views8 pages

Experiment 4 - Code Conversion

This document discusses code conversion in digital systems. It describes three types of codes: binary coded decimal (BCD) code, weighted codes, and non-weighted codes. For two code conversion tables, it instructs using K-maps to obtain conversion expressions and creating VHDL projects to simulate the conversions and view the RTL schematics. The goal is to familiarize students with representing data in different coding systems and converting between codes.

Uploaded by

Mustafa Maher
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/ 8

Second Year – 2nd Semester Digital Systems Design Lab. Assist. Lect.

Eman Karim

Experiment 4 - Code Conversion

Objective:

To get familiar with Code Conversion.

Theory:

Any entity expressible as numbers, letters, or other symbols can be represented by


binary codes, and therefore can be processed by digital circuits. The combinations of
binary codes that represent numbers, letters, or symbols are digital codes. There are
many methods or techniques which can be used to convert code from one format to
another.

1. Binary Coded Decimal (BCD) Code

In this code, each decimal digit is represented by a 4-bit


binary number. BCD is a way to express each of the
decimal digits with a binary code. With four bits we can
represent sixteen numbers (0000 to 1111). But in BCD
code only the first ten of these are used (0000 to 1001).
The remaining six code combinations i.e. 1010 to 1111
are invalid in BCD.

1
Second Year – 2nd Semester Digital Systems Design Lab. Assist. Lect. Eman Karim

2. Weighted Codes

Weighted binary codes are those binary codes which obey the positional weight
principle. Each position of the number represents a specific weight. Several systems
of the codes are used to express the decimal digits 0 through 9. In these codes, each
decimal digit is represented by a group of four bits.

3. Non-Weighted Codes

In this type of binary code, the positional weights are not assigned. The examples of
non-weighted codes are Excess-3 code and Gray code.

2
Second Year – 2nd Semester Digital Systems Design Lab. Assist. Lect. Eman Karim

Procedure:

Lab4a: Use K- maps to obtain the code conversion (expressions of W,X,Y,Z ) for
the table below. Create (Lab4a) project to run the VHDL file using Quartus
Prime Lite. Show the RTL Viewer and Simulation.

3
Second Year – 2nd Semester Digital Systems Design Lab. Assist. Lect. Eman Karim

The VHDL Code is:

The RTL Simulation is:

4
Second Year – 2nd Semester Digital Systems Design Lab. Assist. Lect. Eman Karim

The RTL Viewer is:

5
Second Year – 2nd Semester Digital Systems Design Lab. Assist. Lect. Eman Karim

Lab4b: Use K- maps to obtain the code conversion (expressions of W,X,Y,Z ) for
the table below. Create (Lab4b) project to run the VHDL file using Quartus
Prime Lite. Show the RTL Viewer and Simulation.

6
Second Year – 2nd Semester Digital Systems Design Lab. Assist. Lect. Eman Karim

The VHDL Code is:

The RTL Simulation is:

7
Second Year – 2nd Semester Digital Systems Design Lab. Assist. Lect. Eman Karim

The RTL Viewer is:

You might also like