1 / 47

Topic 2 : Data and Data Representation

Learn about data, information, processing, and data representation in computers. Understand the concepts of bits, bytes, and words, as well as data formats and encoding. Explore data integrity and storage, and the basics of binary and numbering systems.

mayerd
Download Presentation

Topic 2 : Data and Data Representation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Topic 2 :Data and Data Representation CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  2. Lesson Outcome • Data, Information and Processing • Bits, Bytes, and Words • ASCII Codes, Unicode CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  3. Data, Information and Processing CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  4. Data Formats • Computers • Process and store all forms of data in binary format • Human communication • Includes language, images and sounds • Data formats: • Specifications for converting data into computer-usable form • Define the different ways human data may be represented, stored and processed by a computer CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  5. Real World Computer Data Data Dear Mom: Keyboard 10110010… Digitalcamera 10110010… Introduction • Examples Input device CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  6. Information processing cycle Collects data(input) Processing Produces information (output) • Information processing cycle is the series of input, process, output, and storage activities. CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  7. Data, Information, Knowledge • Data: unprocessed facts and figures • “The price of crude oil is $80 per barrel.” • Information: data that has been interpreted • “The price of crude oil has risen from $70 to $80 per barrel” • Knowledge: information, experience and insight • “When crude oil prices go up by $10 per barrel, it’s likely that gas prices will rise by 14¢ per gallon” Making Sense of Data and Information, Elsevier 2007 CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  8. Information processing cycle • Computers process data into information. CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  9. Processing – Data Coding • Data is encoded by assigning a bit pattern to each character, digit, or multimedia object. • Many standards exist for encoding: • Character encoding like ASCII • Image encodings like JPEG • Video encodings like MPEG-4 CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  10. Examples of Standards CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  11. Processing – Data Coding Example CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  12. Processing - Data Storage and Compression • Reduce the size of data to save space or transmission time • Categories of data compression: CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  13. Processing – Data Integrity • Security or protection of data • Involves access to files  Access Control Lists (ACLs) • Protect files from being read, written to, or executed • Password protection • Keyboard locking CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  14. Processing – Data Integrity Data Integrity = Quality of Data CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  15. Processing – Data Integrity CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  16. Bits, Bytes, and Words CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  17. Bits, Bytes, and Words CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  18. Bits, Bytes, and Words CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  19. Bits, Bytes, and Words CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  20. Bits, Bytes, and Words CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  21. Numbering System CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  22. Numbering System CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  23. Number Bases 1) Radix • When referring to binary, octal, decimal, hexadecimal, a single lowercase letter appended to the end of each number to identify its type. • E.g. • hexadecimal 45 will be written as 45h • octal 76 will be written as 76o or 76q • binary 11010011 will be written as 11010011b • The following table shows the equivalent values for decimal numbers in binary, octal and hexadecimal: CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  24. Number Bases • Base The number of different symbols required to represent any given number The larger the base, the more numerals are required • Base 2 (Binary) : 0,1 • Base 8 (Octal) : 0,1,2, 3,4,5,6,7 • Base 10 (Decimal) : 0,1, 2,3,4,5,6,7,8,9 • Base 16 (Hexadecimal): 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F For a given number, the larger the base the more symbols required but the fewer digits needed CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  25. Binary System • Early computer design was decimal • Mark I and ENIAC • John von Neumann proposed binary data processing (1945) • Simplified computer design • Used for both instructions and data • Natural relationship betweenon/off switches and calculation using Boolean logic CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  26. Binary System CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  27. Binary System • A computer stores both instructions and data as individual electronic charges. • represent these entities with numbers requires a system geared to the concept of on and off or true and false • Binary is a base 2 numbering system • each digit is either a 0 (off) or a 1 (on) • Computers store all instructions and data as sequences of binary digit • e.g. 010000010100001001001000011 = “ABC” CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  28. Octal System • As known as base 8 numbering system • There are only eight different digits available (0, 1, 2, 3, 4, 5, 6, 7) CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  29. Decimal System • Decimal is a base 10 numbering system • We use a system based on decimal digits to represent numbers • Each digit in the number is multiplied by 10 raised to a power corresponding to that digit position. CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  30. Hexadecimal System • Hexadecimal is a base 16 numbering system • Used not only to represent integers • Also used to represent sequence of binary digits CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  31. H e l l o , w o r l d = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Hexadecimal 48 65 6C 6C 6F 2C 20 77 67 72 6C 64 Decimal 72 101 108 108 111 44 32 119 103 114 108 100 Binary 01001000 01100101 01101100 01101100 01101111 00101100 00100000 01110111 01100111 01110010 01101100 01100100 “Hello, world” Example CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  32. ASCII Codes, Unicode CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  33. The Alphanumeric Representation • The data entered as characters, number digits, and punctuation are known as alphanumeric data. • 3 alphanumeric codes are in common use. • ASCII (American Standard Code for Information Interchange) • Unicode • EBCDIC (Extended Binary Coded Decimal Interchange Code). CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  34. The Alphanumeric Representation • The following tables show the comparisons between the ASCII code in binary and hexadecimal for the given characters. CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  35. ASCII • It is an acronym for the American Standard Code for Information Interchange. • It is a standard seven-bit code that was first proposed by the American National Standards Institute or ANSI in 1963, and finalized in 1968 as ANSI Standard X3.4. • The purpose of ASCII was to provide a standard to code various symbols ( visible and invisible symbols) CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  36. ASCII • In the ASCII character set, each binary value between 0 and 127 represents a specific character. • Most computers extend the ASCII character set to use the full range of 256 characters available in a byte. The upper 128 characters handle special things like accented characters from common foreign languages. • In general, ASCII works by assigning standard numeric values to letters, numbers, punctuation marks and other characters such as control codes. • An uppercase "A," for example, is represented by the decimal number 65." CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  37. CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  38. Keyboard Input • Key (“scan”) codes are converted to ASCII • ASCII code sent to host computer • Received by the host as a “stream” of data • Stored in buffer and being processed CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  39. Keyboard Input Example a Shift a CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  40. Unicode • A worldwide character-encoding standard • Its main objective is to enable a single, unique character set that is capable of supporting all characters from all scripts, as well as symbols, that are commonly utilized for computer processing throughout the globe • 16-bit standard • It is a superset of ASCII CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  41. Unicode CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  42. Usage of Unicode Encode characters used in email settings Encode text for creation of passwords Encodes characters to display in all webpages Modify characters used in documents CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  43. ASCII vs Unicode • Both are character codes • The 128 first code positions of Unicode mean the same as ASCII • ASCII defines 128 characters, which map to the numbers 0–127. Unicode defines (less than) 221characters, which, similarly, map to numbers 0–221 (though not all numbers are currently assigned, and some are reserved). • Unicode is a superset of ASCII, and the numbers 0–128 have the same meaning in ASCII as they have in Unicode. For example, the number 65 means "Latin capital 'A'". CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  44. ASCII vs Unicode CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  45. ASCII vs Unicode CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  46. Extended Binary Coded Decimal Interchange Code developed by IBM Restricted mainly to IBM or IBM compatible mainframes Conversion software to/from ASCII available Common in archival data Character codes differ from ASCII EBCDIC CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

  47. END CSC116 - INTRODUCTION TO COMPUTERS AND PROGRAMMING

More Related