Search Header Logo
Computer Architecture

Computer Architecture

Assessment

Presentation

Computers

University

Hard

Created by

Jasmine Sharon

Used 4+ times

FREE Resource

11 Slides • 3 Questions

1

COMPUTER ARCHITECTURE

Priyanka R

I.B.Sc.Computer Science

Slide image

2

FIND THE LARGEST AND THE SMALLEST ELEMENT IN AN ARRAY

3

SYNOPSIS

  • Aim

  • Algorithm

  • Source code

  • Input

  • Output

  • Result

4

AIM

To write an assembly language program for finding the largest and smallest element of an array using 8085.

5

ALGORITHM

  • Maximum number is stored in B register and Minimum number is stored in C register.

  • Load counter in D register.

  • Load starting element in accumulator, B and C register.

  • Compare accumulator with B register.

  • If carry flag is not set then transfer contents of accumulator to B. Else, compare accumulator with C register. If carry flag is set, transfer content of accumulator to C.

6

ALGORITHM

  • Decrement D register.

  • If D>0 take next element in accumulator and go to point 4.

  • If D=0,store B and C register in memory.

  • End of the program.

7

Slide image

SOURCE CODE

8

Slide image

INPUT

9

Slide image

OUTPUT

10

RESULT

Thus, the program to find the largest and the smallest element in an array was executed.

11

Multiple Choice

The AC flag denotes

1

Auxiliary Carry

2

Accumulator

12

Multiple Choice

The expansion of MVI

1

Move

2

Move Immediate

13

Multiple Choice

The flag P denotes

1

Parity

2

Partial

14

Slide image

COMPUTER ARCHITECTURE

Priyanka R

I.B.Sc.Computer Science

Slide image

Show answer

Auto Play

Slide 1 / 14

SLIDE