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

Department of Computer Science & Engineering: Mr. M Ahmer Usmani Assistant Professor & Subject In-Charge

The document provides details about the experiments to be conducted in a Machine Organization and Microprocessor lab course. It includes 10 experiments covering topics like logic gates, half/full adders, assembly language programming, bit operations, and data transfer. The document outlines objectives and methodology, and provides hardware/software requirements and guidelines for students. It describes setting up the budget to build a computer system and studying its various parts like the motherboard, processor, graphics card, and storage devices.

Uploaded by

rocky
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
100 views

Department of Computer Science & Engineering: Mr. M Ahmer Usmani Assistant Professor & Subject In-Charge

The document provides details about the experiments to be conducted in a Machine Organization and Microprocessor lab course. It includes 10 experiments covering topics like logic gates, half/full adders, assembly language programming, bit operations, and data transfer. The document outlines objectives and methodology, and provides hardware/software requirements and guidelines for students. It describes setting up the budget to build a computer system and studying its various parts like the motherboard, processor, graphics card, and storage devices.

Uploaded by

rocky
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

LAB MANUAL

COURSE NAME- Machine Organization and Microprocessor Lab

July - December (2021-22)

SEMESTER: III

__________________
Mr. M Ahmer Usmani
Assistant Professor &
Subject In-charge
INDEX

Sr. No.
Contents
1. Experiment 1: Case study on budget for building of your own computer
2. Experiment 2: Case study on I/O Ports

3. Experiment 3: Study and verify the truth table of all logic gates

4. Experiment 4: Design a Half Adder and Full Adder using basic gates.

5. Experiment 5: WAP to display ‘Hello world’ using ALP

6. Experiment 6: WAP to perform addition to two 8bits number using ALP

7. Experiment 7: WAP to multiply two 8-bit number using ALP

Experiment 8: WAP to set, clear and flip of bit in a given number using
8.
logical operation
Experiment 9: WAP to count the number of 1’s in a 8-bit number using
9.
ALP
Experiment 10: WAP to transfer a block of data from one place to another
10.
using string instruction
I. Student Learning Objectives:
Upon successful completion of this course, students will be able to:

1. Learn assembling and disassembling of PC.


2. Get hands on experience with Assembly Language Programming.
3. Study interfacing of peripheral devices with 8086 microprocessor.
4. Understand techniques for faster execution of instructions and improve speed of
operation and performance of microprocessors.
5. Learn fundamentals of designing embedded systems
6. Write and debug programs in TASM/MASM/hardware kits

II. Outcomes:
The outcomes satisfied by the course are listed below as a reference:
1) An ability to apply knowledge of mathematics, science, and engineering
2) An ability to design and conduct experiments, as well as to analyze and interpret data
3) An ability to function on multi-disciplinary teams
4) An ability to identify, formulate, and solve engineering problems
5) An understanding of professional and ethical responsibility
6) An ability to communicate effectively
7) The broad education necessary to understand the impact of engineering solutions in a
global and societal context
8) A recognition of the need for, and an ability to engage in life-long learning
9) A knowledge of contemporary issues
10) An ability to use the techniques, skills, and modern engineering tools necessary for
engineering practice
11) Specialization in one or more technical specialties that meet the needs of industry

The manual provides the user with the following details regarding the experiments to be
completed:
1. Aim
2. Theory
3. Experiment Implementation
4. Experimental Result/Analysis
5. Conclusion
III. Hardware Requirements:
• PC i3 or above configuration.

Software requirements
• TASM
• Wine

Requirements:
• Internet Connection for each PC with at least 2 MBPS Bandwidth

IV. Methodology of Conduct of Practical Exercises:

The course titled “Microprocessor Programming Lab” has a 2-hour practical session every week
in the entire semester. It contains Experiments and Assignments/ experiments as given in the
syllabus.

