CSA practical file sem 1 du, Assignments of Computer Science

It contains all practicals of CSA for sem 1 du.

Typology: Assignments

2019/2020
On special offer
30 Points
Discount

Limited-time offer


Uploaded on 12/13/2021

kanchan-sagar
kanchan-sagar 🇮🇳

5

(2)

10 documents

1 / 23

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
INDRAPRASTHA COLLEGE FOR WOMEN,
DELHI UNIVERSITY
DEPARTMENT OF COMPUTER SCIENCE
CSA PRACTICAL (SEM 1)
COMPUTER SYSTEM ARCHITECTURE
SUBMITTED TO- Dr. SARABJEET KAUR
SUBMITTED BY- KANCHAN SAGAR
ROLL NO.- 20\CS\21
INDEX
S NO. OBJECTIVE
DATE SIGN.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
Discount

On special offer

Partial preview of the text

Download CSA practical file sem 1 du and more Assignments Computer Science in PDF only on Docsity!

INDRAPRASTHA COLLEGE FOR WOMEN,

DELHI UNIVERSITY

DEPARTMENT OF COMPUTER SCIENCE

CSA PRACTICAL (SEM 1)

COMPUTER SYSTEM ARCHITECTURE

SUBMITTED TO- Dr. SARABJEET KAUR

SUBMITTED BY- KANCHAN SAGAR

ROLL NO.- 20\CS\

INDEX

S NO. OBJECTIVE

DATE SIGN.

1. Write an assembly language program to simulate

the following 23\02\

Logical operations on two user entered

numbers: OR, NOT,

XOR, NOR, NAND.

2. Write an assembly program for simulating

following memory- 25\02\

Reference instructions: ADD, LDA, STA, BUN, ISZ.

3. Write an assembly language program to simulate

the machine 18\02\

For following register reference instructions and

determine the

Contents of AC, E, PC, AR and IR registers in

decimal after the

Execution: CLA, CMA, CME, HLT.

4. Write an assembly language program to simulate

the machine 18\02\

For following register reference instructions and

determine the

Contents of AC, E, PC, AR and IR registers in

decimal after the

Execution: INC, SPA, SNA, SZE.

5. WRITE AN ASSEMBLY PROGRAM TO SIMULATE THE

FOLLOWING LOGICAL OPERATION ON TWO – USER

ENTERED NUMBERS.

.OR

.NOT

.XOR

.NOR

.NAND

OR:

;this program adds two numbers start: read ;read->ac STA a ;store the new a read ;read b->ac STA b ;store the new a LDA a ;load a to ac OR b ;using nor gate write ;write hlt a: .data 2 0

b: .data 2 0 OUTPUT:

NOT:

;this program adds two numbers

start: read ;read->ac STA a ;store the new a LDA a ;load a to ac NOT a ;using nor gate write ;write hlt

write ;write

hlt

a: .data 2 0

b: .data 2 0

OUTPUT:

NOR:

;this program add two number start: read ;read->ac STA a ;store a in ac

read ;readb->ac STA b LDA a ;load a to ac NOR b ; using xor gate write ;write hlt a: .data 2 0 b: .data 2 0

OUTPUT:

b: .data 2 0

7. WRITE AN ASSEMBLY PROGRAM FOR SIMULATING

FOLLOWING MEMORY – REFRENCE INSTRUCTIONS.

.ADD

.LDA

.STA

.BUN

.ISZ

ADD:

;this program adds two numbers start: read ;read->ac ADD a ;add a to ac

STA a ;store the new a read ;read b->ac STA b ;store the new a ADD b ;add b to ac write ;write hlt a: .data 2 0 b: .data 2 0 OUTPUT:

LDA AND STA:

;this program load band store number start: read ;read->ac STA a ;store a in ac LDA a ;load a to ac write ;write hlt a: .data 2 0

OUTPUT:

ISZ:

;this program increment and skip number start: read ;read->ac STA a ;store a in ac LDA a ;load a to ac inc ;increment ac ISZ a ;increment and skip if dr register is 0 inc ;increment ac if isz doesn't execute write ;write hlt a: .data 2 0 b: .data 2 0 OUTPUT: Enter an integer -

Output 0

8. WRITE AN ASSEMBLY LANGUAGE PROGRAM TO

STIMULATE THE MACHINE FOR FOLLOWING REGISTER

REFERENCE INSTRUCTIONS AND DETERMINE THE

CONTENTS OF AC, E, PC, AR, AND IR REGISTERS IN

DECIMAL AFTER THE EXECUTION:

.CLA

.CMA

.CME

.HALT

CLA AND CMA:

;this program clear and complement ac start: read ;read->ac STA a ;store from ac LDA a ;load a to ac cla ;clear ac to 0 write ;write cma ;complement ac write

9. WRITE AN ASSEMBLY LANGUAGE PROGRAM TO

SIMULATE THE MACHINE FOR THE FOLLOWING

REGISTER REFERENCE INSTRUCTIONS AND DETERMINE

THE CONTENTS IF AC, E, PC, AR, AND IR REGISTER IN

DECIMAL AFTER THE EXECUTION.

.INC

.SPA

.SNA

.SZE

;this program increment ac ;this program skip if ac is positive ;this program skip if ac is negative ;this program skip if e is 0 Start: read

STA a ;store a to ac LDA a ;load a to ac inc ;increment ac write ;output spa ;check if ac is positive then skip inc ;increment if ac is not positive sna ;check if ac is negative then skip inc ;increment if ac is not negative write ;output hlt a: .data 2 0

THANK YOU!