100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Summary A level CS 9618 CIE COMPLETE REVISION Paper 3 + 4(88 pages) $14.73
Add to cart

Summary

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

 53 views  0 purchase
  • Course
  • Institution

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

Preview 4 out of 88  pages

  • April 23, 2024
  • 88
  • 2022/2023
  • Summary
avatar-seller
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

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller ryanfok. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $14.73. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

56326 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$14.73
  • (0)
Add to cart
Added