0% found this document useful (0 votes)
25 views7 pages

Exp 10

Uploaded by

Awais khalid
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
25 views7 pages

Exp 10

Uploaded by

Awais khalid
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 7

Name: Abdul Rehman

Reg.no:L1F21BSME0017

EXPERIMENT #10

DESIGN AND IMPLEMENTATION OF DECIMAL TO


BINARY ENCODER

EQUIPMENT:
1. Advanced Digital Logic Trainer
2. Connecting Wires
3. IC Type 7432 Quadruple 2- input OR gate

INTRODUCTION:
An encoder is a combinational circuit that performs the inverse operation of a decoder. If a
device output code has fewer bits than the input code has, the device is usually called an
encoder e.g. 2n – to -n, priority encoders.
The simplest encoder is 2n – to –n binary encoder, where it has only one of the 2n inputs =1

and the output is the n-bit binary number corresponding to the active input.

Octal to binary encoder takes 8 inputs and provides 3 outputs, thus doing the opposite of what
the 3-to-8 decoder does. At any one time, only one input line has a value of 1.
Decimal to binary encoder takes 10 inputs and provides 4 outputs, thus doing the opposite of
what the 4-to- 10 decoder does. At any one time, only one input line has a value of 1.

DECIMAL TO BINARY ENCODER:


Figure 2: Decimal to BCD Encoder Logic Circuit

For 10-4 decimal to BCD encoder with inputs D0-D9 the logic expressions of the outputs
A0A3 will be as given below:
A3 = D8 + D9 A2 = D4 + D5 + D6 + D7 A1 = D2 + D3 + D6 + D7
A0 = D1 + D3 + D5 + D7 + D9
Decimal Decimal Code Inputs BCD Code
Digits Outputs

D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 A3 A2 A1 A0

0 1 0 0 0 0 0 0 0 0 0 0 0 0 0

1 0 1 0 0 0 0 0 0 0 0 0 0 0 1

2 0 0 1 0 0 0 0 0 0 0 0 0 1 0

3 0 0 0 1 0 0 0 0 0 0 0 0 1 1
4 0 0 0 0 1 0 0 0 0 0 0 1 0 0

5 0 0 0 0 0 1 0 0 0 0 0 1 0 1

6 0 0 0 0 0 0 1 0 0 0 0 1 1 0

7 0 0 0 0 0 0 0 1 0 0 0 1 1 1

8 0 0 0 0 0 0 0 0 1 0 1 0 0 0

9 0 0 0 0 0 0 0 0 0 1 1 0 0 1

Table 2: Truth Table for Decimal to Binary Encoder

PROCEDURE:
1. Connect the Advance Digital Logic Trainer to the 220V AC supply.
2. Verify all gates of 74LS32 ICs.
3. For Octal to Binary encoder, make connections as shown in figure 1 and verify the
table
1.
4. As 4 input OR gate is used in figure 1 so to make 4 inputs OR gate with the help of 2
inputs OR gate follow the figure below.

Figure 3: Equivalent Circuit for 4 input OR- Gate

5. For Decimal to BCD encoder make connections as shown in figure 2 and verify the
table
6. As 5 input OR gate is used in figure 2 so to make 5 input OR gate with the help of 2

input OR gate follow the figure given below


Figure 4: Equivalent Circuit of 5 input OR-Gate

7. Complete the lab assignment given on the next page.

Lab Assignment (To be Designed & Implemented by the Student) Design a 4


bit Priority Encoder Logic circuit diagram.

Priority Encoder (Introduction):


The priority encoder is a combinational logic circuit that contains 2^n input lines and n output
lines and represents the highest priority input among all the input lines. When multiple input
lines are active high at the same time, then the input that has the highest priority is considered
first to generate the output. It is used to solve the issues in binary encoders, which generate
wrong output when more than one input line is active high. If more than one input line is active
high(1) at the same time, then this encoder prioritizes every input level and allocates the priority
level to each input. The output of this encoder corresponds to the input that has the highest
priority. To obtain the output, only the input with the highest priority is considered by ignoring
all other input lines. This is a type of binary encoder or an ordinary encoder with a priority
function. The input that has the larger magnitude or highest priority is encoded first rather than
other input lines. Hence, the generated output is based on the priority assigned to the inputs. In
most digital applications, these encoders are used to select the inputs, which have the highest
priority level. This process of selecting the input is called arbitration.
Priority Encoder Inputs Priority Encoder Outputs

D0 D1 D2 D3 A1 A0

0 0 0 1 0 0

0 0 1 0 0 1

0 1 0 0 1 0

1 0 0 0 1 1

Table 3: 4 Bit Priority Encoder

From the Boolean Function.


A1= D3+D2
A0= D3+D1

Logic gate based diagram of 4- bit Priority Encoder Circuit:


CONCLUSION:

The experiment on designing and implementing a Decimal to Binary Encoder was successful,
demonstrating the ability to convert decimal inputs (0-9) into their respective 4-bit binary
representations using combinational logic circuits comprising AND and OR gates. The
encoder accurately mapped each decimal digit to a unique binary code, ensuring reliable and
instantaneous conversion with minimal delay. Practical implementation on simulation software
or breadboards affirmed the functionality and scalability of the design, highlighting its
relevance in digital systems for tasks such as data processing and arithmetic operations. This
experiment enhanced understanding of binary encoding principles and underscored the
practical application of digital logic in converting numerical data between different formats
efficiently and accurately.

Task:

After going through questions and answers related to the experiment, submit a separate report
which should include the analysis of the results of the experiment .

Teacher / Supervisor’s Signature: __________________________________


Date:

Date: _______________________

You might also like