V. Instructions:
1. Each experiment should be performed based on concept outlined for each experiment.
2. The faculty or the instructor should explain the concept or algorithm.
3. The student should be encouraged to provide different outputs from the program by
providing varying inputs to each experiment and these outputs should be recorded in the
individual student report.
4. All the student records should contain the following details with respect to each and every
experiment.
a) Problem Statement: It should contain a one- or two-line description of the
problem being solved.
b) Aim: It should contain the brief objective of the problem being solved.
c) Theory: It should contain the step-by-step procedure or methods followed for
completing the experiments.
5. Students should implement the given experiment, which should be signed by the concerned
authority on the date of submission.
6. A record of the work should be submitted at the end semester examination.
VI. Guidelines to Students:

1. Equipment in the lab for the use of student community. Students need to maintain a
proper decorum in the lab. Students must use the equipment with care. Any damage
caused is punishable.
2. Students are required to carry their completed experiment file while entering the lab.
3. Students are supposed to occupy the machines allotted to them and are not supposed to
talk or make noise in the lab.
4. Lab can be used in free time / lunch hours by the students who need to use the systems
should take prior permission from the lab in-charge.

VII. Do’s and Don’ts in the Lab:


Do’s:-
• Proper uniform has to be maintained while entering in the Lab. (Boys Tuck-in and girls
should be neatly dressed)
• Students should carry observation notes and record completed in all aspects.
• Student should be aware of the next experiment before coming to the lab.
• Students should be at their concerned table, unnecessary movement is to be restricted.
• Student should follow the procedure to start implementing the experiment with the
permission of faculty in-charge / lab assistant. They need to switch on their respective
systems and after completing the same they need to switch it off and keep the chairs in
order.
• The Practical Result should be noted down into their lab-book and result must be shown
to the faculty in-charge for verification.
• Students must ensure that all switches are in the OFF position; all the systems are shut
down properly before leaving the lab.

Don’ts:-
• Don’t come late to the Lab.
• Don’t leave the Lab without shutting down all the systems and keeping the chairs in
order.
• Don’t leave the Lab without verification by faculty-incharge / lab assistant.
• Don’t leave the lab without the permission of the faculty In-Charge
Experiment No. : 01

Experiment Title: To study the parts of computer system. Built your own
computer and find out the overall budget of your PC.

Theory:

To understand the actual working of computer system we must have an idea of the parts
that makes a computer.
A modern computer may contain hundreds of different controllers and chips, but even
the most complicated of machines can be boiled down to a few simple parts. Understanding
just these parts can give you an excellent idea of how a computer operates.
Following are some of the essential components / parts of a computer.

1. Motherboard

