0% found this document useful (0 votes)
40 views12 pages

CS As General Notes 4 Paper 1

Uploaded by

Yuk00
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views12 pages

CS As General Notes 4 Paper 1

Uploaded by

Yuk00
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

CS / AS: general notes 4 paper 1

https://theenglishschool-my.sharepoint.com/:w:/g/personal/s161006_englishschool_ac_cy/EcaJDsHsFmxMve-
hkbPYEFcBLKQEc4TD_DH26fcmu_Bm3Q?e=3K5Ks2

Compression in sound:

-Reducing amplitude to the human hearing range, this means there is a limited amplitude therefore fewer bits
per second and thus less file size

-Run Length Encoding (RLE), consecutive sounds are the same, so they are recorded in binary value and the
number of time it repeats. This way, RLE allows the changes in the binary values to be recorded instead of the
actual sound which takes up less storage space.

Sample size:
-Higher sample rate will mean smaller time gaps between samples, and this will make the digital sound wave
more accurate.
-Therefore more bits are stored as more samples are taken, which increases file size.

Networks:

LAN:
-Small geographical area

-Usually within one building

WAN:

-Wide geographical area

-Usually over many buildings and even over countries

-Requires the leasing of external infrastructure such as phone lines

Wireless Network Interface Card:

-Provides interface to the wireless network

-Receives analogue radio waves, converts them to digital

-Encrypts outgoing data

-Decrypts incoming data

CS / AS: general notes 4 paper 1 1


Fetch Execute cycle: Register Transfer Notation:

1 MAR←[PC]

2 PC←[PC] + 1
3 MDR ← [[MAR]]

4 CIR ← [MDR]

