CALD Lab Performance Assignment 25122023 124104am

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

BAHRIA UNIVERSITY, (Karachi Campus)

Department of Software Engineering


Semester Fall 2023
Lab performance (CLO - 1)

Course Title: Computer Architecture & Logic Design Lab Course Code: CEL 220
Course Instructor: Engr. Ramsha Mashood Class: BSE-3(A/B/C)
Lab Instructor: Engr. Noor us Sabah Date: 22nd December, 2023

Name: _______________ Reg. no: ______________

NOTE:
 Try to submit the tasks on LMS in given Time.
 Include your name or enrollment no. on footer.
 Attempt tasks according to your absent lab session.

TASK # 01: (LAB – 1/2/3)


You are tasked with designing a Vending Machine in VVM language that dispenses different
products based on user input. The VVM has three products available:
1. Water bottle priced at 20 units
2. Snack bar priced at 35 units
3. Juice pack priced at 50 units
Write a program using loops, addition, and subtraction functionalities in VVM to accomplish the
following:
1. Continuously prompt the user to input the amount of money they are inserting into the
Vending Machine.
2. Display the current total amount entered by the user after each input.
3. Once the user reaches or exceeds the price of any product, subtract the cost of the product
from the total amount entered and dispense the product.
4. If the user enters an amount that is insufficient for any product, display a message
indicating the remaining amount needed to purchase that product.
Your program should continue until the user decides to exit by entering a specific exit command.
TASK # 02: (LAB – 4/5/6/7)
You are required to implement a program in MIPS assembly that performs a bitwise rotation on a
given input number using shift operations (SLL and SRL). The program should do the following:
1. Prompt the user to enter a decimal number (assume a positive integer within the valid
range).
2. Convert the decimal number into its binary representation.
3. Perform a circular left shift (SLL) on the binary representation of the input number.
4. Perform a circular right shift (SRL) on the result obtained from the left shift operation.
5. Display the final result, which represents the number after the circular rotation.
Your program should perform these circular shifts on the binary representation of the input number
and display the final result after the right shift.

TASK # 03: (LAB – 8/9/10)


You are tasked with designing and simplifying a Boolean expression that represents a given truth
table. Consider the following truth table:

A B C Output

0 0 0 1

0 0 1 0

0 1 0 1

0 1 1 0

1 0 0 0

1 0 1 1

1 1 0 1

1 1 1 0

Your task involves the following steps:


1. Derive a Boolean expression that represents the output column in terms of inputs A, B, and
C based on the given truth table.
2. Implement the Boolean expression using logic gates (AND, OR, NOT gates) and draw a
logic circuit diagram.
3. Simplify the Boolean expression using Boolean algebra laws and the Karnaugh map
method.
4. Implement the simplified expression using logic gates and draw the revised logic circuit
diagram.
Your solution should provide the step-by-step process, including the Boolean expression, the logic
circuit diagrams before and after simplification, and the detailed steps taken to simplify the
expression.

TASK # 04: (LAB – 11/12/13)


Design a circuit that performs the addition of two 4-bit binary numbers using full adders and
multiplexers.
Requirements:
1. Implement two 4-bit inputs (A and B) that will be added together.
2. Use full adders to perform the addition operation.
3. Utilize a 4:2 multiplexer to select which bit’s (i.e. full adders sum result) sum should be
displayed along with the carry out of the last full adder of the circuit built in step 1 and 2.

G😊☹️D LUCK

You might also like