Presentation is loading. Please wait.

Presentation is loading. Please wait.

LBSC 690 Session 4 Data Transformation and Representation.

Similar presentations


Presentation on theme: "LBSC 690 Session 4 Data Transformation and Representation."— Presentation transcript:

1 LBSC 690 Session 4 Data Transformation and Representation

2 Forms of Data 1. Numerical info. 2. Character or “symbol” info. 3. Visual info. 4. Audio info. 5. Streams of specially encoded digits, e.g., “ones” and “zeros.” 6. Command or instructional information.

3 Data Conversion External data may have to be transformed before computer can process it. –What form of representation is required? Two options: –Digital. –Analog.

4 Two Major Types of Computer Digital: –Data is expressed in discrete, specific, separate and distinct, values: E.g., light/light switch. –Two states. Analog: –Data varies, or is expressed, as a continuous range of values. E.g., temperature.

5 Advantages of Digital Simplicity and reliability. –Particularly using 2 discrete states. Claude Shannon’s work. –Application of Boolean Logic to switching circuits. Use of logical operators: and, or & not. Truth of logical statements.

6 Truth Tables: A or B A B A or B 0 0 0 1 0 1 0 1 1 1 1 1

7 Truth Tables: A and B A B A and B 0 0 0 1 0 0 0 1 0 1 1 1

8 Truth Tables: Not A A not A 1 0 0 1

9 Boolean Algebra of Sets Venn Diagrams A B A=Universe of all published books B=All scientific and technical books

10 Boolean Algebra of Sets II A B C D A=Universe of all published books. B= All scientific and technical books C=All books published in English. D=“Intersection” of B & C. What does it represent?

11 Number Systems What is: –679? –111? We are accustomed to think in the decimal system. –But there are many number systems. –See transparency.

12 Digits Decimal: 0,1,2,3,4,5,6,7,8 & 9. Binary system: 0 & 1. Ternary:0, 1, & 2. Octal: 0, 1, 2, 3, 4, 5, 6 & 7. Hexadecimal: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E & F.

13 Binary Arithmetic Addition: 0+0=0 0+1=1 1+0=1 1+1=10 Multiplication: 0x0=0 0x1=0 1x0=0 1x1=1

14 Definitions Binary digits: –Called “bits” for short. 8 bits, treated as a unit, are called a “byte.” 4 bits are called a “nibble.”

15 Measures A word is a generic term to describe a specific group of binary digits treated as a unit. –Words are measured by their length. The number of bits they contain. Registers are measured by their lengths: –The number of bits they contain. –May be organized on a word or byte basis.

16 Coding Use of binary numbers to represent symbols or characters. Two most widely used coding schemes: –ASCII – American Standard Code for Information Interchange. (7 bits). Extended ASCII. –EBCDIC – Extended Binary Coded Decimal Interchange Code. (8 bits).

17 ASCII Handout. Representation Scheme: X 7 6 5 4 3 2 1 A : 1 0 0 0 0 0 1 a: 1 1 0 0 0 0 1 (Extended ASCII is used in every PC.)

18 Addressing Each memory location: –Has a unique number assigned to it – its address. Example: In Intel 8086 memory is 1MB, –1 million bytes. To be precise, it is 1,048,576 bytes. 1KB is 1024 bytes. Each memory location is like a mailbox.

19 Memory Contents are distinct from address. Concept of “random” access: –RAM, SRAM, DRAM, SDRAM, VRAM. Each memory byte can contain: 1.Binary number, 2.Binary coded decimal, 3.ASCII character, 4.Binary string. 5.Instruction. (NOTE: Each of these is represented in memory by 1’s and 0’s).

20 Instruction Determines what operation is to be performed by computer. –Operation part. Provides information about location of data to be used or results to be stored. –Operand part (Address part).

21 Instruction Types Many different types; generally fall into 4 major categories: 1.Arithmetic. 2.Logical. 3.Editing. 4.Input/Output (I/O). – Total ensemble of instructions is called the instruction set.

22 Typical Instructions LOAD L 58 01011000 (M) (R1) {Memory is unchanged, R1 is changed.} ADD A 5A 01011010 (M) + (R1) (R1) {Memory unchanged, Sum in R1.} STORE ST 50 01010000 (R1) (M) {Memory changed, R1 unchanged.}

23 Sample Problem (Deliberately Simplistic) Problem Statement: –Maintain daily count of the number of radios in the warehouse. Method of Solution: –Compute an arithmetic sum, defined as the NEW TOTAL, by adding two numbers, defined as TODAY’S RECEIPTS and YESTERDAY’S TOTAL. That is: NEW TOTAL = YESTERDAY’S TOTAL + TODAY’S RECEIPTS. NOTE: To simplify example, we have ignored SALES (shipments).

24 Procedure (Flow Chart) Bring quantity representing YESTERDAY’S TOTAL from memory into the ALU. Add to it the quantity from memory representing TODAY’S RECEIPTS. Store resulting sum, the NEW TOTAL in memory

25 Program Reference handout. Note: –Instructions and data are both stored in memory. Both are represented by 0’s and 1’s. They are in separate locations in memory. Program operates in cyclical fashion: –One instruction at a time. –Each instruction has two parts: A “fetch cycle” followed by an “execute cycle.” Reference the handout.

26 Instruction Cycle: Fetch Cycle MEMORY CONTROL UNIT Instruction Counter Instruction Register ALU Register 1 Register 2 ……… Register N

27 Instruction Cycle: Execute MEMORY CONTROL UNIT Instruction Counter Instruction Register ALU Register 1 Register 3

28 Programming Very much detail. Complexity and growth of instructions sets: –Intel 8086:121 instructions. – 80286:144 “. – 80386:195 “. – 80486: 201 “. – Pentium: 289 “. –Pentium Pro MMX: 346 “. – Pentium III: 416 “.

29 Memory Areas of memory reserved for special functions. Primary high-speed memory in PCs is random access (RAM). –It is volatile. Certain memory segments are permanent: –Read only memory (ROM).

30 Interrupts Times when computer needs to be alerted to some situation or condition that needs to be handled expeditiously. –Interrupts are used to do this. –PIC’s. –Operating system provides services to handle interrupts.

31 Classification of Computer Systems 1. SISD: Single instruction, single data streams. 2. SIMD: Single instruction, multiple data streams. 3. MISD: Multiple instruction, single data streams. 4. MIMD: – Multiple instruction, multiple data streams.

32 Definitions Multiprocessors: –Two or more processing systems tightly connected under integrated control. Pipelining: –Overlap or assembly-line organization. Computer “looks ahead” to next instructions. Distributed systems: –Network of computer systems. Loosely connected: –Client/Server.


Download ppt "LBSC 690 Session 4 Data Transformation and Representation."

Similar presentations


Ads by Google