CS 270 - Lab 1
CS 270 - Lab 1
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
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
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):
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
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):
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
13