Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture # 02 07/02/2013Dr. Muhammad Umair 1. 07/02/2013Dr. Muhammad Umair 2  Numeric  Integer Numbers  0,10,15,4563 etc.  Fractional Number  10.5,

Similar presentations


Presentation on theme: "Lecture # 02 07/02/2013Dr. Muhammad Umair 1. 07/02/2013Dr. Muhammad Umair 2  Numeric  Integer Numbers  0,10,15,4563 etc.  Fractional Number  10.5,"— Presentation transcript:

1 Lecture # 02 07/02/2013Dr. Muhammad Umair 1

2 07/02/2013Dr. Muhammad Umair 2  Numeric  Integer Numbers  0,10,15,4563 etc.  Fractional Number  10.5, 78.67, 20.0  Character  A, X, U, o, r etc.

3  Integer Numbers  Binary Number System  positive integers only  Maximum decimal Value  2 n – 1  Minimum decimal Value 00  No of values 2n2n 07/02/2013Dr. Muhammad Umair 3

4  Integer Numbers  Ones Compliment  negative numbers  Minimum Value  -2 n-1 + 1  Maximum Value  2 n-1 -1  No. of Values  2 n - 1 07/02/2013Dr. Muhammad Umair 4

5  Integer Numbers  Two’s Compliment  negative number  Minimum Value  -2 n-1  Maximum Value  2 n-1 -1  No. of Values 2n2n  Binary Coded Decimal 07/02/2013Dr. Muhammad Umair 5

6  Fractional Number  Mantissa  Base  Exponent  57.78  5778 x 10 -2  Mantissa  5778  Base  10  Exponent  -2 07/02/2013Dr. Muhammad Umair 6

7  Character  byte size  Minimum no. of bits required to represent a character value  Byte  No. of bits used to represent one character in the system  Hardware & Software Implementation 07/02/2013Dr. Muhammad Umair 7

8  Data Type  is the collection of objects and the set of operations that act on those objects.  Abstract Data Type  is a data type that is organized in such a way that the specification of the objects and the specification of the operations on the objects is separated from the representation of the objects and the implementation of the operations. 07/02/2013Dr. Muhammad Umair 8

9  Storage Representation of User Data  Understandable for computer  Retrieval of Stored Data  Understandable for user  Transformation of User Data  Operations to transform data from one to another 07/02/2013Dr. Muhammad Umair 9

10  Domain ( D )  Range of values  Function ( F )  Set of operations  Axioms ( A )  Set of rules 07/02/2013Dr. Muhammad Umair 10

11 07/02/2013Dr. Muhammad Umair 11  Logical or mathematical model of a particular organization of data  Arrays  String  Link List  Tree  Graph  Stacks & Queues

12 07/02/2013Dr. Muhammad Umair 12  Traversing  Searching  Inserting  Deleting  Sorting  Merging

13 Data Structure Physical Arrays, Linked List Logical Strings, Stack, Queues, Tree, Graphs 07/02/2013Dr. Muhammad Umair 13

14 Data Structure Linear Arrays, Linked List, Strings, Stack, Queues Non-Linear Tree, Graphs, Sets 07/02/2013Dr. Muhammad Umair 14

15 07/02/2013Dr. Muhammad Umair 15  Identifier keeps the base address  Length = UB - LB - 1  Address of particular element  Base = B,  Size of element = W,  Lower Bound = LB,  Index = I  Loc (A[ I ]) = B + W * ( I - LB)

16 07/02/2013Dr. Muhammad Umair 16  No. of Rows = M, No. of Columns= N  Row Major  Loc (A[I][J]) = B + W * [N (I-RLB) + (J-CLB)]  Column Major  Loc (A[I][J]) = B + W * [M (J-CLB) + (I-RLB)]

17 07/02/2013Dr. Muhammad Umair 17  Row Major  A[I][J][K] = BA + W * [ ( I – 1LB) * M * N + ( J - 2LB ) * N + ( K - 3LB)]  Column Major  A[I][J][K] = BA + W * [ ( K – 3LB) * L * M + ( J - 2LB ) * M + ( I - 1LB)]


Download ppt "Lecture # 02 07/02/2013Dr. Muhammad Umair 1. 07/02/2013Dr. Muhammad Umair 2  Numeric  Integer Numbers  0,10,15,4563 etc.  Fractional Number  10.5,"

Similar presentations


Ads by Google