Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Samenvatting

Summary A level CS 9618 CIE COMPLETE REVISION Paper 3 + 4(88 pages)

Beoordeling
-
Verkocht
-
Pagina's
88
Geüpload op
23-04-2024
Geschreven in
2022/2023

Self contained notes, ignore the badly written textbook, memorise everything in this notes, you will get A* definitely Updated syllabus including Artifical Intelligence (9618) for paper 3 and paper 4, AS (paper 1 + 2) is also available in my account

Meer zien Lees minder
Instelling
Vak

Voorbeeld van de inhoud

A2 CS Notes Paper 3 + 4 R.Fok L.Lai E.Min


A2 CS Notes Paper 3 + 4
PRODUCED BY OIC COMPUTER SCIENCE CLASS OF 2023


13 Data Representation 2
13.1 User-defined data types 2
13.2 File organization and access 4
13.3 Floating-point numbers, representation, and manipulation 5

14 Communication and internet technologies 8
14.1 Protocols 8

Definitions: 11
14.2 Circuit switching, packet switching 12

15 Hardware and Virtual Machines 16
15.1 Processors, Parallel Processing and Virtual Machines 16
15.2 Boolean Algebra and Logic Circuits 21

16 System Software 25
16.1 Purposes of an Operating System (OS) 25
16.2 Translation Software 31

17 Security 36
18 Artificial Intelligence (AI) 42
18.1 Artificial Intelligence (AI) 42

19 Computational thinking and problem solving 45
19.2 Recursion Error! Bookmark not defined.

20 Further programming 63
Appendix: Python 80




1

,A2 CS Notes Paper 3 + 4 R.Fok L.Lai E.Min


13 Data Representation
13.1 User-defined data types

Show understanding of why user-defined types are necessary

**User defined data types – a data type based on existing data type or other data
types that have been defined by a programmer in a program

User-defined data types are useful for programmers where the nature of the
problem has data which is more complex than those represented by the simple data
types, integer, string, etc.

It can be divided into 1. Non-composite data type 2. Composite data type

Define and use non-composite types, including enumerated, pointer

**Non-composite data type: defined without referencing another data type

Enumerated type
• An enumeration is an ordered listing of all the items in a collection

TYPE
DECLARE DaysOfTheWeek = (Sunday, Monday, Tuesday,
Wednesday, Thursday, Friday, Saturday)
ENDTYPE

Example: (from 9618/31 May / June 2021 Q1(d)(i))

TYPE SchoolDay = (Monday, Tuesday, Wednesday, Thursday,
Friday)

You can then declare a variable of this type

DECLARE Thisday : DaysOfTheWeek

You can use the variable just like any other

ThisDay ⟵ Thursday
ThisDay ⟵ ThisDay + 1 #now change to Friday


Pointers
• An array is declared to reserve memory for the storage of the data
• Pointers are designed to overcome the need to reserve memory in advance
• Dynamic memory allocation
o Memory will be allocated as and when required
• Pointers are used to access data which is dynamically created at run-time


2

,A2 CS Notes Paper 3 + 4 R.Fok L.Lai E.Min


• A pointer is variable which stores the address of a variable




You can declare a pointer as follows:

DECLARE OrderPointer : ^Order
#^Order is a pointer data type, pointing to data of type
OrderPointer


Define and use composite data types, including set, record, and class/object

**Composite data type: a data type that refers to any other data types in its
type definition

Sets
• Can be used to check the validity of a user’s input
• Replaces standard IF statement for many conditions
• So instead of IF Choice=1 OR Choice=2 OR Choice=3 OR Choice=4
THEN…
• We can say DECLARE MenuChoice : SET OF (1,2,3,4,5)
o IF Choice IN MenuChoice
Records

TYPE Transaction
Bank_ID : STRING
AccountNumber : INTEGER
TransactionDate : DATE
TransactionTime : INTEGER
TransactionType : CHAR
Amount : REAL
ATM_ID : INTEGER
ENDTYPE

DECLARE Food: Transaction
Food.Amount ⟵ 200

A combination of different data types and group them under 1 identifier

Classes

• Blueprints from which actual objects (called instances) will be created

Objects

• Instances that are created from Classes



3

, A2 CS Notes Paper 3 + 4 R.Fok L.Lai E.Min




**Choose and design an appropriate user-defined data type for a given problem
Usually in the form of a record

13.2 File organization and access

Show understanding of the methods of file organization and select an appropriate
method of file organization and file access for a given problem
Including serial, sequential (using a key field), random (using a record key)

Serial file organization
• Records are written to the file in chronological order, new records are
appended to the end of the file
• Useful for bank transaction logs / telephone logs
• Only appear in the order in which they were created in the file

Bank Transaction 1 Customer 1 Date 1
Bank Transaction 2 Customer 2 Date 2
Bank Transaction 3 Customer 3 Date 3

Sequential file organization (key field)
• Stored in an order based on the key field of the records as it is the unique
identifier
• Example could be gas bill, as customer number probably is the key field
which uniquely defines each record
• Note: record must be added in correct space

Random file organization (record key)
• Stores records of data in a file in any available position
• Allows direct access to a particular record in the file
• For records to be written and read to / from the file in the same file session
• File opened in RANDOM mode
• The user will allocate each record a record key number
• Takes a record key number à hashing function à calculated address




Comparing the different file organization methods
Method Write Read
Serial ✅✅ ❌❌❌
Sequential ❌❌❌ (New records ✅✅
need to be added to
correct place)


4

Geschreven voor

Study Level
Publisher
Subject
Course

Documentinformatie

Geüpload op
23 april 2024
Aantal pagina's
88
Geschreven in
2022/2023
Type
SAMENVATTING

Onderwerpen

$16.27
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF


Ook beschikbaar in voordeelbundel

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
ryanfok Oxford
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
10
Lid sinds
3 jaar
Aantal volgers
7
Documenten
3
Laatst verkocht
1 jaar geleden

Paper 3 + 4 notes coming out in 2 weeks!

5.0

1 beoordelingen

5
1
4
0
3
0
2
0
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen