CS Entire Notes Document
CS Entire Notes Document
Machine code
Binary representation of instructions in a format that the CPU can decode and execute
Have an operation code instruction and address, or data to use
Advantages Disadvantages
No need for translation software at run-time Hard to write in Assembly with limited and hard to
understand commands
Speed of execution of code produced is quick Code needs to be reassembled when the code is
changed
Code is usually optimized Designed for a specific type of processor
Original Assembly code is kept a secret
Complier
Translates source code (code that the programmer has written) from high-level languages into object
code and then into machine code ready to be processed by the CPU
The whole program is translated into machine code before it is run
Advantages Disadvantages
No need for translation software at run-time Source code is easier to write in a high-level
language, but the program will not run with syntax
errors which can make it more difficult to write the
code
Speed of execution is faster Code needs to be recompiled when the code is
changed
Code is usually optimized Designed for a specific type of processor
Original source code is kept a secret
Interpreter
Translates source code from high level languages into machine code ready to be processed by the CPU
The program is translated line by line as the program is running
Advantages Disadvantages
Easy to write source code because the program will Translation software is needed at run-time
always run, stopping when it finds a syntax error
Code does not need to be recompiled when code is Speed of execution is slower
changed, and is easy to try out commands when the
program has paused after finding an error
This makes interpreted languages very easy for Code is not optimized
beginner programmers to learn to write code
Source code is needed
Systems Architecture
CPU Function
CPU interprets, processes and executes instructions usually from the hardware and software
Hardware is any physical component that is part of the computer system
Software is the programs executed by the hardware
Fetch-Decode-Execute Cycle
Whenever a program is opened, data and instructions are first copied from the hard disk to the RAM
o RAM is the fastest read/write speeds compared to secondary storage
Fetch – CPU brings data and instructions from the main memory and stores in own temporary memory
called registers
o Adress bus – CPU will send the address of the next piece of data that it needs, along the
address bus
o Data bus - Data/instructions from this address then travels from the RAM, to the CPU, on the
‘data bus’.
Decode – The CPU breaks down the instructions and makes sense of the instruction fetched
o Looks up what the instruction means in its instruction and gets things ready for the next step
Execute – Data processing happens, instructions are carried out on the data
o May include reading/writing from/to main memory
o Once a cycle has been completed, another begins
Secondary Storage
Primary Storage refers to memory areas that the CPU can access directly. It has the fastest read/write
speeds and is mostly volatile.
Optical Disk
1. There is a disk that rotates at a high speed
2. A laser head moves across the disk
3. There are tiny pits which reflect light differently to the flats
4. Reflected light is interpreted into 1s and 0s representing the data stored on the disk
5. The data is stored on a single spiral track
Advantages
For small capacity situations
Low manufacturing costs
Suitable for read only data distribution
Disadvantages
Prone to theft since it is small
Costs more per GB than any other form of storage
No protection plastic casing
Disadvantages
Easily damaged
Will slow down
Eventually break over time
Cyber Security
Define the term Cyber Security:
Cyber security is the processes, practices and technologies designed to protect networks, computers,
programs and data from attack, damage and unauthorized access.
Types of Malware
Computer Virus: replicate themselves and can transfer from one computer to another. They are activated
by a user often as email attachments and attachment to other files and programs.
Trojan: gains access to a computer by pretending to be legitimate software. The trojan allows unauthorised
backdoor access to a computer without the user being aware.
Spyware: records the activity on your computer such as your keystrokes, thereby logging your passwords
for instance and then send the data back over the network to a hacker. Spyware can also be used to control
your webcam and microphones.
Networks
Network – Two or more devices connected together in order to communicate.
Advantages of Networks
Users can share files between one another
Centralise the back up from the server
Easier to collaborate
User can share peripherals: printers and connections to other networks
Users can share and access their files from any computer on the network
Automatic updates can occur
Disadvantages of Networks
Increased security risks of data
Malware and viruses spread very easily between computers
There is dependency on the network because if a server fails, the computers connected to it may not
work
o Client server network and the server goes down
The computer may run more slowly, if there is a lot of data travelling on the network
Types of Networks
PAN (Personal Area Network)
Any computer network, which is used for data transmission amongst very localised devices
Covers a very short range, will often be formed when connecting two personal devices together
E.g. Bluetooth Connecting phone to wireless headphones
Network Topologies
Bus Network
Bus topologies use a single ‘backbone’ cable
called a bus to connect all devices
Two terminators are placed at the ends of the
bus to stop data reflecting back along the bus.
Without the terminators, reflected signals
would cause interference and potentially make
the network unusable
Advantages
The network is unaffected if a device fails
An easy and cheap technology to set up, requires much less cabling than a star topology
Not dependent on a central server / switch
Disadvantages:
Data collisions are common on a bus network and this requires the whole network to be reset which
slows the network down
Unsuitable for large networks because the more devices there are, the more likely data collisions are
Lower security than star topology as every computer can see all data being transmitted
If the main bus cable fails then the whole network goes down
Star Network
In a star topology, all the devices are connected to a central switch or central switch that controls the
network
The central switch allows many devices to access the server simultaneously
Advantages:
Even when traffic load is heavy on the network the performance remains consistent
If one cable fails it will not have an effect on any of the other computers connected
Decent level of security as transmitted data is only received by the computer for which it is intended
Easier to add more nodes/devices
Disadvantages:
If the central server / switch fails the entire network goes down
Can be costly topology to implement due to all the extra hardware
Maximum number of possible connections on the network is determined by the switch – if you need
more, you might need to a new one
Network Protocols
Network Protocol – Rules that dictate how devices communicate
HTTP Provides a way for users to interact with web resources. Transmits messages between client and
server using hypertext.
HTTPS As HTTP but in addition uses an encryption protocol to ensure communications are secure.
SMTP Enables users to send (and receive) email messages. Initiates sessions between user and mail server.
Server then forwards messages. Uses a process called ‘store and forward’ to store messages and forward as
necessary. The server decides which server to send the message to and the inbox provider then downloads
the message and places it in the recipient’s inbox. Often used in conjunction with IMAP.
IMAP Stores email messages on an ISPs server but allows user to manipulate messages as though on a local
device. Local devices access the ISP server to access the messages. IMAP works with desktop clients and
webmail clients. Allows simultaneous logins from different devices to one account
FTP Allows secure transfer of files between client and server. Files are uploaded to and downloaded from
the server using FTP.
TCP Connects network devices to the Internet. It defines how applications can create channels of
communication across a network. It manages how a message is assembled into smaller packets before
transmission and reassembles packets in the correct order at destination.
UDP Communications protocol that establishes low latency and loss tolerating connections between
applications. Enables the transfer of data before an agreement is provided by the receiving party. This
speeds up transfers. Can start transferring data before agreement is received from receiving party.
IP Relays data across network boundaries. It defines how to address and route each packet to make sure it
reaches the right destination.
Provides transport of data between devices by splitting files into data packets
and checking that they have been sent and received correctly.
Internet Layer Internet layer adds (IP) addresses to the packets.
Internet layer routes the packets across the network
Provides the routing of data across the network by making use of addressing.
Link Layer Link layer is where network hardware operates (eg network interface card).
Link layer is where operating device drivers operate.
Provides the physical transport of data through electrical signals etc.
Authentication
Authentication takes one or more pieces of data specific to the user and compares them to stored
credentials and only allows access to the system if the credentials are valid
Example: Username and Password
Security can be enhanced by asking the user to update their passwords regularly, have complex
passwords and limit login attempts
Firewall
A firewall is a piece of software that controls what information goes in and out of a network.
It identifies potential threats using a set of security rules and block any unwanted data. They can be
software or hardware.
They also keep ports closed and open only those that they expect data to receive
Prevents unauthorised access into the network
It makes sure only the right traffic is allowed
Monitors network traffic
Encryption
Encryption is when data is translated into a code which only someone with the correct key can access,
meaning unauthorised users cannot read it.
Essential for sending data over securely
To encrypt data, an encryption key is used which will convert ‘plain text’ into ‘cipher text’.
An encryption key is an algorithm which will systematically alter each piece of data in a file.