T

.

Showing posts with label Semester-4. Show all posts
Showing posts with label Semester-4. Show all posts

Friday, 6 April 2018

DSA Mid Term Syllabus


DSA Pre-Mid Topics
1.    All General Algorithms related to search and sort.
2.    Arrays. General arrays and traversal algorithms.
a.     Polynomial algorithms, general matrices.
b.    Dynamic arrays, dynamic declaration, dynamic growth and shrinking.
c.     Inorder insertion. Deletion, inorder deletion.
d.    2D array search, traversal. Complex 2D/3D loops for any purpose.
3.    Algorithm techniques:
         Brute Force vs Divide & Conquer.
4.    Time cost. Loop cost, nested loop, initialization and boundary checking cost. Exact cost verses order of complexity.
5.    Stack: 
          using Array and Linked list. Stack ordering, ToH problem, in-order insertion in stack using a temporary stack, stack search and delete using temporary stack, Sorting using stack.

DSA-Mids Solution-2018


Roll No:-BSCS-2017 Name:____________ Section:

Saturday, 31 March 2018

DSA Assignment Guidelines




Guidelines for submitting Assignments

1.     Each assignment will be of 10 marks.
2.     One mark will be deducted if assignment is submitted on last date.
3.     After last date, 2 marks per day will be deducted.
4.     7 marks will be given for exactly following general requirements and hints. Extra 3 marks will be for those who implement all requirements and do more than required.
5.     Marks will not be deducted for small logical errors.
6.     Please do not get assignment from others or give to others. Also, do not get or give assignment help. Get help on data structures and programming. If you want to help others, teach them programming and algorithms. Assignment is for self preparation.
7.     5 Negative marks will be given for copied assignment for the first time. F grade will be given for 2nd time submission of copied assignment.
8.     Please email source code to saeedturk@yahoo.com, (before submitting) or bring in USB. Also bring Printed Source Code at submission.

Friday, 30 March 2018

Basic Structure of Assembly Language

Prepared by: Saad Aslam



  • Assembly language programs divide roughly into five sections
    • header
    • equates
    • data
    • body
    • closing

Arrays-Assembly Language

Prepared by: Saad Aslam

Arrays
  • A one-dimensional array is an ordered list of elements, all of the same type.
  • To define an array in assembly language
    • W dw 10,20,30,40,50,60
  • The address of the array variable is called the base address of the array
  • If the offset address of the array is 0200h, the array looks like this in memory:

Tuesday, 27 March 2018

Visual Programming Course Outline




Course Instructor: Ms. Asma Kanwal / Mam Anoosha
Description



Visual programming languages are extensively used for the rapid development of graphical applications. This subject will introduce students to the essential principles of event-driven programming and to programming using a visual environment through the use of the Visual C# programming language.

Monday, 26 March 2018

Recursion- DSA

By: Gulfam Tahir
Section : E2


                   Permutation Program through Recursive Call

#include<iostream>
using namespace std;
int punction(int,int);
int fac(int);
int fac(int n){
                if(n<=1){
                                return 1;           //base case
                }else{
                                return n*fac(n-1);     //recrssive case
                }
}

Thursday, 22 March 2018

Differential Equation Mid Term Syllabus


  1. Classification of Differential Equation
  2. Order and Degree
  3. General Solution
  4. Seperable Equation
  5. Homogenous Equation and Solution
  6. Equation Reducible to Homogenous
  7. Exact Equation
  8. Intergrating Factor
  9. Linear Equation
  10. Orthogonal Trajectories
  11. Bernoulis Equation

Wednesday, 21 March 2018

Addressing Modes in 8086

Prepared by Saad Aslam

