Description
CENG232
Logic Design
Lab 2
1 Introduction
In this laboratory, you are expected to use basic logic gates, decoder and multiplexer. This is a two-fold homework. In Section 3, you are asked to design a circuit for the given problem using Logisim tool. In section 4, you will implement the circuit you designed (in section3) in the lab.
2 IC Pool
• 74LS00
• 74LS02
• 74LS04
• 74LS08
• 74LS32
• 74LS86
• 74LS138
• 74LS153
3 Lab Work
The requirements of the tasks are given as follows:
• You should design a circuit which solves both of the tasks.
The input for task selection should be labelled as S.
• If the input given with S (used for selection of the task) is 0, then your circuit should give the result of task 1. If S is 1, then your circuit should give the result of task 2.
• For both of the tasks:
– You will be given two 2-bit numbers in binary format as inputs which represent decimal numbers between 0-3.
– The digits of the first and second input should be labelled as A0, A1, B0, B1, respectively, where each digit can take either 0 or 1.
– A0/A1 is the least/most significant digit of the first input and B0/B1 is the least/most significant digit of the second input.
• For both of the tasks:
– You are expected to return a 2-bit number as output.
– Your output digits should be labelled as Y0 and Y1 where each digit can take either 0 or 1.
– Y0/Y1 is the least/most significant digit of the output.
• For both of the tasks, the input/output pins will be common for both of the tasks; do not use different input/output pairs for each task.
3.1 Task 1
Given two numbers, you are expected to find the minimum of them. For this purpose;
• Your circuit should return the minimum of these two numbers in binary as output.
• If the numbers are equal, then both numbers are minimum; you are expected to return any of these two numbers as output.
Example 1: If the inputs in decimal format are 0 and 1, the minimum is 0.
(A1 A0 B1 B0 S → Y1 Y0) (0 0 0 1 0→ 0 0)
The decimal 0 and 1 are 00 and 01 in binary format. S is 0 because this is the first task. Y1 and Y0 are both 0 since the minimum of these two numbers is 0 in decimal.
Example 2: If the inputs in decimal format are 3 and 2, the minimum is 2.
(A1 A0 B1 B0 S → Y1 Y0) (1 1 1 0 0→ 1 0)
The decimal 3 and 2 are 11 and 10 in binary format. S is 0 because this is the first task. Y1 and Y0 are 1 and 0, respectively, since the minimum of these two numbers is 2 in decimal.
Example 3: If the inputs in decimal format are 1 and 1, the minimum is 1 (either of them).
(A1 A0 B1 B0 S → Y1 Y0) (0 1 0 1 0 → 0 1)
The decimal 1 is 01 in binary format. S is 0 because this is the first task. Y1 and Y0 are 0 and 1, respectively, since the minimum of these two equal numbers is 1 in decimal.
3.2 Task 2
Given two numbers A and B, you are expected to find the result of ”(A+B) mod 3”. For this purpose;
• A and B are the first and second inputs in decimal, respectively.
A0 and A1 represent the binary equivalence of A; A0/A1 is the least/most significant digit, respectively.
• B0 and B1 represent the binary equivalence of B; B0/B1 is the least/most significant digit, respectively.
• The addition and mod operation will be carried out in decimal arithmetics where the result is expected in binary format.
Example 1: If the inputs in decimal format are 0 and 0, the result of (A+B) mod 3 is:
(0 + 0) mod 3 ≡ 0.
(A1 A0 B1 B0 S → Y1 Y0) (0 0 0 0 1→ 0 0)
The decimal 0 is 00 in binary format. S is 1 because this is the second task. Y1 and Y0 are both 0 since the result of the above arithmetic operation is 0.
Example 2: If the inputs in decimal format are 1 and 2, the result of (A+B) mod 3 is:
(1 + 2) mod 3 ≡ 0.
(A1 A0 B1 B0 S → Y1 Y0) (0 1 1 0 1→ 0 0)
The decimal 1 and 2 are 01 and 10 in binary format. S is 1 because this is the second task. Y1 and Y0 are both 0 since the result of the above arithmetic operation is 0.
Example 3: If the inputs in decimal format are 2 and 2, the result of (A+B) mod 3 is:
(2 + 2) mod 3 ≡ 1.
(A1 A0 B1 B0 S → Y1 Y0) (1 0 1 0 1→ 0 1)
The decimal 2 is 10 in binary format. S is 1 because this is the second task. Y1 and Y0 are 0 and 1, respectively, since the result of the above arithmetic operation is 1.
4 Free Session
There will be a free session week after your homework is announced. You will have 2 hours in your free session slot. During the free session, you will try to build your circuit on a bread board by using IC components, and you will practice how to handle possible problems related to physical circuit.
5 Demo Session
In demo session, you are expected to implement the above homework by building a circuit using IC components on a bread board and show how it works. This part will be graded in lab. Also, you will have a quiz at the very beginning of the demo session.
6 Labelling Specifications
• You have to use ”pins” for your inputs and outputs. Only set ”label” property of the ”pin” objects, do not add a ”label” object.
• Your input pins should be labelled as A0, A1, B0, B1 and S (for task selection).
• Your output pins should be labelled as Y0 and Y1.
• Label properties are case-sensitive. Note that all labels consist of an uppercase letter followed by a number. Please be very careful on correct naming of labels.
If you need to feed any input with a constant value, you can use a constant gate. This gate is under CENG232 gates. We will only set values for A0, A1, B0, B1 and S.
7 Deliverables
2) Submission of a working circuit is a must to attend DEMO lab sessions. You should use CENG version of Logisim1 which is available on COW. Circuits designed with other tools or not named properly will not be graded!
8 What To Bring In The Lab
• Print-out of submitted file of the circuit.
• Chips and their data-sheets. (www.alldatasheet.com)
• Pencil, since you will need in quiz at the very beginning of the DEMO session.




Reviews
There are no reviews yet.