(5/5)

Assignment 1

Assembly Language Programming

1 Instruction:

• In total there are 5 questions in this assignment, each carries 20 marks. The questions assigned to you are attached to this link. This sheet is generated randomly and you need to strictly follow the questions assigned to you. If you won’t you will be getting a straight 0 for that question.

• You will need to submit a zip of folder(RollNumber) containing all your codes. Codes need to be named by their question number such as 1A, 2B ...

• Strict action will be taken for copying in the Assignments.

2 Problems:

1. Question 1

(a) Given a list L of 32 signed Integers each of 16 bits, sort them using Bubble Sort. The 32 integers will be stored in a data section of your code i.e store these integers in memory not in registers. You need to report the sorted list of integers.

(b) Given a list L of 32 signed Integers each of 16 bits, sort them using Selection Sort. The 32 integers will be stored in a data section of your code i.e store these integers in memory not in registers. You need to report the sorted list of integers.

(c) Given a list L of 32 signed Integers each of 16 bits, sort them using Insertion Sort. The 32 integers will be stored in a data section of your code i.e store these integers in memory not in registers. You need to report the sorted list of integers.

(d) Given a list L of 32 signed Integers each of 16 bits, sort them using Odd-Even Sort. The 32 integers will be stored in a data section of your code i.e store these integers in memory not in registers. You need to report the sorted list of integers. Reference link

2. Question 2

(a) Given list L of 32 signed Integers each of 16 bits and a key X (16 bit). Find the location of X within L, return -1 if X does not belong to L. The list L is stored in memory inside the data section. You have to use Sequential Search to look for X within L. Report the number of iterations taken to successfully/unsuccessfully find X.

(b) Given list L of 32 signed Integers each of 16 bits and a key X (16 bit). Find the location of X within L, return -1 if X does not belong to L. The list L is stored in memory inside the data section. You have to use Binary Search to look for X within L. Report the number of iterations taken to successfully/unsuccessfully find X. Reference link

3. Question 3

(a) Given a Matrix M with 16 bit values in memory. M has 8 rows and 8 columns. Rotate the matrix by 90 degrees in the anticlockwise direction without using any extra memory.

(b) Given a Matrix M with 16 bit values in memory. M has 8 rows and 8 columns. Rotate the matrix by 90 degrees in the clockwise direction without using any extra memory.

4. Question 4

(a) Given a character array C of length 32. Count the frequency of each small letter ‘a’ to ‘z’

appearing in C. Report 0 in case an alphabet does not appear in C.

(b) Given a character array C of length 32. Count the frequency of each capital letter ‘A’ to ‘Z’

appearing in C. Report 0 in case an alphabet does not appear in C.

5. Question 5

(a) Given two 16 bit signed integers A and B. Find the hamming distance between them and store the result in another integer C. Refernce link

(b) Given two 32 bit unsigned integers A and B. Find the hamming distance between them and store the result in another integer C. Refernce link

(5/5)

DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

Get Free Quote!

434 Experts Online