The motherboard is the main circuit board that all other computer components either sit in or
are connected to. A motherboard (sometimes alternatively known as the main circuit board,
system board, baseboard, planar board or logic board is the main printed circuit board (PCB)
found in general purpose micro-computers and other expandable systems. All the functions of
computer depend on the motherboard. The motherboard type will determine what kind of
processor and memory chips can be installed on the computer, along with what kind of external
connections, such as USB, are natively supported. Some motherboards also will include
onboard video and sound, removing the need for expansion cards.
2. Processors Central
Processing Unit

A central processing unit (CPU) is the


electronic circuitry within a computer that carries out the instructions of a computer program
by performing the basic arithmetic, logic, controlling, and input/output (I/O) operations
specified by the instructions. The processor is probably the most important internal part of your
computer, as it is where almost all of the computations required to run the computer take place.
The processor sits inside of a small socket near the middle of the motherboard, and on top of
executing code for your programs, it also controls how the other computer components
communicate and operate. The processor's power is measured in megahertz, and more recently
gigahertz, with a higher number representing more processing power.

Graphics Processing Unit /


Video
Card

A graphics processing unit (GPU) is a specialized electronic circuit designed to rapidly


manipulate and alter memory to accelerate the creation of images in a frame buffer intended
for output to a display device. GPUs are used in embedded systems, mobile phones, personal
computers, workstations, and game consoles. While some older motherboards have built-in
video, most modern systems require a separate video card to output graphics. The pure
computational power required to render modern graphics require a separate processor and
cooling unit that is housed on this video card. The card itself is connected to the motherboard
using an expansion slot.

3. Storage Devices
Primary / Main Memory

Primary storage (also known as main memory or internal memory), often referred to simply as
memory, is the only one directly accessible to the CPU. The CPU continuously reads
instructions stored there and executes them as required. Any data actively operated on is also
stored there in uniform manner. It is a volatile memory. Random-access memory (RAM) is a
form of computer data storage that stores data and machine code currently being used. A
random-access memory device allows data items to be read or written in almost the same
amount of time irrespective of the physical location of data inside the memory. When the
processor needs information for a program or task, it first loads that data into random access
memory. or RAM. RAM is shortterm memory, meaning that it gets wiped out every time the
computer loses power or gets reset, but its speed of access makes it ideal for being the
computer's primary storage.

Secondary Memory

Secondary storage (also known as external memory or auxiliary storage), differs from primary
storage in that it is not directly accessible by the CPU. The computer usually uses its
input/output channels to access secondary storage and transfers the desired data using
intermediate area in primary storage. Secondary storage does not lose the data when the device
is powered down—it is non-volatile.
e.g. Hard Disk Drives, Solid State Drives, USB Pen-drive, Optical Disk Drive
Hard Drive

A hard disk drive (HDD), hard disk, hard drive, or fixed disk, is an electromechanical data
storage device that uses magnetic storage to store and retrieve digital information using one or
more rigid rapidly rotating disks (platters) coated with magnetic material. The platters are
paired with magnetic heads, usually arranged on a moving actuator arm, which read and write
data to the platter surfaces. When the processor needs a file or set of files to run a program, it
copies them from the hard drive and loads those copies into RAM. Hard drive capacities are
measured in gigabytes, or sometimes terabytes, with the larger numbers representing more
capacity.

4. Expansion Slots

These slots sit near the back of the computer and allow you to install devices to upgrade the
system. These devices, which look like cards that slide into these slots, can be used for audio,
video, network capabilities, additional USB connections and more. Some slots, like an AGP
slot, are used exclusively for
video cards, but most of the
slots on modern systems are
generic PCI-X slots that are
used for all cards.
5. Network interface
controller
A network interface controller (NIC, also known as a network interface card, network adapter,
LAN adapter or physical network interface, and by similar terms) is a computer hardware
component that connects a computer to a computer network. Early network interface
controllers
were commonly implemented on expansion cards that plugged into a
computer bus. The low cost and ubiquity of the
Ethernet standard means that most newer
computers have a network interface built into the motherboard.

6. Power Supply

The power supply is generally located in one corner of the back side of your computer case.
On the side that faces out of the computer it has a single plug for your power cable and openings
for the cooling fan. On the side that faces the inside of the system it has a set of power wires
that you use to supply power to all the computer's internal devices. Some devices, like RAM
or small expansion cards, get enough power through the motherboard so they don't need a direct
connection to the power supply, but most other device does need to be plugged into one of
these wires to operate.

(1) Processor:
Intel Core i7 6800 (3.4 Ghz)
Rs. 38000
(2)
Motherboa rd:
Asus STRIX Z270F GAMING Rs.
17000 (3) RAM:
Corsair CML16GX4M4A2400C14 16 GB(4x4 GB)
DDR4 Rs. 19999 (4) HDD:
Seagate Barracuda
ST2000DM001 2TB Rs.
6190 (5) SSD:
Samsung 840 Series Mz-7TD120BW
(120 GB)
Rs. 7250
(6) Graphic Card:
Asus NVIDIA GeForce GTX 960
4GB GDDR5
Rs.20200
(7) Optical card:
LG WH14NS40 Blu-ray Burner
Rs. 7260
(8) Power Supply: Corsair CX430 430W 80% Rs.
2990
(9)
Cabinet
:
Corsair Carbide 500R
Rs. 8950
(10)
Monitor:
Dell U2414H (24”) (1920x1080) Rs.
23250
(11) Keyboard:
Microsoft Desktop800 (Wireless)
Rs. 1820
(12) Mouse:
Dell WM311 Mouse ( Wireless)
Rs. 1440
(13)
Headphon e:
Sony MDR-XBEX Extra Bass
(canalphone) (wired)
Rs. 1980
(14) Speaker:
Philips SPA20 USB Speaker (2.0)
Rs.600
(15)
Webcam
:
Microsoft LifeCam HD (68 CFM) (24
dB)
Rs. 1380
(16) Cabinet Cooler:
Corsair AF140 Cooler (68 CFM) (24
dB)
Rs. 1898
(17) CPU Cooler:
Cooler Msater Hyper 212 EVO Cooler
(82 CFM) (36 dB)
Rs. 2345
(18) Sound Card:
ASUS Xonar DX 701
Rs. 5678

TOTAL PRICE:
RS. 678899/-

Conclusion: Thus, we have studied and understood different internal parts of a


computer. We have also evaluated the functions and their uses in a computer
system.
Experiment No.: 02

Experiment Title: To study the different input and output ports of a


computer.

Theory:

A connection point that acts as interface between the computer and external devices like
mouse, printer, modem, etc. is called port. Ports are of two types −

Internal port − It connects the motherboard to internal devices like hard disk drive, CD drive,
internal modem, etc.

External port − It connects the motherboard to external devices like modem, mouse, printer,
flash drives, etc.
The word "port" is used often in the computer industry, and has many different meanings
depending on what technology is being referred to. In this section, we detail input/output (I/O)
ports. I/O ports allow for connections to hardware. This hardware could be internal or external.
The ports are associated with copper circuits and memory ranges that allow the
communication of data between the CPU, RAM, and the ports themselves. Common I/O ports
include USB and FireWire. In this section, we also discuss SCSI, audio connections, MIDI,
and RG-6 coaxial ports. Although the most important I/O port on recent systems is the USB
port, you might also encounter other ports, including legacy ports such as serial and parallel,
which we speak to in this section as well.

The word "port" is used often in the computer industry, and has many different meanings
depending on what technology is being referred to. In this section, we detail input/output (I/O)
ports. I/O ports allow for connections to hardware. This hardware could be internal or external.
The ports are associated with copper circuits and memory ranges that allow the
communication of data between the CPU, RAM, and the ports themselves.

Common I/O ports include USB and FireWire. In this section, we also discuss SCSI, audio
connections, MIDI, and RG-6 coaxial ports. Although the most important I/O port on recent
systems is the USB port, you might also encounter other ports, including legacy ports such as
serial and parallel, which we speak to in this section as well.
Serial Port:
Serial ports transmit data sequentially one bit at a time. So they need only one wire to transmit
8 bits. However it also makes them slower. Serial
ports are usually 9-pin or 25-pin male connectors. They are also known as COM

(communication) ports or
RS323C ports

Parallel Port:
Parallel ports can send or receive 8 bits or 1 byte at a time. Parallel ports come in form of 25-
pin female pins and are used to connect printer, scanner, external hard disk drive, etc.

USB Port
USB stands for Universal Serial Bus. It is the industry standard for short distance digital data
connection. USB port is a standardized port to connect a variety of devices like printer, camera,
keyboard, speaker, etc.
PS-2 Port
PS/2 stands for Personal System/2. It is a female 6-pin port standard that connects to the male
mini-DIN cable. PS/2 was introduced by IBM to connect mouse and keyboard to personal
computers. This port is now mostly obsolete, though some systems compatible with IBM may
have this port.

Infrar ed Port
Infrare d port is a port that enables wireless exchange of data within a radius of 10m. Two
devices that have infrared ports are placed facing each other so that beams of infrared lights
can be used to share data.
Bluetooth Port
Bluetooth is a telecommunication specification that facilitates wireless connection between
phones, computers and other digital devices over short range wireless connection. Bluetooth
port enables synchronization between
Bluetooth-enabled devices. There are two types of Bluetooth
ports −

• Incoming − It is used to receive connection from Bluetooth devices.


• Outgoing − It is used to request connection to other Bluetooth devices.

Fir e

Wi
re
Por t
Fire
Wir
e is
Appl
e Computer’s interface
standard for enabling high speed communication using serial bus. It is also called IEEE 1394
and used mostly for audio and video devices like digital camcorders.

DisplayPort
DisplayPort (DP) is a digital display interface developed by a consortium of PC and chip
manufacturers and standardized by the Video Electronics
Standards Association (VESA). The interface is primarily used to connect a video source to a
display device such as a computer monitor, and it can also carry audio, USB, and other forms
of data.[2]
DisplayPort was designed to replace VGA, DVI, and FPD-Link. The interface is backward
compatible with other interfaces, such as HDMI and DVI, through the use of either active or
passive adapters.
SCSI
Small Computer System Interface is a set of standards for physically connecting and
transferring data between computers and peripheral devices. The SCSI standards define
commands, protocols, electrical, optical and logical interfaces. SCSI is most commonly used
for hard disk drives and tape drives, but it can connect a wide range of other devices, including
scanners and CD drives, although not all controllers can handle all devices. The SCSI standard
defines command sets for specific peripheral device types; the presence of "unknown" as one
of these types means that in theory it can be used as an interface to almost any device, but the
standard is highly pragmatic and addressed toward commercial requirements.

DE-9:

A D-sub contains two or more parallel rows of pins or sockets usually surrounded by a D-
shaped metal shield that provides mechanical support, ensures correct orientation, and may
screen against electromagnetic interference. The part containing pin contacts is called the male
connector or plug, while that containing socket contacts is called the female connector or
socket. The socket's shield fits tightly inside the plug's shield. Panel mounted connectors
usually have threaded nuts that accept screws on the cable end connector cover that are used
for locking the connectors together and offering mechanical strain relief. Occasionally the nuts
may be found on a cable end connector if it is expected to connect to another cable end (see
the male DE-9 pictured). When screened cables are used, the shields are connected to the
overall screens of the cables. This creates an electrically continuous screen covering the whole
cable and connector system.

Conclusion:Thus we have studied input/output ports


Experiment No.: 03
Experiment Title: Study and verify the truth table of all logic gates (Basic
and Universal).

Theory: -
1) Basic Gates: -
Logic Gates are the basic building blocks of any digital system. It is an
electronic circuit having one or more than one input and only one output.
The relationship

