Download presentation
Presentation is loading. Please wait.
Published byAmberlynn Simpson Modified over 9 years ago
1
Chapter 2 Data and Information 2.1 Difference between Data and Information 2.1 Difference between Data and Information 16 2.2 Computer Representation of Data2.2 Computer Representation of Data17 2.3 Hierarchical Structure of Data2.3 Hierarchical Structure of Data23 2.4 Data Collection and Data Preparation2.4 Data Collection and Data Preparation25 2.5 Sources of Errors2.5 Sources of Errors26 2.6 Data Control2.6 Data Control27 2.7 Processing Data2.7 Processing Data32 2.8 Processing Information2.8 Processing Information37 2.9 Modes of Processing2.9 Modes of Processing41
2
2.1 Difference between Data and Information (1) zRaw data (or simply data) is ya collection of facts, figures and symbols yraw material to be processed by a computer ymeaningless if you don’t know what it represents zInformation is ythe processed data yorganised, meaningful and useful yused in decision making Chapter 2 Data and Information
3
2.1 Difference between Data and Information (2) Chapter 2 Data and Information
4
2.2 Computer Representation of Data z2.2.1 Number System2.2.1 Number System z2.2.2 Bits and Bytes in a Computer2.2.2 Bits and Bytes in a Computer z2.2.3 ASCII Characters2.2.3 ASCII Characters z2.2.4 Chinese Characters2.2.4 Chinese Characters Chapter 2 Data and Information
5
2.2.1 Number System (1) zComputer is binary machine, using digits 0 and 1 only zBinary digit yBit yEach bit is either 0 or 1 2.2 Computer Rep. of Data
6
2.2.1 Number System (2) zA Number System consists of a set of digits zThe Base of a system yis the number of digits in the set zThe base of ybinary number system is 2 ydecimal number system is 10 yhexadecimal number system is 16 zOctal (base 8) and hexadecimal (base 16) yare used by programmers 2.2 Computer Rep. of Data
7
2.2.1 Number System (3) yIn hexadecimal, the decimal value of digit A is 10, B is 11 and so on 2.2 Computer Rep. of Data
8
2.2.1 Number System (4) yConsider a 4-digit number of base b: yThe decimal value of the number is 2.2 Computer Rep. of Data
9
2.2.1 Number System (5) zConversion between Number Systems yHow can a decimal number be converted into other bases, like binary? yThis is done by repeated division. 2.2 Computer Rep. of Data
10
2.2.1 Number System (6) 2.2 Computer Rep. of Data
11
2.2.1 Number System (7) 2.2 Computer Rep. of Data
12
2.2.1 Number System (8) 2.2 Computer Rep. of Data
13
2.2.1 Number System (9) yBinary equivalent of octal digits is shown below: yBinary equivalent of hexadecimal digits is shown below: 2.2 Computer Rep. of Data
14
2.2.1 Number System (10) 2.2 Computer Rep. of Data
15
2.2.2 Bits and Bytes in a Computer (1) zByte yThe basic unit of storage in a computer yEach byte is formed by 8 bits. yData are stored in multiple of bytes or 8 bits 2.2 Computer Rep. of Data
16
2.2.2 Bits and Bytes in a Computer (2) zEach byte can be represented by two hexadecimal digits yBinary code 110 (2) is stored in the computer as 2.2 Computer Rep. of Data
17
2.2.2 Bits and Bytes in a Computer (3) zPossible bit pattern in each byte yvaries from 0000 0000 (2) to 1111 1111 (2). zRange of value stored in a byte yvaries from 0 to 255 yThere are 256 different combinations in a byte 2.2 Computer Rep. of Data
18
2.2.3 ASCII Characters (1) zThe two common types of data in a computer: yNumeric yAlphanumeric. zNumeric data are used for calculation zExamples of alphanumeric data: yName, address, sex 2.2 Computer Rep. of Data
19
2.2.3 ASCII Characters (2) zAlphanumeric data are formed by characters that include 1.letter (e.g. A, B, a, b) 2.digit (e.g. 0, 1, 2, 3) 3.symbol (e.g. %, &, #) 4.control character (e.g. end-of-file mark, a new-line character) 2.2 Computer Rep. of Data
20
2.2.3 ASCII Characters (3) zASCII stands for yAmerican Standard Code for Information Interchange. zEach ASCII code yis an 8-bit binary code yEach character takes up one byte of storage yWith a maximum of 256 codes yEnough for English language 2.2 Computer Rep. of Data
21
2.2.4 Chinese Characters (1) zMore than 10,000 Chinese characters yOne byte is not enough to represent all Chinese characters. zTwo-byte Code yBit pattern varies from 0000 (16) to FFFF (16). yNote that FFFF (16) is 10000 (16) - 1. yRange: from 0 to 16 4 - 1 or 65535. yCan represent 65536 characters. 2.2 Computer Rep. of Data
22
2.2.4 Chinese Characters (2) zEncoding Chinese Characters y 大五碼 (Big-5) y 國標碼 (Guo-Biao) y 漢字碼 (Hanzi) zAll use two-byte codes 2.2 Computer Rep. of Data
23
2.3 Hierarchical Structure of Data (1) Chapter 2 Data and Information
24
2.3 Hierarchical Structure of Data (2) zData in a database are formed by Characters zField yCombination of characters yMeaningful information ye.g. Name, Address and Telephone number Chapter 2 Data and Information
25
2.3 Hierarchical Structure of Data (3) zRecord yCollection of fields for the same object yA record stores the information of a person yIf there are 30 persons, there will be 30 records zTable yCollection of similar records yEach row represents a record yEach column represents a field Chapter 2 Data and Information
26
2.3 Hierarchical Structure of Data (4) zDatabase yCollection of tables yThe database for a school library consists of tables for xStudents xBooks xLoan transactions yUsually, a database is stored in a file Chapter 2 Data and Information
27
2.3 Hierarchical Structure of Data (5) Chapter 2 Data and Information
28
2.3 Hierarchical Structure of Data (6) zKey field (or primary key) yidentify records in a table yEvery record must have a unique key value y(No two records have the same key value) yImportant in searching information ye.g. Student ID y(Why should student name not be used as key field?) Chapter 2 Data and Information
29
2.4 Data Collection and Data Preparation (1) zData Preparation yData should be arranged properly yfor easy input into a computer ye.g. before marks are entered into computer, marked scripts are arranged in order of class number Chapter 2 Data and Information
30
zTwo methods for data input z1.Direct Input ySpecial input devices yWithout human interventions yRequires little data preparation ye.g. bar code on grocery item is captured by a bar code reader z2.Manual Input yInvolves a keyboard yManually entered into the computer 2.4 Data Collection and Data Preparation (2) Chapter 2 Data and Information
31
2.5 Sources of Errors (1) zGarbage In Garbage Out (GIGO) yComputer will give wrong result for yinaccurate/incomplete data. z1. Data source errors yData in the source document is incorrect yMainly caused by the source providers ye.g. Wrong data entry (intentional or unintentional), Omission of data or Poor handwriting Chapter 2 Data and Information
32
2.5 Sources of Errors (2) z2. Transcription errors yIncorrectly read from the source document or yIncorrectly typed through a keyboard yMainly caused by the computer operators z3. Transposition errors yThe information of one object is mistakenly entered into another ySerious error yCaused by poor data preparation Chapter 2 Data and Information
33
2.6 Data Control z2.6.1 Data VerificationData Verification z2.6.2 Data ValidationData Validation Chapter 2 Data and Information
34
Data Control 2.6.1 Data Verification (1) zData verification yChecking by human yData copied from one medium to another zMethod 1 yEnter the same set of data twice by two different persons. yThen, the results are compared 2.6 Data Control
35
Data Control 2.6.1 Data Verification (2) zMethod 2 yEnter the data, produce a report yAsk the source provider to verify yIf there are errors, xcorrect the errors and xrepeat the verification process xuntil the report is completely error free zVerification by mail yReport is printed and mailed to the source provider yWhen reply is received, xaddress is verified automatically xHowever, will have certain delay 2.6 Data Control
36
Data Control 2.6.1 Data Verification (2) zMethod 1 yExtra effort yCannot discover some errors, xe.g. Data source errors. zMethod 2 yMore effective yThe verified document can be regarded as a contract between the two parties yMore commonly used xe.g. Online data collections 2.6 Data Control
37
2.6.2 Data Validation (1) zData validation yPrograms are used yChecking against certain Rules: 1. Data Type CheckData Type Check 2. Range CheckRange Check 3. Consistency CheckConsistency Check 4. Completeness CheckCompleteness Check 5. Check DigitCheck Digit 2.6 Data Control
38
Data Validation- 2.6.2 Data type check zData type check yTwo types of data entered through keyboard: yNumeric data xUsed for calculation xe.g. “XYZ” is not allowed for Test Score yAlphanumeric data xNumbers, letters, spaces or symbols, like "%", "@", "!" etc. xe.g. “123” is not allowed for Name field 2.6.2 Data Validation
39
Data Validation- 2.6.2 Range check z2. Range check ytests whether a data is within a given range ymay be applied to both numeric and alphanumeric data yFor example, xA test score should range from 0 to 100. xA grade in public examination should range from "A" to "F” or “U” 2.6.2 Data Validation
40
Data Validation- 2.6.2Consistency check z3. Consistency check ycompares the data with other data yto ensure logical yFor example, xthe date of return of a book should not be earlier (smaller) than the date of loan. x(The computer compares date_in and date_out and rejects the input if date_in < date_out.) xThe electric company keeps an average bill for each customer. If the current bill is very much greater than the average bill, a warning message will be shown. 2.6.2 Data Validation
41
Data Validation- 2.6.2Completeness check z4. Completeness check yensures that data is present yIf data is not present, the program will ask for input again until the required data is given. 2.6.2 Data Validation
42
Data Validation- 2.6.2 Check digit (1) z5. Check digit yan extra digit at the end of a code yensure the correctness of the code ycan discover most of the keyboard errors, xe.g. interchanging of two characters yExamples of codes using check digits: xIdentity card numbers xISBN for books xBar codes 2.6.2 Data Validation
43
Data Validation- 2.6.2 Check digit (2) zUsing Weighted modulo-11 to generate check digit: 1.Convert alphabets into numbers with A into 1, B into 2, and so on 2.Starting from right, give each digit a weight of 2, 3, 4, 5, …. 3.Calculate the weighted sum. 4.Divide the weighted sum by 11 and find the remainder. 5.If the remainder is 0 the check digit is 0; If the remainder is 1 the check digit is 'A’, otherwise, subtract the remainder from 11. 2.6.2 Data Validation
44
Data Validation- 2.6.2 Check digit (3) zUsing Weighted modulo-11 to validate check digit: 1.Starting from right, give each digit a weight of 1, 2, 3, 4, 5, 6, 7, 8. 2.Calculate the weighted sum. 3.The weighted sum should be divisible by 11. 2.6.2 Data Validation
45
2.7 Processing Data z2.7.1 SearchingSearching z2.7.2 SortingSorting z2.7.3 MergingMerging Chapter 2 Data and Information
46
Processing Data- 2.7.1 Searching (1) zSearching yto locate a piece of information from a set of data yneed to provide a keyword, xwhich is a word or a sentence 1. Linear searchLinear search 2. Binary searchBinary search 3. Index searchIndex search 2.7 Processing Data
47
Processing Data- 2.7.1 Searching (2) z1.Linear search yData is not well organised ySearch starting from the very beginning or the end yCompare the data with xkeyword one by one yuntil xa match occurs or xsearch fails yUsed in word processing 2.7.1 Searching
48
Processing Data- 2.7.1 Searching (3) z2.Binary search ySearching from organised data ye.g. Searching for words in a dictionary yIn looking for the keyword "synergy” xOpen up the dictionary at the middle xIf the words start with "m”, ignore the half on the left less than "m” xNext, open up at the middle of the half on the right and xcompare the words with the keyword. xThese procedures are repeated until the keyword is found. 2.7.1 Searching
49
Processing Data- 2.7.1 Searching (4) z3. Index search ySimilar to using the index of a book yAn index is much smaller in size than the data. Therefore, index search is very fast. yMost searching in computers use index search. e.g. a search engine of a Web site maintains an index and uses it to locate Web sites for you. 2.7.1 Searching
50
Processing Data- 2.7.2 Sorting (1) zSorting yArrange data in ascending or descending order of a field. e.g. words in a dictionary are sorted in ascending order. z1. Sorting DataSorting Data z2. Sorting TechniquesSorting Techniques 2.7 Processing Data
51
Processing Data- 2.7.2 Sorting (2) z1. Sorting Data yNumeric Data (Table 9) yAlphaNumeric Data (Table 10) xCompare ASCII code x “A” is less than “B”, and so on x“Chan” is less than “Chang” ; x“Ka” is less than "Kai" xDigits are less than letters: "9"<"C” xFor letters, upper case is less than lower case x"C"<"a"<"aC"<"ab"<"ba" 。 xNote: While 3 "12”, it is because "3" > "1" 2.7.2 Sorting
52
Processing Data- 2.7.2 Sorting (3) z2. Sorting technique yWhen a computer performs sorting, it would involve swapping of data. ySwapping xinterchanging the positions of two values yBubble Sort xwill have several passes xIn each pass, swapping between adjacent data would take place if the two data are not in the desired order. 2.7.2 Sorting
53
Processing Data- 2.7.3 Merging zMerging ycombining two sorted lists yto form a new sorted list ythe original two lists must be sorted in the same order 2.7 Processing Data
54
2.8 Processing Information z2.8.1 ReorganisationReorganisation z2.8.2 ConversionConversion z2.8.3 Communication and TransmissionCommunication and Transmission z2.8.4 CompressionCompression z2.8.5 Parity CheckParity Check Chapter 2 Data and Information
55
Processing Information- 2.8.1 Reorganisation zInformation reorganisation yInformation that is output in one format is suitable for one use. yFor instance, 1.Reorganise the students in a class of students so that girls appear before boys and the examination results appear in descending order 2.Using charts to represent information 2.8 Processing Info
56
Processing Information- 2.8.2 Conversion zInformation conversion yUsing a formula to generate new information yFor instance, 1.Calculate the average from daily and exam marks 2.Providing order of merits 2.8 Processing Info
57
Processing Information- 2.8.3 Communication and Transmission zCommunication yexchange of information between people yCommunication tools: xE-mail, videoconferencing and presentation software zTransmission ypassing of information between computers through a medium yThe medium could be xcopper wire, optical fibre or radio waves. 2.8 Processing Info
58
Processing Information- 2.8.4 Compression zCompression yReduce the file size yReduce the transmission time yDecompressed by the receiver yAn example of compressed file is ZIP file 2.8 Processing Info
59
Processing Information- 2.8.5 Parity Check zParity check yEnsure that data transmission is error free zEven parity check yThe sender adds an extra bit (binary digit) to each byte of data to make the number of 1's in each byte even. yIf there is an error in transmission causing a bit to change from 0 to 1, the receiver will find that the number of 1's is not even. ywill request the sender to re-transmit the data 2.8 Processing Info
60
2.9 Modes of Processing z2.9.1 Batch processingBatch processing z2.9.2 Real-time processingReal-time processing z2.9.3 ComparisonComparison Chapter 2 Data and Information
61
Modes of Processing - 2.9.1 Batch processing zBatch processing yData is collected into groups and processed together yInformation is not the most up-to-date ySimple to set up and operate yExamples xpayroll xinventory xmark processing etc. 2.9 Modes of processing
62
Modes of Processing - 2.9.2 Real-time processing zReal-time processing yData is entered into the computer and processed as soon as it is collected. yInformation is up-to-date ySystem is more complicated yExamples xIn an electric power station, the amount of electrical power to be generated must meet the demand all the times. xIn banking, transactions, like cash withdrawal, cash deposit or money transfer, will update the appropriate accounts immediately. 2.9 Modes of processing
63
Modes of Processing - 2.9.3 Comparison 2.9 Modes of processing
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.