single [ means address

double [[ means contents and address

-Address from the Program Counter is sent to the Memory Address Register

-The Program Counter now is incremented by one so it points to the next program to be executed

-Contents of Memory Address Register is copied onto the Memory Data Register

-Address from the Memory Data Register is copied to the Current Instruction Register

Keys:

Primary key:

-Unique identifier of a value, is unique for each value

Foreign key:

-It is the primary key which is taken from another table

Access rights:
-Uses accounts/logins/passwords

→These are applied to different people


→The different accounts may have different rights such as read-only or write or no access at all

ROM technologies:

PROM can be set only once, since writing is done by blowing fuses

EPROM can be erased using UV light

EEPROM can be erased using voltage (it is flash storage)

EPROM must be entirely erased before rewriting, (unlike EEPROM)

EPROM has to be removed from the device for it to be erased (unlike EEPROM)

Hard disk (principal operations)(prob not too important):

The hard disk has (one or more) platter/plate/disk

Each surface of the platter/disk is (ferrous oxide which is) capable of


being magnetised

The platters/disks are mounted on a (central) spindle

The entire mechanism is contained inside a sealed (aluminium) box.

The disks are rotated (at high-speed)

CS / AS: general notes 4 paper 1 2


(Each surface of the disk) has a read/write head mounted on an arm
(positioned just above the surface)

Electronic circuits control the movement of the arm (and hence the
heads)

The surface of the platter/disk is divided into concentric tracks / circles

The surface of the platter/disk is divided into sectors

One track in one sector is the basic unit of storage called a block

The data is encoded as a magnetic pattern for each block

When writing to disk, a variation in the current in the head produces a


variation in magnetic field on the disk

When reading from disk, a variation in magnetic field produces a variation in current through the head

Difference of security and privacy:

Security prevents against loss(wtf does this mean)

privacy prevents unauthorised access

Normal Form Levels(identification): (reminder to fill in better tmro)

1NF: No repeating groups or repeating attributes

2NF: All attributes must be fully dependant on the (composite) primary key // No partial dependencies

3NF: All attributes must be fully dependent on the primary key and no other attributes // no non-key
dependencies // no transitive dependencies

(self reminder to add more to these tmro)


Data Validation:

Range check: checks whether data lies within a specified range

Presence check: checks whether data has been entered

Existence check: checks whether data matches an entry in a list of data table of valid options

Limit check: Range check but only checks upper or lower bound of data

Type check: checks whether the correct data type is entered

Data Verification:

Double entry: entering data twice, which then lets the computer compare the two to see if they match

Visual check: Manually compare and correct whether the data entered is the same as the data that needs
to be sent

IDE Features:

Context-sensitive prompt: Displays predictions of the code being entered

Dynamic syntax check: Underlines or highlights statements that do not meet the rules of the language

Breakpoint: Stops the code executing at a set line

CS / AS: general notes 4 paper 1 3


Single stepping: Executes one line of the program and then stops

Report window: Outputs the contents of variables and data structures

Prettyprinting: Automatically colouring keywords (eg, functions,statements) for an easier reading


experience

BCD(Binary Coded Decimal):

-4 bit code to represent denary digits (goes up to 9 only)

-Usually used in representation of digits on a digital clock display such as that on a calculator screen

Embedded Systems:

-Embedded systems involve installing microprocessors into devices to allow for operations with said device
to be controlled in a more efficient way by using a web activated device for example

-Mark schemes usually just ask for you to say that it does one specific thing.

-And that it controls one aspect only about the machine

SUKILI !!!!!:

SQL QUERY COMMANDS:

SELECT {field_name1},{field_name2} FROM {table_name};

# Query to select certain fields from a table

WHERE {field_name} {operator} {condition};

# Part of a query that only selects data that fits a certain condition. Logical operators can also be used.

SELECT {field_from_table1},{field_from_table2} FROM {table1}


INNER JOIN {table2} ON {table1}.{t1foreignkey} = {table1}.{t2primarykey};

# Inner join combines rows from 2 tables so they can be selected in 1 query
# Above, all data that contains data from the specified fields in table 1 and 2 will be selected
# Line 2 joins the tables together using a common field that they both have
# t1foreignkey is the same field as t2primarykey

WHERE {field_name} LIKE {pattern}


#indicates a pattern eg. all cells that contain abc#
#use % or * for notation that after said point there could be more characters eg LIKE a% will select a and abc
ORDER BY {field_name};

# Orders selected data by ascending order of said field


# Can be ordered by descending order by adding desc or descending after the field name

GROUP BY {field_name};

# Arranges data into groups that are inside the certain field given

SQL MAINTENANCE COMMANDS:

DELETE FROM {table_name};

# can delete the table,fields or specific entities depending how its written

INSERT INTO {table_name}({field_name}) VALUES({big_data});

# inserts variable {big_data} into the field {field_name} of table {table_name}


# commas can be used to insert more data in the same line

UPDATE {table_name} SET {field_name} = {new_data} WHERE {primary_key} = {big_data}

CS / AS: general notes 4 paper 1 4


# updates data in a table for a specific entity. Can be also used to update a whole field or table by removing code.

AGGREGATE FUNCTIONS:

SELECT FUNC({field_name}) FROM {table_name} # syntax

MIN # finds minimum value in the field


MAX # finds maximum value in the field
AVG # finds average value in the field
SUM # finds sum of the values in the field
COUNT # Counts number of elements in a field (null fields are ignored)

SQL COMMANDS:

CREATE DATABASE {database_name};

# creates a database

CREATE TABLE {table_name}({table_field1} {data_type},{table_field2} {data_type},...);

# Creates a table with fields

ALTER TABLE {table_name};

# alter characteristics of a table

ALTER TABLE {table_name} ADD {table_field1} {data_type},{table_field2} {data_type},...;


# adds fields to a table
ALTER TABLE {table_name} ADD PRIMARY KEY ({primary_key_field});
# this assigns the field {primary_key_field} as the primary key of the table

ALTER TABLE {table1_name} ADD FOREIGN KEY ({field}) REFERENCES {table2_name}({field});


# assigns field {field} as a foreign key in table {table1_name}. This field is the primary key of table {table2_name}

SQL DATATYPES:

CHARACTER # fixed length text

VARCHAR # variable length text

BOOLEAN # boolean

INTEGER # integer

REAL # real numbers

DATE # date formatted as YYYY-MM-DD

TIME # time formatted as HH:MM:SS

Binary shifts:

Directions:

Left shift: bits shifted to the left (no shit)((no way))

Right shift: bits shifted to the right (no shit)((no way))

(all examples below will use the process of 2 right shifts for convenience)

Logical shift: bits shifted out of the register are replaced with zeros.

11100101 → 01110010 → 00111001

CS / AS: general notes 4 paper 1 5


Cyclic shift: all numbers shifted out of register will be put on the other side. Used for multiplication or
division for powers of 2

11100101 → 11110010 → 01111001

Arithmetic shift: doubles if left, halves if right. Never shift 1st bit, shift bits like logical but if its a right shift,
replace new bits with MSB

im lazy

Run Length Encoding(cont.):

eg. yuko is gaaaaaaaaaaay → yuko is g(11a)y

Embedded System:

An embedded system is a microcontroller or microprocessor based system which is designed to perform a
specific task. They are built into the device/system hence the name

Virus : your computer has virus

Malicious software that replicates itself and can corrupt data

prevention methods: Anti-virus / Firewall /Anti-malware

Hacker:

Unauthorised access to the computer with malicious intent

prevention methods: Firewall / strong or biometric passwords / user permissions

E-R Diagram Cardinality:

CS / AS: general notes 4 paper 1 6


Reason for why something is a composite key:

Neither key uniquely identifies each tuple by itself

One x cannot appear in the same y twice so together they are


unique

Logical schema:

a data model for a specific database that is independent of the DBMS used to build the database. (Put this
when u need to write some theory about E-R diagrams)

Operation of a compiler:

Attempts to translate the whole source code

Creates a separate error report at the end of the translation process

If translation successful / no errors creates an executable file

Operation of an Interpreter:

Reads each line then translates it and executes it

Stops when an error is encountered // displays errors where it finds


them

CS / AS: general notes 4 paper 1 7


Features a programmer can use while reading and writing in an IDE:

writing

Enter code into an editor

Pretty printing to identify key terms

Context-sensitive prompts to help complete statements

Expand and collapse code blocks

Auto-complete to suggest what to type next

Auto-formatting to indent code blocks

Dynamic syntax checking

reading

Single stepping to run the code line by line

Breakpoints to stop the code at set points to check values

Report window to see how variables change

Wireless Network Interface Card(WNIC):

Hardware component that allows a device to connect to a wireless network // Provides a MAC address to
the device to identify it on the wireless network

Wireless access point(WAP):

Hardware component that provides radio communication from the central device to nodes on the network
(and vice versa)

Router:

Receives and sends data between two networks operating on the same protocol

Repeater:

Restores the digital signal so it can be transmitted over greater distances

Differences of Fibre optic and copper cables:

Fibre optic data is transmitted using light, copper cable through


electrical signals

Fibre optic has higher bandwidth than copper cable // Fibre optic has
higher transmission rates than copper cable

Fibre optic has smaller risk of (noise) interference than copper cable

Fibre optic can be used over longer distances than copper cable before
repeaters are needed

Fibre optic is much more difficult to hack into than copper cable

CS / AS: general notes 4 paper 1 8


Fibre optic is more prone to damage than copper cable

CSMA/CD:

A workstation / node (wishing to transmit) listens to the communication


channel

…data is only sent when the channel is free // ... if channel is free data
is sent

Because there is more than one computer connected to the same


transmission medium

... two workstations can start to transmit at the same time, causing a
collision

If a collision happens, the workstations send a (jamming) signal / abort


transmission

…and each waits a random amount of time before attempting to resend

Character set:

All of the characters/symbols that the computer can use/represent

Each character has a unique number/binary number/hexadecimal


number

Character sets in syllabus:

ASCII

Extended ASCII

UNICODE

No of bits:

ASCII has 7 bits

UNICODE has 16 bits

Extended ASCII has 8 bits

Why lossy compression should not be used on text file:

None of the original data can be lost / deleted

The (text) file would be corrupted // the (text) file cannot be opened

Fetch execute notation:

[balls] = the content/data stored in balls

[[balls]] = the data stored in the address that is stored in balls

How interrupts are handled in F-E cycle:

Check for interrupt at start/end of an F-E cycle

CS / AS: general notes 4 paper 1 9


Priority is checked

If lower priority than current process continue with F-E cycle

If higher priority than current process …

… state of current process is / registers are stored on stack

Location/type of interrupt identified

Appropriate Interrupt service routine is called to handle the interrupt

When ISR finished, check for further interrupts (of higher priority) /
return to step 1

Otherwise load data from stack and continue with next F-E cycle (of
process)

FE register shit:

-Program Counter: to store the address / location / memory location of the next instruction to be fetched

-Index Register: to store a value that is added to an address to give another address

-Status Register: to store flags which are set by events // from the results of arithmetic and logic operations and
interrupt flags

Assembly instruction types:

Input and output of data


- Takes an input from the user // outputs the character of the binary
number

Arithmetic operations
- Perform addition and subtraction

Unconditional and conditional instructions


- Move to another instruction (identified by a label)

Compare instructions
- Compare the result to another value

Data movement instructions

- Moves big data in registers

Management tasks of OS:

Memory management

Controls the movement of data between RAM, processor, VM etc

allocates memory to processes

CS / AS: general notes 4 paper 1 10


File management

Creates files/folders

Renames file/folders

Security management

Creates accounts/passwords

Provide /upgrade firewall / anti-malware

Hardware management

Receives data from input devices ///sends data to output device

Use of device drivers

Process management

Decides which process to run next

supports multitasking

Utility software: *come back and fill in

Back-up software:

To make a copy of data at regular intervals

So that if it is lost/corrupted it can be retrieved

Defragmentation software:

Make individual files occupy contiguous blocks // move free space


together

Improve disk access times // Data/files can be loaded faster

Compression software

(Hard) disk formatter

Virus checker

Disk analysis software

Disk repair software

Why data needs to be kept secure:

To stop the data being lost / corrupted / amended

To make sure it can be recovered

CS / AS: general notes 4 paper 1 11


To prevent unauthorised access

Ways to keep data stored in PC secure:

Install / run a firewall

Up to date Anti-virus / anti-malware

(Username and) (strong) password

Encryption

Access rights

why data might not be correct after validation/verification:

Validation checks data is reasonable/within bounds it does not check


that accurate data has been entered

Verification checks if the data matches the data given it does not check
if the original data is accurate

Cloud server:

Accessing a service/files/software on a remote server

Public:
- Computing services offered by 3rd party provider over the public
Internet

- Public is open/available to anyone with the appropriate


equipment/software/credentials

Private
- Computing services offered either over the Internet or a private internal
network

- Only available to select users not the general public

- Private is a dedicated/bespoke system only accessible for/from the


organisation

A tuple is an entity, ig

CS / AS: general notes 4 paper 1 12

You might also like