Presentation is loading. Please wait.

Presentation is loading. Please wait.

DATA REPRESENTATION, DATA STRUCTURES AND DATA MANIPULATION TOPIC 4 CONTENT: 4.1. Number systems 4.2. Floating point binary 4.3. Normalization of floating.

Similar presentations


Presentation on theme: "DATA REPRESENTATION, DATA STRUCTURES AND DATA MANIPULATION TOPIC 4 CONTENT: 4.1. Number systems 4.2. Floating point binary 4.3. Normalization of floating."— Presentation transcript:

1 DATA REPRESENTATION, DATA STRUCTURES AND DATA MANIPULATION TOPIC 4 CONTENT: 4.1. Number systems 4.2. Floating point binary 4.3. Normalization of floating point binary numbers 4.4. Implementation of data structures, including linked lists, stacks, queues and tress 4.5. Searching and sorting

2 Counting is one of the first skills you learn as a small child. Many children will be able to count to 10 and understand what that means before they go to school. A child of the Roman Empire 2000 years ago would have learned in the same way, except that the numbers would look different. I, II, III, IV, V, VI, VII, VIII, IX, X XI, XII, XIII, XIV, XV, XVI, XVII, XVIII, XIX, XX The pattern for this numbering system is not as simple as the decimal (or denary) system, but like it, it is based around the number 10 (how many fingers and toes do you have?). A number system can be created, based on any number you choose. The decimal system uses 10 different symbols. The next number in this sequence doesn't have a symbol. As the values increase in size, a second number position on the left of the first is created. The same symbols are used again in position 2. Using 2 number positions, a total of 100 different values can be represented.

3 Position 2 Position 1 0""99 This number can be derived as follows: 10 symbols using 2 number positions, 102 = 100 Position 2 Position 1 10 Position 2 Position 1 23 The symbol 23 means: The 2 represents 2*10 and the 3 represents 3*1. 2*10 + 3*1 = 23 Data representation and number systems Number systems.htm

4 Floating-Point Binary The two most common floating-point binary storage formats used by Intel processors were created for Intel and later standardized by the IEEE organization: The Sign The sign of a binary floating-point number is represented by a single bit. A 1 bit indicates a negative number, and a 0 bit indicates a positive number. The Mantissa It is useful to consider the way decimal floating-point numbers represent their mantissa. Using -3.154 x 105 as an example, the sign is negative, the mantissa is 3.154, and the exponent is 5. The fractional portion of the mantissa is the sum of each digit multiplied by a power of 10:.154 = 1/10 + 5/100 + 4/1000 A binary floating-point number is similar. For example, in the number +11.1011 x 23, the sign is positive, the mantissa is 11.1011, and the exponent is 3. The fractional portion of the mantissa is the sum of successive powers of 2. In our example, it is expressed as:.1011 = 1/2 + 0/4 + 1/8 + 1/16

5 The Exponent IEEE Short Real exponents are stored as 8-bit unsigned integers with a bias of 127. Let's use the number 1.101 x 25 as an example. The exponent (5) is added to 127 and the sum (132) is binary 10100010. Tutorial Floating-Point Binary.htm

6 Searching and Sorting Algorithms For the Computer Science A exam, you are responsible for knowing the concepts behind the following algorithms, being able to code them or read code utilizing them, and understanding their relative efficiency: Sorting Algorithms : Selection Sort Insertion Sort Merge Sort Quick Sort Searching Algorithms : Sequential (or Linear) Search Binary Search Students taking the Computer Science AB exam are responsible for all of the above, plus: Sorting Algorithms : Heap Sort Searching Algorithms : Hashing


Download ppt "DATA REPRESENTATION, DATA STRUCTURES AND DATA MANIPULATION TOPIC 4 CONTENT: 4.1. Number systems 4.2. Floating point binary 4.3. Normalization of floating."

Similar presentations


Ads by Google