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

CS 270 - Lab 1

Uploaded by

D4L1T50 T3MB0
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

CS 270 - Lab 1

Uploaded by

D4L1T50 T3MB0
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

THE COPPERBELT UNIVERSITY

SCHOOL OF INFORMATION COMMUNICATION AND TECHNOLOGY

STUDENT NAME: Mulenga Sampa

STUDENT NUMBER: 18122972

COURSE: Introduction to Computer Engineering

COURSE CODE: CS 270

LECTURER: Prof. Mbale

LAB TITLE: Decoders and Encoders

LAB NO#: 1

1
TABLE OF CONTENT

1. cover page……………………………………………………………………….1

2. table of content………………………………………………………………….2

3. introduction………………………………………………………………………3

4. installation of Logisim…………………………………………………………..5

5. Objectives………………………………………………………………………..6

6. Designing of Logic Circuits…………………………………………………….7

7. Reference………………………………………………………………………..13

2
INTRODUCTION
What is a Decoder?

 A Decoder or Binary Decoder is a Combinational logic Circuit that accepts n- coded binary
inputs and Produce 2n coded Binary outputs, where n is an interger
 For Example Say you Have 2 binary inputs. Then output gives you 22= 4.

 A decoder is Capable of producing Multiple outputs from multiple inputs of Interger value n.
this means that we Can Have inputs A0 to An − 1 that will Produce B0 to Bn −1 outputs (note that
these are the names assigned not the amount of input or outputs eg 2-to-4 decoder inputs are
assigned as A0 , A1to produce the outputs B0 B1 B2 B4 )

 for each of these input Combinations only one output produces an ACTIVELY HIGH output
While the other inputs combinations produce LOW outputs.That is unless an Enable Input is
introduced Which gives us Something different As demonstrated later in the Designing of the
circuits.
What doe s this mean, this means the output will produce a Logical value 1 when the
circuit runs and the rest we be giving a logical value 0.

 Different Input Combinations only produces one output as 1 for D0, D1, D2 and D3
 Most Common types of Decoders Include the 3-to-8 binary decoder, 2-to-4

What is An Encoder?
 An Encoder, which is the opposite of what a decoder does is also a conbinational logic Circuit
which accepts 2n coded binary input and produce n-output.
 An Encoder examples are 8-to-3 Encoders, 4-to-2 Binary Encoders.
 Some Encoders Include Simple and Priority Encoders.

3
• Under Encoders We have what is called Priority Encoder which is a circuit that Compresses
multiple binary inputs into a smaller number of outputs.
• Priority Encoders have an Included valid indicator Which helps us to show whether Circuit has
valid inputs or not. Because of this it is an improvement to the Simple Encoder and can easily
be Connected in arrays to make larger Encoders such as 16-to-4 made from six 4-to-2 Priority
Encoders.

In This Lab Session we are going to Analyse, Design, and Execute different Combinations of Gates that
form different types of Encoders and Decoders.

4
INSTALLATION OF LOGISIM
Logisim is a Java Powered Logic Simulator app that allows us to Simulate and Design Circuits on
Graphical User Interface Platforms.

Logisim for Windows Comes in two Formats. That is Logisim.exe and Logisim.jar either one used
still needs a java environment.

In this Lab session we are told to use the latest downloaded version of Logisim which is of version
2.7.1

Logisim is Easy to install with the following Steps.

1. We first Download Logisim at http://sourceforge.net/projects/circuit and search Logisim. This is


the one with the jar extension. If you want the one with an executable file you can get at
http://logisim.en.updown.com/windows/ and search logisim. Alternatively We google Logisim
for Windows. And both of the mentioned web site will come up.
2. Then we download Java online installation for Windows If PC does not have java pre-installed.
https://www.java.com/en/. With an active internet connection run the Java Executable file and
wait for it to download, then we click on the install button.
3. Logisim does not need to install as it comes as stand alone executable file. We simply just run it
and it works (that is if the java was installed correct.

PLATFORM REQUIREMENTS ON WINDOWS

 Needs a JAVA 5 and above environment.


 Requires about 6-8 megabytes of free hard drive space
 Hardware devices needed include a mouse or touch pad or anything similar.

4
OBJECTIVES

 We are expected to design different Examples of Decoders and Encoders in their And, Or and
Not Logic Forms using Logisim Sofware.
 We are Expected with the help of logisim to explain the different properties of Logic circuits
from the given conceptual notes: topic three: Decoders and Encoders. SLIDE 17, SLIDE 41for
Decoders and SLIDE 37 for the Encoders.
 We are also expected to Write a report to Support our Observations.

5
DESIGNING OF CIRCUITS

Q1. DECODERS.

A,SLIDE 17: 2-to-4 Line Decoder (Active high input to low output):

TRUTH TABLE COMPARISON:

6
 We know its called 2-to-4 but the circuit has an extra input E. this is called the Enable input
 We have E which is the ENABLE INPUT. When E is 0, Only one output is 0, the rest
have ones as shown in the truth table.
 however when E is 1 or the outputs come out as 1, even despite the values of A and B on the
input, Same applies to the 3-to-8 Decoder

B. SLIDE 41: 2-to-4 Binary Decoder

7
 In this Circuit An Enable Input Has being Subtracted from the Circuit, For this Circuit the only
one output comes out as Active (1) despite the input Combination done.

TRUTH TABLE:

 Adding NAND gates the diagonal formed in the truth table is inverted.

8
 Adding An Enable Input to this Circuit Brings Back to the previous Circuit in SLIDE 17 With
Input 0 on ENABLE INPUT giving us three Actively High outputs while Input 1 on The Enable
Input Gives us all Outputs as Actively High.

9
Q2. ENCODERS

A. SLIDE 37: Design of 4-input Priority Encoder( 4-line-to 2 line priority encoder):

LOGISIM TRUTH TABLE: CONCEPTUAL NOTES TRUTH TABLE:

10
• V is called the valid bit indicator, Which as the name suggests helps to validate, as seen in the
logic Circuit and the truth table When all the inputs are 0 the Value of V is also 0.
• when one of the inputs is 1, then the value of V will always be 1.
• Also D3 input has the highest priority. This can be seen when a 1 is entered on D3 and produces
the output combination of 1, 1 regardless of what the other inputs are.
• That is what the X’s in the Conceptual notes truth table represents. They represent a condensed
structure of the logic circu
• it It just simply means that no matter what the inputs or outputs are the value of output is the
same.

11
12
REFERENCES
• http://www.wikipedia.com/combinational_logic_circuits

• Conceptual Slide notes topic 3 DECODERS AND ENCODERS.

• Mano Kime Logic and Computer design fundamentals.pdf

• Youtube Tutorial videos. And google search

• Proffesor Mbale’s Lecture Classes

13

You might also like