Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 14

A MICROPROJECT REPORT ON

“Write an ALP to count negative numbers in


array”

SUBMITTED BY –

Sr.
No. Name of Student Roll No.

1 Rushikesh Kiran Potdar 32


2 Apoorva Pentappa Irabatti 40
3 Manasi Anil Gavali 42
UNDER THE GUIDANCE OF
Ms.T.S.Pujari

DEPARTMENT Of COMPUTER SCIENCE & ENGINEERING

SANJAY GHODAWAT INSTITUTE, ATIGRE ACADEMIC

YEAR: 2023-24
Certificate
This is to certify that the Micro project work entitled

“Write an ALP to count negative numbers in array”


Has been successfully completed by

In fulfillment for the

Diploma in Computer Science &Engineering Maharashtra State

Board of Technical Education During the academic year 2023-24

under the guidance of

Ms.T.S.Pujari Mr. S. V.Chavan

Project Guide H.O.D

Dr. V. V.Giri
Principal
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Program Code – CW-4-

I Course Name – MIC

Course Code – 22415

Project Title-

“Write an ALP to count negative numbers in array”

Micro
Exam
Sr. Roll Enrollment Project Total
Name of Student No. Seat
No. No. Marks
No.
G I 6+4 = 10
1 32 2216440382
Rushikesh Kiran
Potdar
2 40 2216440390
Apoorva Pentappa
Irabatti
3 42 2216440392
Manasi Anil Gavali

Ms.T.S.Pujari

Course Faculty &


Signature
Program Name – Computer Science & Engineering Program Code – CW-4-I

Course Name – Microprocessor Course Code –22415

Project Title – Write an ALP to count negative numbers in array

Course Outcomes (CO), Practical Outcomes (PRO’s) and Unit Outcomes (UOs) Mapping

PRO’s and

COs PSO UOs

Mapping
INDEX

Sr. Page
CONTENT
No. No.

Abstract 1

1 Introduction 2

2 Algorithm 3

3 Flowchart 4

4 Code of program 5

5 Output 6

6 Instructions used 7

7 Conclusion 8

8 Reference 9
ALP to count negative numbers from array

ABSTRACT

In computing, signed number representations are required to encode negative numbers in binary
number systems.The early days of digital computing were marked by a lot of competing ideas
about both hardware technology and mathematics technology (numbering systems). One of the
great debates was the format of negative numbers, with some of the era's most expert people
having very strong and different opinions. One camp supported two's complement, the system
that is dominant today. Another camp supported ones' complement, where any positive value is
made into its negative equivalent by inverting all of the bits in a word. A third group supported
"sign & magnitude" (sign-magnitude), where a value is changed from positive to negative
simply by toggling the word's sign (high-order) bit.

SANJAY GHODAWAT INSTITUTE, ATIGRE 1


ALP to count negative numbers from array

INTRODUCTION

In mathematics, negative numbers in any base are represented by prefixing them with a − sign.
However, in computer hardware, numbers are represented in bit vectors only, without extra
symbols. The four best-known methods of extending the binary numeral system to represent
signed numbers are: sign-and-magnitude, ones' complement, two's complement, and excess-K.
Some of the alternative methods use implicit instead of explicit signs, such as negative binary,
using the base −2. Corresponding methods can be devised for other bases, whether positive,
negative, fractional, or other elaborations on such themes. There is no definitive criterion by
which any of the representations is universally superior. The representation used in most current
computing devices is two's complement.

SANJAY GHODAWAT INSTITUTE, ATIGRE 2


ALP to count negative numbers from array

ALGORITHM:

1. Initialize data segment.


2. Initialize NEGATIVE counter to 0.
3. Increment word counter.
4. Initialize memory pointer to read number.
5. Read number.
6. Check number for negative.
7. If number != NEGATIVE then go to step 9.
8. Increment NEGATIVE counter by 1.
9. Increment memory pointer to read next number.
10. Decrement ord counter by one.
11. If word counter != 0 then go to step 5.
12. Store result.
13. Stop

SANJAY GHODAWAT INSTITUTE, ATIGRE 3


ALP to count negative numbers from array

FLOWCHART:
Start

Initialize data segment

Initialize POs counter to count


Negative numbers in the array

Initialize word counter in CX


And memory pointer in SI

Read numbers from array to AX

Rotate AX by 1 bit to lift

N Is
CF = 0
?

Increment POS counter by 1

Increment memory pointer by 2


Decrement word pointer by 1

Is N
Word counter = 0
?
Y
SANJAY GHODAWAT INSTITUTE, ATIGRE 4
ALP to count negative numbers from array
Stop

CODE

SANJAY GHODAWAT INSTITUTE, ATIGRE 5


ALP to count negative numbers from array

OUTPUT

SANJAY GHODAWAT INSTITUTE, ATIGRE 6


ALP to count negative numbers from array

Instrutctions Used

mov:
This instruction is use to transfer the data from source(register of memory location ) to destination(register of
memory location ).

jnc:
Here the processor jumps to a specified label.if there is no carry.

Inc:
Inc instruction the content of destination get incremented by 1 and result is stored at destination.

add:
In this instruction the data of source and destination get added the result is stored at destination.

rol:
This instruction rotates all the bits of destination count times towards left.The bit move out from MSB both into
carry flag as well as shifted out LSB. In case of multiple rotates carry flag will containmot reciently shifted
from MSB.

SANJAY GHODAWAT INSTITUTE, ATIGRE 7


ALP to count negative numbers from array

CONCLUSION

SANJAY GHODAWAT INSTITUTE, ATIGRE 8


BANKING APPLICATION IN JAVA

REFERENCE

 www.eeeguide.com/rotate-instruction-in-8086/
 www.tutorialspoint.com/microprocessor/microprocessor_8086_overview.html
 www.google.com

9
SANJAY GHODAWAT INSTITUTE ,ATIGRE

You might also like