are named as AND gate, OR gate, NOT gate etc.

AND Gate: -

A circuit which performs an AND operation is shown figure below and


verifying the truth table,

between the input and the output is certain logic. Based on this, logic
based on a gates

1) A= 0 AND B= 0 2) A= 0 AND B= 1

3) A= 1 AND B= 0 4) A= 1 AND B= 1

OR gate: -

A circuit which performs an OR operation is shown in figure below and


verifying the truth table below,

1) A= 0 OR B= 0 2) A= 0 OR B= 1

3) A= 1 OR B= 0 4) A= 1 OR B= 1

NOT gate: -

NOT gate is also known as Inverter. It has one input A and one output B is
shown in figures and verifying the truth table below,

1) A= 0

2) A= 1

2) Universal Gates: -
A universal gate is a gate which can implement any Boolean function
without need to use any other gate type. The NAND and NOR gates are
universal gates.

NAND gate: -

NAND gate represents the complement of the AND operation. A NOT-AND


operation is known as NAND operation. The figures of NAND is shown and
verifying the truth table below,

1) A= 0 NAND B= 0 2) A= 0 NAND B= 1

3) A= 1 NAND B= 0 4) A= 1 NAND B= 1

NOR gate: -

NOR gate represents the complement of the OR operation. A NOT-OR


