MPL Lab Manual (Modified)
MPL Lab Manual (Modified)
LAB MANUAL
(ACADEMIC RECORD)
CLASS: SE
SEMESTER: IV
Department Mission :
M1 To create and disseminate knowledge through research, teaching & learning and to
: enhance society in meaningful and sustainable ways.
M2 To impart a suitable environment for students and staff to showcase innovative ideas in
: the field of IT.
M3 To bridge the curriculum gap by facilitating effective interaction among industry and
: Staff/Students.
PEO2 - Attain the ability to adapt quickly to new environments and technologies,
assimilate new information, and work in multi-disciplinary areas with a strong
focus on innovation and entrepreneurship.
PEO3 - Prepare graduates with the ability of life-long learning to innovate in ever-
changing global economic and technological environments of the current era.
PEO4 - Possess the ability to function ethically and responsibly with good cultural values
and integrity to apply the best principles and practices of Information Technology
towards the society.
DATTA MEGHE COLLEGE OF ENGINEERING
DEPARTMENT OF INFORMATION TECHNOLOGY
PSO1 - Apply Core Information Technology knowledge to develop stable and secure IT
system
PSO2 - Design, IT infrastructures for an enterprise using concepts of best practices in
Information Technology and security domain.
PSO3 - Ability to work in multidisciplinary IT enabled projects for industry and society by
adapting latest trends and technologies like Analytics, Blockchain, Cloud, Data science.
Course Outcomes
ITL403.1 Demonstrate various components and peripheral of computer system
ITL403.4 Develop the assembly level programming using 8086 loop instruction set
ITL403.5 Write programs based on string and procedure for 8086 microprocessor.
List of Experiments
Course Name : Microprocessor Lab
Datta Meghe College of Engineering
Course Code : ITL403
Airoli, Navi Mumbai
EXPERIMENT 01
Date of Performance:
Date of Submission:
2. South Bridge: South bridge is another chip of the logical chipset architecture. It is located to
the South of Peripheral Component Interconnect (PCI) bus in the motherboard. The main function
of South bridge is to control the IO functioning. The North bridge is the medium that connects
South bridge and Central Processing Unit. IO Controller Hub is the other name given to South
bridge for its functionality.
INTERNAL COMPONENTS
1. Mouse & keyboard: Keyboard Connectors are two types basically. All PCs have a Key board
port connected directly to the motherboard. The oldest, but still quite common type, is a special
DIN, and most PCs until recently retained this style connector. The AT-style keyboard connector
is quickly disappearing, being replaced by the smaller mini–DIN PS/2-style keyboard connector.
2. USB (Universal serial bus): USB is the General-purpose connection for PC. You can find USB
versions of many different devices, such as mice, keyboards, scanners, cameras, and even printers.
a USB connector's distinctive rectangular shape makes it easily recognizable.
3. Parallel port: Most printers use a special connector called a parallel port. Parallel port carry
data on more than one wire, as opposed to the serial port, which uses only one wire. Parallel ports
use a 25-pin female DB connector. Parallel ports are directly supported by the motherboard
through a direct connection or through a dangle.
4.CPU-Chip: The CPU, also called the microprocessor performs all the calculations that take
place inside a pc. CPUs come in Variety of shapes and sizes. Modern CPUs generate a lot of heat
and thus require a cooling fan or heat sink. The cooling device (such as a cooling fan) is removable,
although some CPU manufactures sell the CPU with a fan permanently attached.
DATTA MEGHE COLLEGE OF ENGINEERING
DEPARTMENT OF INFORMATION TECHNOLOGY
CONCLUSION
Study of PC Motherboard Technology (South Bridge & North Bridge), Internal Components and
Connections used in computer system was successfully learnt.
-------------------------------------------------------------------------------------------
DATTA MEGHE COLLEGE OF ENGINEERING
DEPARTMENT OF INFORMATION TECHNOLOGY
EXPERIMENT 02
Date of Performance:
Date of Submission:
Aim: To study and verify the truth table of various logic gates.
Resources required: Logisim application
1) NOT Gate
2) AND Gate
3) OR Gate
B) Derived Gates
1) NOR Gate
2) NAND Gate
3) XOR Gate
4) XNOR Gate
Out of these gates, NOR and NAND gates are called “universal gates”, because by
using these gates exclusively we can construct all other logic gates.
A) Basic Gates
1. NOT Gate:
⮚ The simplest gate is the NOT gate, also known as an inverter.
⮚ It accepts a single input and outputs the opposite value. i.e. if the input is 0,
the output is 1 and vice versa
DATTA MEGHE COLLEGE OF ENGINEERING
DEPARTMENT OF INFORMATION TECHNOLOGY
Expression:
Truth Table:
2) AND Gate:
⮚ In AND gate there are two inputs and one output.
⮚ In AND gate the output of an AND gate attains the state 1 if and only if all
the inputs are in state 1.
Symbol:
DATTA MEGHE COLLEGE OF ENGINEERING
DEPARTMENT OF INFORMATION TECHNOLOGY
3) XOR Gate:
⮚ XOR gate is also called as “Exclusive OR” gate.
⮚ It is a digital logic gate that implements an Exclusive OR, i.e. the result
(output) is 1 only if one of the input is 1.
⮚ That is XOR gate is a digital logic gate that generates 1 in output when the
number of 1 input is
odd.
DATTA MEGHE COLLEGE OF ENGINEERING
DEPARTMENT OF INFORMATION TECHNOLOGY
CONCLUSION
Various logic gates, its symbol, and truth table was successfully learnt.
------------------------------------------------------------------------------------
DATTA MEGHE COLLEGE OF ENGINEERING
DEPARTMENT OF INFORMATION TECHNOLOGY
EXPERIMENT 03
Date of Performance:
Date of Submission:
Aim: To study and verify the truth table and the functionality of :
1) Half Adder 2) Full Adder 3) Half Subtractor 4) Full Subtractor using
Simulator
⮚ The various logic gates are the building blocks of combinational logic circuits.
⮚ Examples of Combinational Logic Circuit are half adders, full adders, multiplexers,
demultiplexers, encoders and decoders ,etc.
1) HALF - ADDER
⮚ It is the combinational logic circuit is derived by using two inputs and two outputs.
⮚ The circuit design allowed us to add two one-bit binary numbers. So, the main purpose of
using half adder is for addition.
⮚ With the inputs as A and B,and there are two output bits; one of which is the sum bit SUM
and the other is the carry bit CARRY.
⮚ The circuit can be designed as follows
DATTA MEGHE COLLEGE OF ENGINEERING
DEPARTMENT OF INFORMATION TECHNOLOGY
2) FULL - ADDER
⮚ Full adder is the three input two output combinational logic circuit which add three single bits
applied at its input to produce SUM and CARRY outputs,
⮚ The simplest way to construct a full adder is to connect two half- adder and an OR gate.
3) HALF - SUBTRACTOR
⮚ ☟alf subtractor is the combinational circuit with its two input and two outputs (difference and
borrow) .
⮚ It produces difference between two binary bit at the inputs and also produces an output Borrow
that indicate if a 1 has been borrowed.
⮚ The difference can be applied using X-OR Gate, borrow output can be implemented using an
AND Gate and an inverter.
4) FULL - SUBTRACTOR
⮚ Full subtractor is the combinational circuit with three inputs and two outputs.
⮚ The two half subtractor put together gives a full subtractor.
⮚ The first half subtractor will be C and A B.
⮚ The output will be difference output of full subtractor.
⮚ The expression AB assembles the borrow output of the half subtractor and the second term is the
inverted difference output of first X-OR.
⮚ The circuit can be designed as follows
DATTA MEGHE COLLEGE OF ENGINEERING
DEPARTMENT OF INFORMATION TECHNOLOGY
Conclusion:
According to the above observations, simulation output and truth table of respective circuit matches.
-------------------------------------------------------------------------------------------
DATTA MEGHE COLLEGE OF ENGINEERING
DEPARTMENT OF INFORMATION TECHNOLOGY
EXPERIMENT 04
Date of Performance:
Date of Submission:
Aim: To evaluate a given logic expression and simulate it
The given expression is F(ABC) = AʹB + BAʹ
CIRCUIT:
TRUTH TABLE:
A B A’ B’ A’B AB’ A’B+AB’
0 0 1 1 0 0 0
0 1 1 0 1 0 1
1 0 0 1 0 1 1
1 1 0 0 0 0 0
Procedure:
❖ Open Logisim Application.
❖ Draw the circuit according to the given expression.
❖ Verify the truth table by changing the input combinations.
Conclusion:
According to the above observations, simulation output and truth table of respective circuit matches.
EXPERIMENT 05
Date of Performance:
Date of Submission:
Aim : To simulate assembly language program for 8bit and 16bit addition
Assembler Directives:
Assembly language programs are composed of two types of statements.
1) The Instructions which can be translated to machine code by the assembler.
2) The directives that directs the assembler during the assembly process for which no machine
code is generated.
Assembler Directives are instructions entered into the source code along with the assembly
language. Pseudo instructions (Assembler Directives) do not get translated into object code, but
are used as special instructions to the assembler to perform some special functions. The
directives control the generation of machine code and organization of the program.
The assembler directives are classified into the following categories based on the functions
performed by them. They are
a) Data definition and storage allocation directives
Data definition directives are used to define the program variables and allocate a specified
amount of memory to them. They are of type BYTE, WORD, Double Word, Quad Word and
Ten Byte and their size in bytes are 1,2,4,8 and 10 respectively. The data definition directives are
DB, DW, DD, DQ, DT.
DB – [Define Byte]
The DB directive is used to define a byte–type variable or to set aside one or more storage
locations of type byte in memory. It can be used to define single or multiple byte variables.
Ex 1) n DB 42H 2) num DB ? 3) grade DB ‘A’ or “A” 4) num DB 25,50,43,76 5) info DB
‘welcome’
6) sum db 25 dup(?)
This statement defines a variable and reserves 25 bytes of consecutive memory locations and are
not initialized.
DW – [Define Word]
DATTA MEGHE COLLEGE OF ENGINEERING
DEPARTMENT OF INFORMATION TECHNOLOGY
EVEN : Align as even memory address. The directive EVEN is used to inform the assembler to
increment the location counter to the next even memory address if it is not pointing to even
memory location already.
ORG : Originate : The directive ORG assigns the location counter with the value specified in the
directive. It helps in placing the machine code in the specified location while translating the
instructions into machine codes by the assembler.
ORG 100
The above statement informs the assembler to initialize the location counter to 100.
LENGTH: The directive length informs the assembler about the number of elements in a data
item such as an array. If an array is defined with DB then it returns the number of bytes allocated
to the variable. If an array is defined with DW then it returns the number of words allocated to
the array variable.
SIZE: The directive SIZE is same as LENGTH except that it returns the number of bytes
allocated to the data item instead of the number of elements in it.
OFFSET : The directive OFFSET informs the assembler to determine the displacement of the
specified variable with respect to the base of data segment.
PROC: The PROC directive is used to identify the start of a procedure. The PROC directive
follows a name you give the procedure. After the PROC directive the term NEAR or FAR is
used to specify the type of the procedure.
This directive is used along with the name of the procedure to indicate the end of a procedure to
the assembler.
---------
---------
RET
Factorial ENDP
DATTA MEGHE COLLEGE OF ENGINEERING
DEPARTMENT OF INFORMATION TECHNOLOGY
MACRO: A macro is a group of instructions we bracket and give a name to at the start of our
program. Each time we call the macro in our program, the assembler insert the defined group of
instructions in place of the call.
The MACRO directive is used to identify the start of a macro. The Macro directive follows a
name you give the macro.
--------
--------
This directive is used along with the name of the macro to indicate the end of a macro to the
assembler.
EQU (EQUATE): EQU is used to give a name to some value or symbol. Each time the
assembler finds the given name in the program, it replaces the name with the value or symbol
you equated with that name.
Example: Num1 EQU 50H
PTR (POINTER) : The PTR operator is used to assign a specific type to a variable or a label. It
is necessary to do this in any instruction where the type of the operand is not clear.
Example:
•INC [BX]
It will not know whether to increment the byte or word pointed to by BX. We use the PTR
operator to clarify how we want the assembler to code the instruction.
•INC BYTE PTR [BX]
This statement tells the assembler that we want to increment the byte pointed to by BX.
•INC WORD PTR [BX]
Simplified Segment Directives
.MODEL
The .MODEL statement followed by the size of the memory system designates the Memory
Model.
DATTA MEGHE COLLEGE OF ENGINEERING
DEPARTMENT OF INFORMATION TECHNOLOGY
.CODE
.DATA
.STACK
Overview :In general programming of a microprocessor usually takes several iterations before
the right sequence of machine code instructions is written. The process, however is facilitated
using a special program called an “Assembler”. The assembler allows the user to write
alphanumeric instructions or mnemonics , called Assembly Language instructions. The
assembler in turn generates the desired machine instructions from the Assembly Language
instructions.
STEP PRODUCES
1 Editing Source file
DATTA MEGHE COLLEGE OF ENGINEERING
DEPARTMENT OF INFORMATION TECHNOLOGY
The assembler is use to convert the Assembly Language instructions to machine code. The
assembler starts by checking the syntax, or validity of the structure, of each instruction in the
source file. If any errors are found, the assembler displays a report on the errors with brief
explanation of their nature. However, if the program does not contain any errors, the assembler
produces an object file that has the same name as the original file but with the “obj” extention.
The linker is used to convert the object file to an executable file. When the assembly language
program is free of error messages ,the next step is to link the object modules. Linker combines if
requested, more than one separated assembled modules into one executable module, such as two
or more assembly programs or assembly language with a C program.
The executable file contains the machine language code. It can loaded in the RAM and be
executed by microprocessor simply typing, from the DOS prompt, the name of the file followed
by the Enter Key. If the program produces an output on the screen, the effect should be noticed
almost immediately. However, if the program manipulates data in memory, nothing would seem
to have happened as a result of executing program.
The Debugger can also be used to find logical errors in the program. Even if a program does not
contain
Syntax errors it may not produce the desired results after execution. Logical errors may be found
by tracing the action of the program. Once found, the source file should be reedited to fix the
problem, then re-assembled and re-linked.
Conclusion:
The Addition of two 8 bit/16 bit numbers is done and the output is Verified.
-----------------------------------------------------------------------------------------
DATTA MEGHE COLLEGE OF ENGINEERING
DEPARTMENT OF INFORMATION TECHNOLOGY
EXPERIMENT 06
Date of Performance:
Date of Submission:
Procedure:
A digit BCD number is available in register AL. We have to unpack this BCD
number i.e. we have to separate the BCD digits. e.g : If the number = 92 H then
in unpack form the two digits will 02 H and 09 H. i.e. we have to mask the lower
nibble, first and rotate four times to the right to get the MSB digit. Then to get
the LSB digit mask the upper nibble. Display the result. Masking lower nibble
means ANDing the number with OF0 to get MSB.
Algorithm:
Step IX : Stop.
DATTA MEGHE COLLEGE OF ENGINEERING
DEPARTMENT OF INFORMATION TECHNOLOGY
FLOWCHART:
CONCLUSION
Program for converting two-digit Packed BCD to Unpacked BCD is simulated.
--------------------------------------------------END---------------------------------------------------
DATTA MEGHE COLLEGE OF ENGINEERING
DEPARTMENT OF INFORMATION TECHNOLOGY
EXPERIMENT 07
Date of Performance:
Date of Submission:
Aim: Write an Assembly language program to exchange block of data bytes using
string instructions
Algorithm:
CONCLUSION: The exchange of five, data bytes using string is performed and output is
verified.
----------------------------------------END----------------------------------------------
DATTA MEGHE COLLEGE OF ENGINEERING
DEPARTMENT OF INFORMATION TECHNOLOGY
EXPERIMENT 08
Date of Performance:
Date of Submission:
Aim: Assembly language program to count number of 1’s and 0’s in a given 8 bit
number using loop statement and simulate it.
Conclusion:
In this experiment we to count the number of 1’s and 0’s using loop statement .
----------------------------------------END----------------------------------------
DATTA MEGHE COLLEGE OF ENGINEERING
DEPARTMENT OF INFORMATION TECHNOLOGY
EXPERIMENT 09
Date of Performance:
Date of Submission:
1. Initialize data segment ,byte counter, and memory pointer to read numbers from array.
5. Compare two numbers, IF number < next number then perform step no. 7
8. Decrement counter by 1
11. End
DATTA MEGHE COLLEGE OF ENGINEERING
DEPARTMENT OF INFORMATION TECHNOLOGY
.MODEL SMALL
.DATA
ARRAY DB 98H,23H,34H,0AH,10H
SMALLEST DB ?
.CODE
MOV AX,@DATA
MOV DS,AX
MOV CX,04H
MOV SI,OFFSET ARRAY
MOV AL,[SI]
UP: INC SI
CMP AL,[SI]
JNC NEXT
MOV AL,[SI]
NEXT: DEC CX
JNZ UP
MOV SMALLEST,AL
MOV AH,4CH
INT 21H
END
Conclusion: Programs executed to find smallest/largest number and output is verified.
---------------------------------------END---------------------------------------------------
DATTA MEGHE COLLEGE OF ENGINEERING
DEPARTMENT OF INFORMATION TECHNOLOGY
EXPERIMENT 10
Date of Performance:
Date of Submission:
Aim: Assembly language program to compute the factorial of positive integer ‘n’
using procedure and simulate it.
Theory:
segment which is calling that procedure. Only Instruction Pointer (IP register)
contents will be changed in Near procedure.
NEAR procedure.
segment than the calling segment. In this case both Instruction Pointer(IP) and the
Code Segment(CS)
DATTA MEGHE COLLEGE OF ENGINEERING
DEPARTMENT OF INFORMATION TECHNOLOGY
PROC directive: The PROC directive is used to identify the start of a procedure.
The PROC directive
follows a name given to the procedure. After that the term FAR and NEAR is used
to specify the type of
the procedure.
ENDP Directive: This directive is used along with the name of the procedure to
indicate the end of a
procedure to the assembler. The PROC and ENDP directive are used to bracket a
procedure.
…………
operation. When it executes, first it stores the address of instruction after the CALL
instruction on the
stack. Second it changes the content of IP register in case of Near call and changes
the content of IP
Algorithm:
1. Start
3. Initialize AX=1
8. FACT = AX * BX
9. Decrement BX
12.End
DATTA MEGHE COLLEGE OF ENGINEERING
DEPARTMENT OF INFORMATION TECHNOLOGY
.MODEL SMALL
.DATA
NUM DW 0005H
FACTLSW DW ?
FACTMSW DW ?
DATTA MEGHE COLLEGE OF ENGINEERING
DEPARTMENT OF INFORMATION TECHNOLOGY
-------------------------------------------END------------------------------------
DATTA MEGHE COLLEGE OF ENGINEERING
DEPARTMENT OF INFORMATION TECHNOLOGY
EXPERIMENT 11
Date of Performance:
Date of Submission:
The hex decimal data corresponding to the segments which have to glow for
displaying a character is output to port B.
DISPLAY FORMAT Let us consider Common Anode display to understand well, the
following table represents the connection format of the Common Anode display
Logic ‘0' in the above format will turn ON that particular segment. Logic ‘1' will
keep the segment OFF. The data for turning ON the display is through 8255 (We
already studied).
Types of Seven segment displays-
Common Cathode 7-segment display:
As the name indicates, its cathode is connected to a common terminal. Below is the
schematic diagram to indicate its common cathode structure. It should be
connected to the ground while operating the display. If a high voltage is given to
the anode, then it will turn on the corresponding segment.
DATTA MEGHE COLLEGE OF ENGINEERING
DEPARTMENT OF INFORMATION TECHNOLOGY
(to the supply through a resistor to limit current). In order to turn on a particular
segment, a ground level voltage is given to the corresponding pin. Since logic
circuits
can sink more current than they can source, common anode connection is used
most widely.
Display codes:
Display codes are the voltages to be applied to the segments to display a
number. It is in the order of segments ABCDEFG(DP), total 8 bits. For example,
below is the common cathode display code of ‘0’ with decimal point OFF.
DATTA MEGHE COLLEGE OF ENGINEERING
DEPARTMENT OF INFORMATION TECHNOLOGY
CONCLUSION
Program for interfacing seven segment display was successfully
executed.
----------------------------------------END-------------------------------------