热门文档
- 2023-07-19 08:34:05 Edexcel-IAL-Maths-2018Spec-Issue3
- 2023-07-24 08:16:18 CAIE AS 高数FP1笔记9231-2023-2025考试用-fp1 revision notes
- 2023-08-05 15:38:09 CAIE IGCSE OLevel经济课本答案-剑桥出版社2018年出版-2020及往后考试专用
- 2024-09-07 10:16:18 Mathematics Core and Extended Coursebook with Digital Version
- 2023-08-29 10:49:34 牛津AQA A Level化学课本-Oxford International AQA Examinations International A Level Chemistry
- 2023-09-07 19:57:35 牛津AQA IGCSE物理课本 Oxford AQA IGCSE Physics
- 2023-08-24 23:49:31 爱德思IAL经济课本2-培生出版社-2019版-Pearson Edexcel International A Level Economics Student Book 2 (2019)
- 2023-09-18 09:54:17 化学课本-Oxford International AQA Examinations-International GCSE Chemistry
- 2023-07-19 11:41:58 CAIE A Level化学课本9701-Hodder Education (2020)
- 2024-10-03 20:09:55 STEP MAT TMUA_ Skills for success in University Admissions Tests for Mathematics
- 2024-07-23 20:11:05 CAIE enquiries-about-results-guide-international-a-guide-for-exams-officers
- 2024-11-07 14:19:57 International AS & A Level Biology (9700)-2025-2027-syllabus