Addressing mode indicates a way of locating data or operands. Depending up on the
data type used in the instruction and the memory addressing modes, any instruction may
belong to one or more addressing modes or same instruction may not belong to any of the
addressing modes.
The addressing mode describes the types of operands and the way they are accessed for
executing an instruction. According to the flow of instruction execution, the instructions may be
categorized as
1. Sequential control flow instructions and
2. Control transfer instructions.
Sequential control flow instructions are the instructions which after execution, transfer
control to the next instruction appearing immediately after it (in the sequence) in the program. For
example the arithmetic, logic, data transfer and processor control instructions are Sequential
control flow instructions.
The control transfer instructions on the other hand transfer control to some predefined
address or the address somehow specified in the instruction, after their execution. For example
INT, CALL, RET & JUMP instructions fall under this category.
The addressing modes for Sequential and control flow instructions are explained as follows.
1. Immediate addressing mode:
In this type of addressing, immediate data is a part of instruction, and appears
in the form of successive byte or bytes.
Example: MOV AX, 0005H.
In the above example, 0005H is the immediate data. The immediate data may be 8- bit or 16-bit in
size.
2. Direct addressing mode:
In the direct addressing mode, a 16-bit memory address (offset) directly specified in the
instruction as a part of it.
Example: MOV AX, [5000H].
3. Register addressing mode:
In the register addressing mode, the data is stored in a register and it is referred using the
particular register. All the registers, except IP, may be used in this mode.
Example: MOV BX, AX
4. Register indirect addressing mode:
Sometimes, the address of the memory l o c a t i o n which contains data or operands is
determined in an indirect way, using the offset registers. The mode of addressing is known as
register indirect mode.
In this addressing mode, the offset address of data is in either BX or SI or DI Register. The
default segment is either DS or ES.
Example: MOV AX, [BX].
5. Indexed addressing mode:
In this addressing mode, offset of the operand is stored one of the index registers. DS & ES
are the default segments for index registers SI & DI respectively.
Example: MOV AX, [SI]
Here, data is available at an offset address stored in SI in DS.
6. Register relative addressing mode:
In this addressing mode, the data is available at an effective address formed by adding an
8-bit or 16-bit displacement with the content of any one of the register BX, BP, SI & DI in the default
(either in DS & ES) segment.
Example: MOV AX, 50H [BX]
7. Based indexed addressing mode:
The effective address of data is formed in this addressing mode, by adding content of a
base register (any one of BX or BP) to the content of an index register (any one of SI or DI). The
default segment register may be ES or DS.
Example: MOV AX, [BX][SI]
8. Relative based indexed:
The effective address is formed by adding an 8 or 16-bit displacement with the sum of
contents of any of the base registers (BX or BP) and any one of the index registers, in a default
segment.
Example: MOV AX, 50H [BX] [SI]
For the control transfer instructions, the addressing modes depend upon whether the
destination location is within the same segment or in a different one. It also depends upon the
method of passing the destination address to the processor. Basically, there are two addressing
modes for the control transfer instructions, viz. Inter segment and intra segment addressing modes.
If the location to which the control is to be transferred lies in a different segment
other than the current one, the mode is called intersegment mode. If the destination
location lies in the same segment, the mode is called intersegment mode.
Addressing Modes for control transfer instructions:
1. Intersegment
· Intersegment direct
· Intersegment indirect
2. Intrasegment
· Intrasegment direct
· Intrasegment indirect

Monday, 12 March 2018

OBSERVATIONS of Assembly Lab 03

Q4:TITLE to determine AX<BX & BX< CX Then put 1 in DH
In this program you simply have to mov values in AX,BX,CX and then perform comparisons.
To move value in register

Friday, 9 March 2018

Visual Programming-Recommended Books

Illustrated C# 2010


Download Book

Monday, 5 March 2018

OBSERVATIONS of Assembly Lab 2

OBSERVATIONS

I am not writing the whole code but I am discussing the logics which are used to execute the program properly.

TASK 1:
We have to add 5 bytes.To understand this concept ,we have to review that a general register in 8086 can store 16 bits means 2 bytes .So to store 5 bytes we need maximum 3 registers .
MOV AL,1H
MOV AH,2H
MOV  BL,3H
MOV BH,4H
MOV DL,5H
We can perform addition on these registers accordingly.
ADD BL,DL
ADD BH,BL
ADD AL,BH
ADD AH,AL
The sum will be stored in AH and you can see the result by debugging

Sunday, 4 March 2018

Flags Representations in MASM


     FLAGS         SET (a 1-bit      CLEARed (a 0-bit)
 ---------------   --------------- -------------------
 Overflow of  =    OV (OVerflow)   NV [No oVerflow]

 Direction   df  = DN (decrement)  UP (increment)

Interrupt   if  =  EI  (enabled)   DI (disabled)


 Sign   sf  =NG (negative)   PL (positive)

 Zero   zf  =      ZR   [zero]     NZ  [ Not zero]

Auxiliary Carry af = AC             NA  [ No AC ]

 Parity   pf  =    PE  (even)      PO  (odd)

 Carry   cf  =     CY  [Carry]     NC  [ No Carry]

Wednesday, 21 February 2018

Visual Programming Assignment-1

Slide 2 and Assignment 1 of Visual Programming has been uploaded . 

Link is given below :


  • https://saadaslamcs.blogspot.com/p/visual-programing.html
  • Monday, 19 February 2018

    Installation GuideLines for MASM and DOSBOX

    • Installation Guide:

    1. Create a Folder ‘MASM’ in your C: Drive, and Extract downloaded software in MASM
    2. Install DosBox 0.74, it will be located in MASM folder.
    3. Go to C:\Program Files\DosBox , Find DosBox 0.74 Options file, Open this file in notepad
    4. At the end of DosBox 0.74 Options file, add these lines
    mount c c:\masm
    c:
    Open Installed DosBox Program you’re in MASM Directory…..
    • To check whether masm is installed correctly or not .Type the following command

    debug
    d

    The Software Link is given below:
    http://saadaslamcs.blogspot.com/p/assembly-language-tools.html