Skip to content

Practice problems and solutions of the assignments offered in CSE316 course in BUET.

Notifications You must be signed in to change notification settings

fardinanam/Assembly-8086-Codes

Repository files navigation

Assembly-8086 Assingments and Practices

Insersion Sort and Binary Search

Problem Specifications

In this sessional you will implement insertion sort and binary search algorithm in assembly language programming. You will take n integers as inputs from a user, sort them and display the sorted array. Next you will take another integer as input from the user and search it in the sorted array using binary search algorithm and display its index in the sorted array if it exists (Assume that indices start from 1). In a nutshell, you have to implement the following algorithmic steps.

  1. Take an integer n from the user.
  2. Go to Step 10 if n <=0
  3. Take n integers from the user.
  4. Sort them using insertion sort.
  5. Display the sorted array.
  6. Take an integer x from the user.
  7. Use binary search to find x’s index in the sorted array. Display the index if found, otherwise print ‘NOT FOUND’.
  8. For another search in the same array go to Step 6.
  9. Go to Step 1.
  10. End

Note: You can assume any form of number to be in the range of signed 16 bit register.

Convert Any Based Number to Binary

Problem Specifications

Take a base value as input from the user. Then take an input N in the base value of given base. Convert the given number to binary and display.
Note: You can assume any form of number to be in the range of signed 16 bit register.

Calculating Number of Faulty Numbers

Problem Specifications

A faulty number is one for which the sum of its proper divisors is greater than the number itself. The proper divisors of a number are all the divisors except 1 and the number itself. For example, 12 is a faulty number because the sum of the proper divisors is 2 3 4 5=15 which is greater than 12. Write a program to take an integer number N as input and output the number of faulty numbers between 1 and N
Note: You can assume any form of number to be in the range of signed 16 bit register.

Selection Sort in Descending Order

Problem Specifications

Take N integers as inputs from the user. Sort them in descending order using selection sort and display the sorted array for every step of the selection sort operation. Finally print the sorted array.
Note: You can assume any form of number to be in the range of signed 16 bit register.

About

Practice problems and solutions of the assignments offered in CSE316 course in BUET.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published