operation is known as NOR operation. The figures of NOR is shown and
verifying the truth table below,

1) A= 0 NOR B= 0 2) A=0 NOR B= 1

3) A= 1 NOR B= 0 4) A= 1 NOR B= 1

Conclusion: - Therefore, we have studied and verified the logic gate i.e.
basic gate and universal gate.


Experiment No.: 04
Experiment Title: Design a Half Adder and Full Adder using basic gates.

Theory: -
1) Half Adder (HA): - The addition of 2 bits is done using a combination
circuit called half adder (HA). Input variables are augend and addend bits
and output variables are sum and carry bits. A and B are the two input bits.

2) Full Adder (FA): - It is the adder which adds three inputs and produces
two outputs. The first two inputs are A and B and the third input is an input
carry as C- IN. The output carry is designated as C-OUT and the normal
output is designated as S which is SUM.
Conclusion: - Therefore, we have successfully and working statement of
half adder and full adder.
Experiment No.: 05
Experiment Title: Write a program to display hello world using ALP.

Code:

Output:
Conclusion: Thus, we have successfully executed program to display hello
world using ALP.
Experiment No.: 06
Experiment Title: Write a program to perform addition of two 8 bit numbers
using ALP

Code:
Output:

Conclusion:Thus,we have successfully written a program to perform addition