如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。
ZNOTES.ORGUPDATED TO 2022 SYLLABUSCAIE A2 LEVELCOMPUTERSCIENCE(9618)SUMMARIZED NOTES ON THE THEORY SYLLABUSCAIE A2 LEVEL COMPUTER SCIENCE (9618)requirement is for an identifier to be named with a1.Data representationdefined type.They have to be explicitly definedbefore an identifier can be created-unlike built-indata types which include string,integer,real...1.1.User-defined data types==Enumerated Data type:==a list of possibledata values.The values defined here have anWhen object-oriented programming is not being used,aimplied order of values to allow comparisonsprogrammer may choose not to use any user-definedto be made.Therefore value2 is greater thandata types.However,for a large program,their use willvalue1(they're not string values and can't bemake a program less error-prone and morequoted).This allows for comparisons to beunderstandable.It also has less restriction and allows formade.It is also countable thus finite values.inevitable user definition.The use of built in data typesTYPEare the same for any program.However,there can't be a=(,,:Composite user-defined data types have a definition witha reference to at least one other type..==Pointer Data type:==used to reframe a.==Record Data type:==a data type that contains amemory location.it may be used to constructfixed number of components that can be of differentdynamically varying data structures.Thetypes.it allows the programmer to collect togetherpointer definition has to relate to the type ofvalues with different data types when these form athe variable that is being pointed to(doesn'tcoherent whole.it could be used for thehold a value but a reference/address to data).implementation of a data structure where one ormore of the variables defined are pointer variables.TYPE=^TYPEENDTYPEDECLARE :DECLARE ENDTYPE-.-Special use of a pointer variable is to accessthe value stored at the address pointed to.The==Set Data type:==allows a program to create setspointer variable is said to be dereferenced.and to apply the mathematical operations defined inset theory.Operations like:1.2.File organization and accessContents,in a file of any type,is stored using a defined binary·Differencecode that allows the file to be used in the way intended.But,for storing data to be used by a computer program,there areIntersectiononly 2 defined file types,a text file or a binary file.Atext file contains data stored according to a definedInclude an element in the setcharacter code defined by ASCll or Unicode.A text file canbe created using a text editor.Exclude an element from the setA binary file is a file designed for storing data to be usedby a computer program(O's and 1's).It stores data in itsCheck whether an element is in a setinternal representation(an integer value might be stored.==Objects and Classes:==in object-orientedin 2 bytes in 2's complement representation to representprogramming,a program defines the classes to bea negative number)and this file is created using a specificused-they're all user-defined data types.Then forprogram.Its organization is based on records (a collectioneach class,the objects must be defined.of fields containing data values).fle→records→fields→2.Non-Composite data types:valuesNon-composite user-defined data types don'tinvolve a reference to another type.When aMethods of file organizationprogrammer uses a simple built-in type the onlyWWW.ZNOTES.ORGCAIE A2 LEVEL COMPUTER SCIENCE (9618)==Serial files:==contains records that have no defineddifferent key,the next position in the file is used.thisorder.A text file may be a serial file where the file hasis why a search will involve direct access possiblyrepeating lines which are defined by an end of linefollowed by a limited serial search.That's why it'scharacter(s).There's no end of record character.Arecordconsidered partly sequential and partly serial.in a serial file must have a defined format to allow data toFile access:be input and output correctly.To access a specific record,The value in the key field is submitted to the hashingit has to go through every record until found.algorithm which then provides the same value for theFile access:Successively read record by record until theposition in the file that was provided when the algorithmdata required is found thus very slow.Uses.was used at the time of data input.It goes to that hashed·Batch processingposition and through another short linear search becauseBacking up data on magnetic tapeof collisions in the hashed positions.Fastest access.Banks record transactions involving customerTo edit/delete data:accounts every time there is a transactionOnly create a new file if the current file is full.A deleted==Sequential files:==has records that are ordered and isrecord can have a flag set so that in a subsequent readingsuited for long term storage of data and thus isprocess the record is skipped over.This allows it to beconsidered an alternative to a database.A key field isoverwritten.required for a sequential file to be ordered for which theUses:values are unique and sequential.This way it can beMost suited for when a program needs a file in whicheasily accessed.A sequential database file is moreindividual data items might be read,updated or deleted.efficient than a text file due to data integrity,privacy andless data redundancy.A change in one file would updateFactors that determine the fileany other files affected.Primary keys from theDBMS(database management system)need to be uniqueorganization to use:but not ordered unlike the key field from the sequentialfiles which need to be ordered and unique.A particularHow often do transactions take place,how often doesrecord is found by sequentially reading the value of theone need to add data?key field until the required value is foundHow often does it need to be accessed,edited,orFile access:deleted?Successively read the value In the key field until therequired key is found.1.3.Real numbers and normalizedTo edit/delete data:Create a new version of the file.Data is copied from thefloating-point representationold file to the new file until the record is reached whichneeds editing or deleting.For deleting,reading andReal number:A number that contains a fractional part.copying of the old file continue from the next record.If aFloating-point representation:The approximaterecord has been edited,the new version is written to therepresentation of a real number using binary digits.new file and the remaining records are copied to the newFormat:Number=tMantissa x BaseExponentfile.Mantissa:The non-zero part of the number.==Direct access/random access files:==access isn'tExponent:The power to which the base is raised to indefined by a sequential reading of the file(random).It'sorder to accurately represent the numberwell suited for larger files as it takes longer to accessBase:The number of values the number systems allows asequentially.Data in direct access files are stored in andigit to take.2 in the case of floating-pointidentifiable record which could be found by involvingrepresentation.initial direct access to a nearby record followed by alimited serial search.The choice of the position chosenThe floating point representation stores a value for themantissa and a value for the exponent.must be calculated using data in the record so the sameA defined number of bits are used for what is called thecalculation can be carried out when subsequently there'sa search for the data.One method is the hashingsignificant/mantissa,+-M.Remaining bits are for thealgorithm which takes the key field as an input andexponent,E.The radix,R is not stored in the representationoutputs a value for the position of the record relative toas it has an implied value of 2(representing 0 and 1's).If areal number was stored using 8 bits:four bits for thethe start of the file.To access,the key is hashed to amantissa and four bits for the exponent with each using twospecific location.This algorithm also takes into accountthe potential maximum length of the file which is thecomplement representation.The exponent is stored as anumber of records the file will store.signed integer.The mantissa has to be stored as a fixed point.eg:If the key field is numeric,divide by a suitable largereal value.The binary point can be in the beginning after thefirst bit(immediately after the sign bit)or before the last bit.number and use the remainder to find a position.ButThe former produces smaller spacing between the valueswe won't have unigue positions.If a hash position iscalculated that duplicates one already calculated by aWWW.ZNOTES.ORG