T

.

Friday, 30 March 2018

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:

DLD: Laws of Boolean Algebra


Prepared by:Saad Aslam

Boolean Operations and Expressions
Boolean Algebra is the mathematics of digital system .A basic knowledge of Boolean Algebra is the study and analysis of logic circuits .Variables and complements terms are used in this chapter.
A variable can have  a 1 or 0 value.
A complement is the inverse of the variable indicated by a bar over the variable .For example:
Complement of variable A is A.If A is 0 the A is 1 and if A is 1 then A  is 0.The complement of a variable is read as “not A” or “A bar”.

Report Writing-Communication Skills



COMPUTER SCIENCE:
A Platform for turning Imaginations into Reality
________________________________________________________________
July 19, 2017.


Prepared for:
Sir Sheryar




Prepared by :
 Saad  Aslam
Roll no: 0043-BSCS-16
Department of Computer Science
Governement College University, Lahore








Table of Contents
Executive Summary………………………………………………………….
1.    Introduction……………………………………………………………………….  5
1.1.  Background
1.2.  Statement of the Problem
1.3.  Purposes of the Study
1.4.  Scope

2.    Related Literature………………………………………………………………. 6
3.    Procedure……………………………………………………………………………. 6
4.    Findings……………………………………………………………………………….. 7
4.1.  Computer Science role towards success
4.2.  User perceptions on computing facilities
4.3.  Researches made in field of Computer Science
4.4.  Employment
5.    Analysis................................................................................................................. 9
6.    Conclusions and Recommendations................................................... 10
6.1.  Conclusions
6.2.  Recommendations
Appendix-Study Questionnaire
Bibliography








LIST OF ILLUSTRATIONS
FIGURES
       i.            Branches of Science……………………………………………… 7
     ii.            User Perceptions……….…………………………………………..8
  iii.            Learning Computer Science......…………………………………….9








TABLES
       i.            Solutions of the Problems…………………………………………..8






EXECUTIVE SUMMARY
Computer science is the most growing fields nowadays. It has taken much more positive change in the world. This study was designed to describe  that how computer science proved as a platform for turning imaginations into reality, its progress in the modern world, the researches made in this field .100 students ,teachers and parents entering the GCU Computer Science Department were interviewed. Proper analysis was done on this study and recommended improvements to ensure the progress of this field  .

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

Number System-DLD


Prepared by: Saad Aslam





Number  System
Radix or Base a number System:
Base or Radix of number system is the no symbols used in its representations .
For example:
·         Decimal number  system  has 10 symbols
0 ,1 ,2 ,3 ,4 ,5 ,6 ,7 ,8 ,9 hence Radix or Base is 10
·         Binary number system has symbols 0 or 1
Therefore radix is 2
·         Octal number system has 8 symbols
0 ,1, 2, 3, 4, 5, 6, 7 therefore Rdix or Base is 8
·         Hexadecimal number system has 16 symbols
0 ,1 ,2, 3………………..,15 .Therefore Radix is 16


Common Number Systems
System
Base
Symbols
Used by Humans?
Used by Computers?
Decimal
10
0,1,2, . . . . ,9
Yes
No
Binary
2
0 , 1
No
Yes
Octal
8
0 , 1 ,2 , . .  . ,7
No
No
Hexadecimal
16
0 ,1,2,  . . . ,9 ,A ,B, C , . . ,F
No
No


In general ,a number can be expressed in  Base-r   system  as
an r+ an-1rn- 1+ .………………… + a0r+ a-1r-1 + a-2r-2 +…………………....+ a-mr-m
For example:
2 3 4 6 . 5 9
2*103 + 3*102 + 4*101 + 6*100 + 5*10-1 + 9*10-2  =2346.59
Types of Number Systems
Commonly used number systems are:
1.      Decimal Number System
2.      Binary Number System
3.      Octal Number System
4.      Hexadecimal Number System
Conversion of Bases
1.      (A)Decimal number system to other Number Systems
(B) Other Number Systems to Decimal Number Systems
2.      (A)Binary  number system to other Number Systems
(B)Other Number Systems to Binary Number Systems
3.      (A)Octal number system to other Number Systems
(B) Other Number Systems to Octal Number Systems
4.      (A)Hexadecimal  number system to other Number Systems
(B) Other Number Systems to Hexadecimal Number Systems

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