of two 8 bit numbers using ALP.
Experiment No.: 07
Experiment Title: Write a program to perform multiplication of two 8 bit
numbers using ALP

Program Code:

data segment a db 09h b


db 02h c dw ? data ends
code segment assume
cs:code, ds:data
start: mov ax,data mov
ds,ax mov ax,0000h mov
bx,0000h mov al,a mov
bl,b mul bl mov c,ax
int 3 code ends end
start
Output:

Conclusion: Hence, we have successfully executed the program to


multiply two 8-bit numbers using ALP.
Experiment No.: 08
Experiment Title: Write a program to set, clear and flip of bit in a
given number using logical operation.

Code:
1. To Set the Data
DATA SEGMENT
DATA ENDS

CODE SEGMENT ASSUME


ds:DATA,cs:CODE START:
MOV AX,DATA
MOV DX,AX
MOV BX,1234H
MOV CX,0FFFFH
OR BX,CX
MOV DX,BX

MOV AH,02H
INT 21H

MOV AH,4CH
INT 21H
CODE ENDS
END START
2 .To Clear the Data
DATA SEGMENT
DATA ENDS

CODE SEGMENT ASSUME


ds:DATA;cs:CODE START:
MOV AX,DATA MOV
DX,AX
MOV BX,1234H
MOV CX,0000H
AND BX,CX
ADD BX,30H
MOV DX,BX

MOV AH,02H
INT 21H

MOV AH,4CH
INT 21H
CODE ENDS
END START
3 .To Flip the Data
DATA SEGMENT
DATA ENDS

CODE SEGMENT ASSUME


ds:DATA;cs:CODE START:
MOV AX,DATA MOV
DX,AX
MOV BX,1234H
MOV CX,0ffffh
XOR BX,CX
ADD BX,00H
MOV DX,BX
MOV AH,02H
INT 21H
MOV AH,4CH
INT 21H
CODE ENDS
END START
Conclusion: Thus, we have successfully executed program to set, clear
and flip of bit in a given number using logical operation.
Experiment No.: 09
Experiment Title: Write a program to count the number of 1's in a 8 bit
number using ALP.

Code:

Output:
Conclusion: Thus, we have successfully executed program to count the
number of 1's in a 8 bit number using ALP.
Experiment No.: 10
Experiment Title: Write a program to transfer a block of data from one
place to another using string instruction.

Code:

Output:
Conclusion: Thus, we have successfully executed program to transfer a
block of data from one place to another using string instruction.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy