You are on page 1of 12

MAHARASHTRASTATE BOARD OF TECHNICAL EDUCATION MUMBAI

A
PROJECTREPORT ON
“Find the factorial of given number”
UNDER THE GUIDANCE OF
MRS.S.S.Tone

DEPARTMENT OF COMPUTER ENGINEERING


DR. D.Y.PATIL POLYTECHNIC,
KASABABAWADA, KOLHAPUR
SEMESTER - 4
YEAR:-2020-21
SUBMITTED BY:-

1) Pooja Ramesh Sakhare - 2148


2) Pranav Madhukar Tibile -2149
3)Prerna Rajesh Chougale - 2150
4)Rajanigandha Randhir Salokhe - 2151

Page | 1
Certificate

This is to certify that group NO. G13 Roll No. 2148,2149,2150,2151 of 4 Semester of
Diploma in Computer Engineering of Institute, Dr. D. Y. Patil Polytechnic (Code : 0539 ) has
completed the Micro Project satisfactorily in Subject – Microprocessor (22415) for the
academic year 2020-2021 as prescribed in the curriculum.

Place: Kolhapur

Enrollment No: ……………………………………..

Date: ……………………… Exam. Seat No: …………………………………….

Subject Teacher Head of the Department Principal

Page | 2
ACKNOWLEDGMENT

The success & find outcome of this project required a lot of guidance &
assistance from many people and I am extremely privileged to have got
all along the completion of our project. All that we have done is only due
to such supervision & assistance & I would not forget to thanks them.

I owe my deep gratitude to our project guide MRS.S.S.TONE who took


keen interest on our project work & guided us all along , till the
completion of our project work by providing all the necessary
Information for developing a good system.

I am thankful to & fortunate enough to get constant encouragement,


support & guidance form all teaching staffs of Computer Engineering
which help us in successful completing our project work.

Date:
Place: Kolhapur.

Page | 3
INDEX

SR.NO. CONTENT

1 Introduction

2 Aim

3 Course Outcome

4 Algorithm

5 Flowchart

6 Source code

7 Output

8 Conclusion

9 Reference

Page | 4
INTRODUCTION

Microprocessor is the main component of computer where 8086 is the base of


all upward developed processors till current processors. This course will cover the
basics of 8086 and its architecture along with instruction set, assembly language
programming with effective use of procedure and micros.

8086 Microprocessor is an enhanced version of 8085Microprocessor that was


designed by Intel in 1976. It is a 16-bit Microprocessor having 20 address lines and16
data lines that provides up to 1MB storage. It consists of powerful instruction set,
which provides operations like multiplication and division easily.

Page | 5
AIM
Develop a program for Find the factorial of given number
It is an assembly language program in which we develop a program for find the
factorial of given number IN 8086 microprocessor. In that we call a fact method for
find the factorial. Procedures or subroutines are very important in assembly
language, as the assembly language programs tend to be large in size. so in program
we use procedure for find the factorial.

COURSE OUTCOME
a. Analyse the functional block of 8086 microprocessor.
b. Write assembly language program for the given problem.
c. Use instructions for different addressing modes.
d. Develop an assembly language program using assembler.
e. Develop assembly language programs using procedures, macros and modular
programming approach.

Page | 6
ALGORITHM

STEP 1: Input the Number whose factorial is to be find and Store that Number in CX
Register (Condition for LOOP Instruction)

STEP 2: Insert 0001 in AX (Condition for MUL Instruction) and 0000 in DX

STEP 3: Multiply CX with AX until CX become Zero (0) using LOOP Instruction

STEP 4: Copy the content of AX to memory location 0600

STEP 5: Copy the content of DX to memory location 0601

STEP 6: Stop Execution

Page | 7
FLOWCHART

Page | 8
SOURCE CODE

data segment
num db 04h
Fact dw 00h
data ends
code segment
assume cs:code,ds:data
mov ax,data
mov ds,ax
mov al,num
mov cl,num
call Fact
dec cl
int 03h
code ends
end
Fact proc
mov bl,al
up:dec bl
mul al
loop up
mov Fact,ax
ret
endp

Page | 9
OUTPUT:

G CS: 001B
AX=0078 BX=0000 CX=0001 DX=0000 SP=0000 BP=0000 SI=0000
DI=0000
DS=0BA8 ES=0B98 SS=0BA8 CS=0BA9 IP=001B NV UP EI PL ZR NA PE NC
0BA9:001B B44C MOV AX,0000

Page | 10
CONCLUSION

 we successfully execute a program for finding factorial of given number in


8086 microprocessor.
 we implement a program using set of instructions like call fact and also used
loop up statement
 In this we also used assembly language programming with effective use of
procedure and micros

Page | 11
REFERENCE

 https://www.tutorialspoint.com/microprocessor/
microprocessor_8086_instruction_sets.htm

 https://www.tutorialspoint.com/assembly_programming/
assembly_procedures.htm

 https://www.geeksforgeeks.org/8086-program-find-factorial-number/

Page | 12

You might also like