SL CS Notes

Download as pdf or txt
Download as pdf or txt
You are on page 1of 64

SL CS NOTES

Topic 1.1.1 : The context for which a new system is planned.

A new system is created to replace a system that is no longer sufficient. As in it is not


longer suitable for its original purpose it is inefficient it is redundant or it is out-dated.
The new system should reduce the flaws or errors of the one it is going to replace.

Planning a computer system entails thinking about various details and organizing the
activities required to achieve the desired goals. I.E, would a small book shop benefit
from a computerized system. If so how would it be done.

1.1.2 : Change management


Change management involves shifting individuals from their current state to a desired
state. Successful change management guarantees that all stakeholders accept and
embrace changes in their working environments. The goal is to maximize benefits while
minimizing negative impacts.

An example would be, a small business changing which operating system they use. The
employees need to get proper training before they can continue working.

Reasons why change is hard:


• Users don’t like change
• New systems might remove old features that users are comfortable with
• People find change complexities
• Old system might have been faster for specific use cases
• There might be data loss during the migration
• It might be expensive in terms of money
• There might be system incompatibility

1.1.3 Compatibility issues resulting from situations including legacy systems or


business mergers

Legacy system : is the old method, technology , computer system or application


program.
Sometimes when organizations interact, particularly on an international basis, there may
be issues of software compatibility and language differences. They need to use one
computing system which is called legacy system.

What are some reasons for using legacy system?


• Old data still not converted to new system.
• Discontinued software (There have been no new releases and the business needs
that functionality).
• Interact with old hardware (Getting a word document on an old pc using word
2007).

What are the disadvantages of maintaining legacy system?


• There is a high cost to maintaing any legacy system. It might even be costlier than
maintaining a more updated version. Staff training might be needed since staff
might not be familiar with the older version of the software.
• Tech support may no longer be available.
• The data In the system might not be compatible with newer systems and
conversion may not be possible.
• Legacy systems are more vulnerable to security threats due to lack of patches
• Integration of new systems will be complicated as the system might be so old that
the new system is using completely different technology.

Merger : a combination of two things, in our context, companies into one.

Mergers are hard because most companies will not use the same two systems, This
creates multiple issues when merging software. Some of them are listed below

Issues when merging:


Version difference – Same software different versions
Conversion – For example one software might use SI units while another doesn’t
Different environment – OneDrive vs Dropbox

1.1.4 Compare the implementation of systems using a client’s hardware with


hosting systems remotely

Local Computing : The client will provide their own hardware.

Advantages;
• Security
• Backups can be controlled
• Legacy software
• Software control
• Feature control

Disadvantages:
• Cost of hardware
• Technical support
• Lack of collaboration

Software-as-a-Service (SaaS) : The client does not run its own computer system to
handle operations, but lends servers from the software manufacturer that are
managed and maintained by the software manufacturer.

Advantages:
• No cost in employing personnel to maintain system
• Software manufacturer can provide help in cases of malfunction
• Maintenance and updating managed by software manufacturer → they have staff
that fully understand the system
• Client enjoys the professional know-how of the software manufacturer

Disadvantages:
• Data security issues resulting from trusting your information to someone else (loss
of control)
• Host may be in a different time zone, so maintenance can happen at
uncomfortable times
• Because host is not the user itself, user feedback is harder to get

1.1.5 Evaluate alternative installation processes.


1) Direct changeover - the old system is removed and immediately replaced by the
new system
Advantages – it is fast and cheap
Disadvantages - it is risky, because the old system cannot be recovered

2) Parallel running – the old and new systems are run together
Advantages – if the new system has some problems, the old system will still work
Disadvantages – it is expensive and there will be a shortage of memory

3) Phased changeover – the new system is implemented by stages (e.g. If we have


several branches in the company, the new system will be first applied on the first branch
and after its mistakes are corrected, it will be implemented in the second branch. This
process will repeat until all branches use the new system.).
Advantages – system is being improved
Disadvantages – It takes long time, and it is costly

4) Pilot running – the new system is tested on one branch of the company, and then it is
applied on the whole company.
Advantages – it is effective
Disadvantages – it is costly

1.1.6 Discuss problems that may arise as a part of data migration

Migrating data: The process of transferring data between different formats.

Problems:
• Incompatible file formats.
• Data structure differences.
• Conflicting Validation rules.
• Incomplete data transfers.
• International conventions on dates, currencies & character sets.

1.1.7 Suggest various types of testing

Testing is very important in developing a computerized system, as it tries to ensure that


the system works as expected. A system that does not work as expected (it is buggy)
greatly reduces productivity and end user satisfaction.

Ways of testing:

Alpha testing , done before the product is made available to the general public.
Normally carried out by the company that develops the software in a controlled
environment and not by end user tests.

Beta testing, includes comments and suggestion of the users. Unlike alpha testing users
outside the company are involved in testing. The feedback is valuable and can be used to
fix defects and errors that were missed.

Dry-run testing is conducted using pen and paper by the programmer, the programmer
will usually run through the algorithm and ensures it all works well.
Unit testing is when individual parts of the system are tested separately.

Integration testing is when the entire system is tested at the same time to verify that all
the components can and will work together correctly.

User acceptance testing is used to determine if the system satisfies the customer needs
and in most cases is conducted in user premises before the transfer of ownership.

Black box testing is a software testing method in which the tester analyzes the
functionality of an application without thorough knowledge of the internal design.
White box testing is when the tester knows the internal design of the application and
analyzes it during testing.

Debugging is the systemic process of finding and correcting the number of bugs or
errors in a computer program.

Data input verification and validation:

Validation is the process of evaluating whether the input follows appropriate


specifications and is within reasonable limits.

Verification is the process of ensuring that the data input is the same as the original
source data. One way of achieving this is double entry

1.1.9 Evaluate different methods of providing user documentation

There are two types of documentation:

Internal documentation details the source code itself, variable names, code structuring
etc.

User documentation is a separate document from the internal documentation, it gives a


detailed account of how to use or set up the program.

Manuals, can be provided online or offline, the advantage of an online manual is the
ability to print it and the ability to include multimedia features such as audio clips while
the advantage of an offline manual is the ability to read it without a PC or internet
connection.

Embedded assistance, software suites like MS office have built in help systems (tool
tips), One example is when the user hovers the mouse over an icon and a text box
appears explaining and naming the icon. It is a great way to increase app usability and
does not require software novices to ask the right questions to gain an answer.

Frequently asked questions, are listed questions and answers, all supposed to give
users answers to common set of problems and usually ordered in sets of topics. The
format is usually used in online forums.

Live chat, is a type of real time support that is extremely useful for emergency
situations. These have the advantage of making the user feel supported by a real person
which is preferred by many users.
Online portals, Depending on the product online portals can provide a list of things
from updates manuals to support pages to FAQ’s section.

Remote desktop connections, Is a function that enables a specialized person to connect


to the user’s pc across the internet from virtually any computer. Remote desktop allows
real time service of the problem as a technician will have control of the users computer.
This solution is ideal if the user is not tech savvy.

1.1.10 Evaluate different methods of delivering user training


Self-instruction: Users read a manual or watch a tutorial, or randomly do something in
the system to figure out how it works. This type of training is only suitable for
experienced computer users as they are more confident to start using an unfamiliar
system alone to figure out how it works. Also, this type is more comfortable and gives
you freedom in making a study schedule.

Formal classes: Users sit in a classroom, listen to an instructor who shows and explains
how to use the system. This type of training is useful to train large amounts of staff as it
is effective and relatively cheap, but if the size of the classes is too big, there is little
time to deal with individual problems and questions.

Remote/Online training: An instructor trains a single user either by being in the same
room or by some kind of remote connection (Skype, chat). This is the most effective
way of training as it can be suited to user's needs and abilities, but is very expensive
compared to other types of training.
1.1.11 Identify a range of causes of data loss.
Data loss : error condition where data is lost or destroyed.

Causes Solutions
Accidental Deletion File recovery software
Administrative errors Need for care
Poor data storage program (misplace) Restructure data organization
Building fires Store data in two locations (backups)
Closing program without saving file Need for care, use auto save
Computer viruses Regular backups and use antivirus
Continued use after signs of failure Regular backups and maintenance
Data corruption Backups
Firmware corruption Backups
Natural disasters Backups and store data in two locations
Outsiders wanting to delete steal or alter Regular backups, use authentication
information methods, use a firewall
Physical damage of storage device Regular backups, need for care
Power failure Need for UPS, Backups

1.1.12 Outline the consequences of data loss in a specified situation

Data loss can be detrimental, - 70% of small business firms that experience a data loss
close their doors permanently within one year.

For this unit the candidate simply has to think about what the implications are for each
situation, I.E , losing files in a hospital might lead to a loss of patient information which
might be deadly.
1.1.13 Describe a range of methods that can be used to prevent data loss
Fail over Systems, data is also stored in an extra system (hardware, software, network)
which starts working once an error is detected in the main system.

Redundancy, the same data is stored in different places.

Removable Media, this includes external hard drives, disks, USB

Offsite Storage, local storage that does not require internet.

Online Storage, for example Clouds. They require internet

1.1.14 Describe strategies for managing releases and updates.

Patches: used by software companies to update applications by fixing known bugs and
vulnerabilities. May introduce new bugs as an unwanted side effect.

Updates: Improves a product in a minor way by adding new functionalities or fixing


known bugs, in most cases updates are free.

Upgrades: Greatly improves a program, will usually include novel functionalities or


characteristics as well as cumulative bug fixes. In most cases upgrades need to be
bought (office 2007 to 2016)

Releases: final working versions of software. These applications have gone through
alpha and beta software testing.

Topic 1.2.1 Define the terms: hardware, software, peripheral, network, human
resources
Hardware: anything within a computer you can physically touch.
Software: the collection of programs and instructions that control the computer.
Peripheral: the devices attached to the computer that allow it to interact with its
environment and exchange information.

Types of peripherals:
Input peripherals:
• Keyboard
• Mouse
• Microphone
• Webcam
• Scanner
Output peripherals:
• Screen
• Speakers
• Printer

Network: a group of digital devices (computers) connected together in some way to


share resources such as documents or files and printers.
Human resources: the humans operating the computers

1.2.2 Describe the roles that a computer can take in a networked world
A computer can be a client or a server or both at the same time.

client- a computer accessing resources hosted by another computer, the server.


Resources could be documents, printers, scanners etc.
server- a computer hosting resources to be shared across the network, like documents,
printers etc.

Examples of servers:

DNS server - maps web addresses to IP addresses


Router - Device that connects two different networks
Firewall - a computer or software package, which needs specific hardware,
monitoring and protecting the network traffic of a computer or computer network. It
decides which computers get access to the network or computer based on a set of rules.
The difference between firewall and antivirus is that the firewall is used for the network.
E-mail server - Maps e-mail addresses to IP addresses.

1.2.3 Discuss the social and ethical issues associated with a networked world
Social Issues of the network world:
Social issues are those which affect our society in general. Ethical questions are
involved often as well, but it's the affect on society, regardless of something being seen
as right or wrong, which is the issue.
• English is even more so the one dominant language for the networked world
• The good and bad of English being the "international language of the
Internet". Good: ease communication with a common language, Bad: lack
of diversity, potential loss of rare languages.
• Over-connectedness can curtail and even ruin real-life interactions between
people
• Cyber bullying is easier and more widespread
• The ease of piracy; companies in particular have the most to lose with this.
• The ease of identity theft; it was possible before, but now, with so much
financial business in particular being done on line, the implications of identity
theft are more immediate and potentially far-reaching
• The ease of other cyber-crimes such as fraud (tricking people into handing
money over to a fake website, for example)
• The ease of hacking; without networks and the Internet hacking could be done,
but the hacker physically had to be there - no more.
• Loss of jobs as certain sectors are taken over by digital equivalents (for example
the recording industry)
• Students being distracted at school
(Again, this is a good example of how "un-plugged" computers were still a bit of a
distraction in years gone by, but with students now being permanently connected
to so much, with their IT devices, the temptations and distractions have jumped to
another level altogether.)
• People do not experience quiet "mindfulness moments" because they are always
distracted by their technology, whether it be their cellphone notifications, or their
Netfix at home
• Health issues related to computer use (back, eyes, hands) are be exacerbated with
the increase use of technology

Ethical Issues of the network world:


An issue is an ethical one if you have to stand back and ask yourself "is this right, or is it
wrong?", and/or where is the line between right and wrong? Note that most of the above
social issues also have an ethical component to them.
• Copyright violation
• When does copyright infringement become stealing, and when is it more
borrowing, and are there times that it can be justified? To take the
downloading of a song example, is one to try out an artist ok, and
downloading the whole album not? Is it ok if the artist is a multi-millionaire
versus a new singer?
• And then there is "fair use". Fair use doctrine in some countries allows for
the use of digital material in an educational setting, and for the critique of
movies etc. Just the fact alone that fair doctrine does not even exist in some
countries suggests it is not a black and white issue.
• Plagiarism
• what constitutes plagiarism in the digital, networked age? Does it now
being a networked age influence at all the ethics of plagiarism?
• Privacy Invasion
• when and to what degree, is privacy invasion acceptable and/or necessary,
with technologies now in use in the networked world?
• Take cookies for example; is it ok for most of the websites you use to track
what you do on the Internet, and store that information on your computer.
• Anonymity
• Should privacy and the ability to remain anonymous be a right? Or is it to
the greater good for modern networks to be used in the collection of data on
all people?
• Criminal Activities like Hacking etc.
• For example, is hacking ever justified, as with the case of it being done by
law enforcement officials themselves to protect society?

1.2.4 Identify the relevant stakeholders when planning a new system.

A stakeholder is any person or company who is concerned in the planning of the


new system.

They can include:


• Developers
• End-users
• Critics
• Software manufacturers
• Brokers
• Investors
• Government

For example the stakeholders in the implementation of a new hospital database system:
• doctors
• nurses
• hospital IT
• first responders
• insurance companies
• patients (no.1 stakeholder)
• suppliers
• other hospitals

* End user should always be most relevant stakeholder.

1.2.5 Describe methods of obtaining requirements from stakeholders

Observation is the process of monitoring a system while it is at work.

Example: An awkward man stands behind a store clerk for one whole day, seeing how
she works.

Pros:
- As it is not based on numerical statistics, it can explore topics in great detail and depth.
- Unobstructive observation will create extremely natural data.

Cons:
- A functioning system that is being observed will always act different than it does
normally.
- The non-statistical data can be difficult to analyze and can cause generalizations.

Surveys (2 types of surveys: online, face-to-face. 2 types of questions of surveys:


restricted (yes/no questions), unrestricted)
Pros

• Relatively easy to administer


• Can be developed in less time (compared to other data-collection methods)
• Can be administered remotely via online, mobile devices, mail, email, kiosk, or
telephone.
• Conducted remotely can reduce or prevent geographical dependence
• Capable of collecting data from a large number of respondents
• Numerous questions can be asked about a subject, giving extensive flexibility in
data analysis
• With survey software, advanced statistical techniques can be utilized to analyze
survey data to determine validity, reliability, and statistical significance, including
the ability to analyze multiple variables
• A broad range of data can be collected (e.g., attitudes, opinions, beliefs, values,
behavior, factual).
• Standardized surveys are relatively free from several types of errors

Cons

• Respondents may not feel encouraged to provide accurate or honest answers.


• Respondents may not be fully aware of their reasons for any given answer
because of lack of memory on the subject, or even boredom.
• The number of respondents who choose to respond to a survey question may be
different from those who chose not to respond, thus creating biased data.
• Survey question answer options could lead to unclear data because certain answer
options may be interpreted differently by respondents. For example, the answer
option “somewhat agree” may represent different things to different subjects, and
have its own meaning to each individual respondent. ’Yes’ or ‘no’ answer options
can also be problematic. Respondents may answer ”no” if the option “only once”
is not available.

Interview (2 types: structured (fixed questions) and unstructured)

An interview is a face to face meeting, that consists of an interviewer asking the


interviewee questions that should be pertinent to the topic of the interview.

Pros
• You get direct feedback from stakeholders.
• You can ask any question you want, and can change the direction of the interview.
• People tend to be more truthful face to face.
• You can see how people physically react to certain questions
• You can discuss a topic in depth.

Cons
• It takes a long time to interview everyone.
• It is quite costly as people have to stop working to go to the interview and you
have to pay the interviewers.
• Since it take so long you are likely to choose a small group of people to interview
and if you have badly selected this group than some of the information you collect
may be useless.
• For an effective interview interviewers must take a lot of time to prepare.

1.2.6 Describe appropriate techniques for gathering the information needed to


arrive at a workable solution.

Ways to gather information:

• Examining current systems


• Looking at competing products

• Organizational capabilities

• Literature searches (web/books)

• Organizational capability: Ability and capacity of an organization in terms of its.


Human resources: their number, quality, skills, and experience

Observing the system in can provide invaluable information as to how a system


works and how it can be improved. The most important things to observe the users
workflow, the inputs and the outputs

1.2.7 Construct suitable representations to illustrate system requirements

The ways to illustrate system requirements are system flow charts, data flow
diagrams, and structure charts.

System flow charts - Diagrams representing how different parts of the system are linked
together and how the system should work in general.
Data flow diagram - Diagram representing how data is moving through the system.
Structure diagram - Diagrams representing the organization of a system, usually with
showing the different parts in hierarchical order
1.2.8 describe the purpose of prototypes to demonstrate the proposed system to the
client.

Prototype is a preliminary version of a product.

• Prototypes attract the attention of the client since it encourages and gives
them a feel for how the final product could work.
• They help users and developers to understand what can be expected from the
product.
• Can be used to market to investors.
• Great for finding problems and fixing them earlier.
• Helps gives an idea of what problems persists, what needs fixing and what
should be changed completely.

Topic 1.2.9 Discuss the importance of iteration during the design process.

Designing and creating the system usually happens in 5 stages: Planning, analysis,
design, implementation, maintenance. However, the maintenance step is often let out
because in maintenance you plan, analyses, design and implement changes, so the circle
effectively begins from start again.

This iterative process happens during the entire product life cycle.
he iterative system helps you find problems quickly because it makes it easy to try it
again.

Once a design is completed, problems are noted that many test users had with it. These
problems would be quickly fixed through an iteration which should be tested to make
sure the "fixes" went through and problems that had occurred are solved. It also finds
any new usability problems by the new changed design. Iterative design is specifically
aimed to teach you through messing up repetitively until you get it right resulting in a
more successful final product.

1.2.10 Explain the possible consequences of failing to involve the end-user in the
design process.

Failing to include the end user has many consequences.

First off, if the users are not involved then the developers will not get any feedback
which leads to ‘developer bias’. What ends up happening is since there is no user
feedback a developer will likely program something in the way that the developer as a
professional would expect it to work and forget to design it intuitively for less tech
savvy users. Furthermore the user knows best, they are the ones who understand their
wants and needs better than the developers ever could and if they are not involved the
software might not meet all the needs of the users.

Main consequences for the user:


• Create a product that does not meet the needs of end-user.
• Create a product that the intended target end-user can't use.
• Loss of productivity of the end-user either because they don't like or can't
efficiently use the product.
Main Consequences for the company:
• Legal action due to not meeting the needs of the buyers of your services.
• Tarnished image of the company.
• Loss of market share or even failure of the company.

1.2.11 Discuss the social and ethical issues associated with the introduction of new
IT systems.

• digital divide.
• less social interaction.
• surgeries performed by machines.
• privacy.
• reliability.
• copyright .
• substitution of workers by cheaper machines.
• might be forcing new technologies on people who don’t want them.
If you need more help:
https://johnrayworth.info/jsr/_IB_Common/_topic1AssessmentStatements/1.2.11.php

1.2.12 Define the term usability.

Usability is basically ergonomics + accessibility.

Usability : The ease of use and learnability of a hardware or a software. The object of
use can be an application, website, machine, or anything a human interacts with.
Accessibility: Refers to the design of products for people with specific needs or
disabilities.

We do not need to know or understand the definition of ergonomics for this course.

Learnability : How easy is it for users to accomplish basic tasks the first time they
encounter the design.

Efficiency : Once users have learned the design how fast can they perform their tasks.

Errors : How many errors does the user make how severe are they and how fast can
your recover.

Satisfaction : How good is the design to use?

1.2.13 Identify a range of usability problems with commonly used digital devices

GPS :
• Small Screen.
• Low quality speaker.
• Antenna with poor performance.
• Inaccurate data.
• Outdated street data.
• Inefficient routing software.
Tablets :
• Accidental touches lead to undesired selections.
• Difficult to learn different gestures.
• Bad scaling and zoom.
• Difficult to use control features.
• Small side buttons.
• Poorly written instructions.
Game consoles:
• Portable game consols have relatively small screens.
• Buttons may be too small (controller).
• Difficult to use outdoors (screen glare).
• Short battery life (portable).
PCs:
• Excessive keyboard use may lead to RSI (repetitive strain injury) syndrome.
• Excessive use of large bright screen can cause eye damage.
• Poor lighting conditions may lead to reflecting screens.
• PC mice are designed for right hand people and it is often hard to use for left
handed people.
Digital Cameras:
• Incorrect calibration of touch screen menus.
• Need to hold camera vertically impairs convenient navigation.
• If a camera does not have a flash then a separate piece is needed for flash.
• The buttons might be too small.
• Some cameras require specific software to connect to PCs.
Mobile phones:
• Keyboard is very small many novice users, elderly people or people with bad eye
sight may struggle.
MP3:
• Tiny buttons.
• Insufficient memory.
• Fragile.
• Lack of screen in “micro” or “shuffle devices”

1.2.14 Identify methods that can be used to improve the accessibility of systems

There are several methods to increase the accessibility of devices:


• Touch screens – for inexperienced users
• Voice recognition – for people who are visually impaired
• Text-to-speech,speech-to-text – also for the visually impaired
• Braille – visually impaired.
• Sip and puff – technology that works by interacting with technology by sipping
and pugging
• Fewer buttons – for inexperienced users
• Track balls – for people with difficulty moving hand
• Visual effects replacing sound cues – for those that are hearing impaired

1.2.15 Identify a range of usability problems that can occur in a system.

Here are a few examples of different systems and their usability problems:

Payroll system:
• Internet Service Provider (ISP) downtime
• Depending on the complexity of the system, employees may have trouble learning
how to work with it.
• Employees might not have a bank in order to be payed
• This system might be complex to set up
Voice recognition:
• The dictionary of the voice recognition software may be limited and doesn’t
include certain words such as slang terms.
• If the user has a speech impediment then the software may have trouble
recognizing what they are saying.
• People from different regions of the world and backgrounds will all different
dialects as well as accents which the system may not be able to deal with.
• The system may not be able to recognize different words if the user speaks very
quickly or too slowly.
• Users may not want to speak about important and sensitive information in a public
space. As well as people speaking in a lower volume when in public, the system
may not be able to ‘hear’ the user.
• If the user is in an area with a lot of ambient noise then the system may not be
able to cancel out this noise.
• If the word database is not stored locally and there are network errors then the
system is not able to work.

Automatic feedback system:


• Is the feedback clear enough in terms of quality?
• Is there enough feedback?
• Is it given quickly enough
• Are the users providing feedback to an adequate and valid degree?

1.2.16 Discuss the moral, ethical, social, economic and environmental implications
of the interaction between humans and machines.

Moral/ethical implications of the interaction between humans and machines:


• Robots and AI could be used in warfare, for example drone attacks in Afghanistan
etc.
• Robots and AI could be used for criminal purposes
Social implications of the interaction between humans and machines:
• Less human-to-human interaction; not getting to meet people in the shop for
example; rather, interact with robots instead
• More leisure time, since the robot is cleaning up the kitchen etc.
Economic implications of the interaction between humans and machines:
• A new area of manufacturing and business, and employees that go with that.
• Un-skilled and repetitive-task workers lose their jobs to robots
Environmental implications of the interaction between humans and machines:
• Carbon emissions through excessive travel could be lowered, since much more
can be done/made in the home by robots and 3d printers.
2.1.1 Outline the architecture of the central processing unit (CPU) and the
functions of the arithmetic logic unit (ALU) and the control unit (CU) and the
registers within the CPU.

CPU – Central processing unit, key component of a computer system. Contains the
necessary circuitry to interpret and execute program instructions.

ALU – Arithmetic logic Unit part of the CPU does all the arithmetic and logical
operations

CU – Control unit, controls the operations in the ALU and directs data flow
MAR – memory address register, It holds the memory address of the data to be used by
the ALU so that the ALU can fetch the content from memory and process it. It may also
hold the address of where the data that is processed needs to go
MDR – memory data register, holds the data that is to be used by the ALU and stored in
RAM the MDR and MAR are related because whatever data is located at the address of
the MDR will be put into the MAR.
Memory or address bus – Provide connection between CPU and the memory ( uni
directional CPU to RAM)
Data bus – connection between RAM and MDR (bi directional)
2.1.2 RAM ROM.
Primary memory : Only storage that is directly accessible by the CPU. May hold both
data and instructions.
RAM OR ROM
RAM : Random access memory, general purpose storage area meaning that the data
stored can be over written, this allows data and instructions be loaded for instructions
and used whenever. However ram is volatile which means that anything stores in it will
be wiped clean when power is lost.
ROM : Random access memory, is used to store permanent instructions and data that
can not be over written. Does not lose contents when memory is lost.
2.1.3 Cache memory
Cache refers to the frequently asked for memory from the ram. If an application is
frequently executed then it gets placed in the cache, this happens because the cache is
near the alu so the file arrives faster instead of having to travel all the way from ram to
ALU.
Can be placed between CU and RAM, e.g , MAR + MDR -- > L1 Cache -- > L2 Cache -
- > RAM
L1 cache is placed on the micro processor while L2 is placed between CPU and RAM

2.1.4 The machine instruction cycle


• FETCH
• DECODE
• EXECUTE
• STORE
Fetch :
First the CPU fetches the memory address from the PC ( program counter) and copies it
into the MAR, the MAR sends the address to memory using the Address bus and fetches
the instruction. The instruction is stored in the MDR then it is copied into the CIR
(current instruction register)

Decode:
The instruction is sent from the CIR to be decoded. Once it is decoded the CPU will
execute the instruction, the instruction could detail something needed to be fetched or
could be an operation. If it is fetched then the MAR will fetch it.

Execute :
The CPU executes the instruction using the necessary data that may have been loaded
and calculated a result depending on the result, additional data might be needed. These
are fetched from memory. The PC is incremented.

Store:
After executing the instruction and computing the result the CPU stores the result in
primary memory to do so it specifies the address where the result will reside in the
primary memory then using the memory bus sends the data through the data bus, the
CPU then checks the next instruction and repeat.
2.1.5 Persistent storage and secondary memory

Persistent storage is extremely vital in computer systems. This is because if all data was
volatile we wouldn't be able permanently keep data for later use, as it would all be gone
once we turned off the system. Persistent storage is necessary in order to be able to keep
all our files and data for later use. For example a hard disk drive is an example of
persistent storage, it allows us to permanently store a variety of data.

2.1.6 Describe the main functions of an operating system.


Operating system : A set of software that controls the computer’s hardware resources
and provides services for computer programs. It acts as an intermediary between
software applications and computer hardware.
Functions of and OS:

Peripheral management: Peripherals are anything that reside outside the CPU,
keyboards monitors and mice are all peripherals. The operating system is responsible for
communicating directly with the hardware and providing an interface between the
device and applications.

Memory management: An operating system is responsible for all the memory that is
available in a computer system. That means that an OS manages how the memory is
used by applications and ensures that the memory being used by one application doesn’t
interfere by another.

Resource monitoring and multitasking: An application that is running takes up


resources. These resources include the amount of memory the application is occupying
and the processor time. An OS is responsible for the efficient allocation of resources so
that applications can run as effectively as possible.

Multiple applications may run on a computer system at any one time, appearing as
though they are performing tasks simultaneously. Most computer however have a single
CPU that can perform a single action at any particular time. That means that applications
must share CPU time in order to accomplish a goal this is called multitasking.

Networking: An operating system manages connections to and interactions with


networks of other computer systems as to allow sharing of resources, such as files. An
operating system acts as an intermediary between application and networks allowing the
applications to interact with networks in a seamless manner.
Disk access and data management: An important function of an OS is its ability to
access data stored in memory and disks. Data are stored using files which are structured
in a way to make better use of space. The OS is responsible for keeping track of these
files and make sure no applications over write each others files.

Security: Operating systems provide security in the operating system. It does this by
multiple ways. One example is user authentication, username password. And log files
that keep trace of activity of any user in the computer system.

2.1.7 Software application


Word processors:
Word processors are an application that is used for the production of any sort of
document. An example of a word processor is Microsoft word. Word processing is the
action of creating documents using a word processor.
The main features of a word processor are:
• Composition
• Editing
• Spell checking
• Formatting
• Printing of documents in some cases

Spreadsheets:
Spreadsheets are an application that is used for organization and analysis of data. An
example would be Microsoft excel
The main features of a Spreadsheet software are:
• Data is represented as cells
• Organizes data
• Can be used for data processing using formulae
• Can be used to display graphical data
DBMS:
DBMS, database management system, is a software application that manages database
and is designed to provide an interface between users and a database. An example would
be Microsoft access.

Features of DBMS:
• Create databases
• Input data into databases
• Manage databases (queries, update, store, modifies and extracts information)

Web Browsers:
An application used to access retrieve and present content on the world wide web.
Example would be google chrome.

Email:
An application that allows the exchange of digital messages from a single author to one
or more recipients. This is done by connecting and sending the email to the mail server
of the recipient and then the recipient connects to their mail server and receives the
message. Example Microsoft Outlook

Features of Email:
• Allows managing of emails (Archive, mark as read, delete)
• Allows sending of emails
• Allows and displays viewing of emails in a tidy manner

CAD:
CAD, Computer aided design, is a program that assists engineers to create,modify,
analyze and optimize a design. Example AUTO C.A.D
Graphics Processing Software:
Software that allows a user to manipulate visual images on a computer. Can be edited
with a number of tools in various ways such as crop select move scale erase etc.
Example would be Adobe Photoshop.
2.1.8 Identify common features of applications.
GUI : graphical user interface.
Most applications typically come with a GUI which allows the user to interact with them
in a number of ways. It usually includes components such as graphical icons, visual
indicators, toolbars, menus and dialogue boxes, these allow a smooth user experience.

Common features / GUI elements include:


• Toolbar - A toolbar is a GUI widget on which buttons, icons, or other input/output
elements are placed
• Menu - Menus are collections of functions that the user is able to choose
• Dialogue box - Dialogue boxes are temporary windows that communicate
information to the user and prompts them for a response
• Graphical user interface (GUI) - GUI is an interface that displays the computer's
information in a graphical way.

2.1.9 Define the terms: bit, byte, binary, denary/decimal and hexadecimal

Bit-Computers use binary - the digits 0 and 1 to store data. Is the smallest unit of data in
computing. It is represented by a 0 or a 1.
Byte- A group of 8 bits is called a byte.
Binary- Based on 2 systems and there are 2 symbols 0 ,1
Decimal-10 Based system. uses symbols 0 ... 9
Hexadecimal- 16 based system uses symbols 0....9 A,B,C,D,E,F (10,11,12,13,14,15)

2.1.10 Outline the way in which data is represented in the computer

String: Used to describe a sentence (I love Java)


Integers: Numbers Only
Characters: a, 2, %
Colors: Hex
ASCII: ASCII (American Standard Code for Information Interchange) is the most
common format for text files in computers and on the Internet. In an ASCII file, each
alphabetic, numeric, or special character is represented with a 7-bit binary number (a
string of seven 0s or 1s). 128 possible characters are defined.
UNICODE: an international encoding standard for use with different languages and
scripts, by which each letter, digit, or symbol is assigned a unique numeric value that
applies across different platforms and programs. Each character is represented in 2 bits
and the whole is represented in 16 Bits.

2.1.11 + 2.1.12 +2.1.13


1 = True
0 = False
AND:

Output is true when both A and B are true

Input A Input B Output


1 1 1
1 0 0
0 1 0
0 0 0

OR:

Output is true when A or B is true or Both are true

Input A Input B Output


1 1 1
1 0 1
0 1 1
0 0 0

NOT:

Output is True when input is False

Input A Output
0 1
1 0

XOR:
Output is True when A is true or B is true, but not when both are true

Input A Input B Output


1 1 0
1 0 1
0 1 1
0 0 0

NAND:

and gate followed by a not gate


NAND = output is true when A and B are false

Input A Input B Output


1 1 0
1 0 1
0 1 1
0 0 1

NOR:
Or gate followed by not gate (inverse or)

Input A Input B Output


1 1 0
1 0 0
0 1 0
0 0 1

3.1.XX 8 basic topologies


3.1.1 Identify different types of networks

Types of Network
• LAN-local area network in which the nodes are close together(school,office)
• WAN-world area network in which the nodes are spread out over larger
geographic area.
• GAN- global area network where the nodes are spread out more globally
(internet)
• PAN-personal area network which consists of computers,mobile...(Computer-
printer relationships)
• P2P-peer-to-peer network in which computer can act as a server for the
other(Skype,Mail...)
• WLAN-wireless local area network it is the same as LAN,but wireless(Wi-Fi)
• SAN-storage are network which provide dedicated access to storage.
• VLAN-virtual local area network is a logical concept not physical.
• VPN-virtual personal network is creates an encrypted connection over a less
secure network,
• Internet-is a network of networks(www,mail,skype,viber)
• Extranet-an intranet that can be partially accessed by authorized outside users
• Intranet-a local or restricted communications network, especially a private
network created using World Wide Web software.

3.1.2 Outline the importance of standards in the construction of networks


Standards play an important role in network construction.
If standards are not kept incompatibility issues will arise.
For example data that is shared in the network should be in a language that is supported
by all users. Also standard and similar cables have to be used in order to have similar
types of data.
International Organization for Standardization (ISO) is an organization that creates those
kind of standards. For example, it has created ASCII and then changed it to Unicode so
that all devices can support the use of all languages.

3.1.3 Describe how communication over networks is broken down into different
layers.

1. Physical layer - Checks the presence of cables


2. Data link layer - Checks the physical address of the device (MAC)
3. Network layer - Checks the presence of the IP address
4. Transport layer - Decides the way how the data will be transported (TCP-
transmission control protocol)
5. Session layer - Creates a bridge between 2 computers by checking the presence of
both devices
6. Presentation layer - Converts data from binary format to user-friendly format or vice
versa
7. Application layer - Presents the information in a user-friendly way (HTML)

3.1.4 Identify the technologies required to provide a VPN

VPN: A secure network that uses primarily public communication system,


such as the Internet, to extend a private network.
Requirements:
• A LAN that is connected to the internet.
• One computer outside of the LAN that is also connected to the internet.
• VPN client and server running on the lone machine and the original LAN
• Internet connection

Secure vpn:
All traffic on the vpn is encrypted
technologies:
Internet protocol security protocol (IPSec) which functions in both transport and
tunnel mode:
• Allows secure transmission of data over public ip-based networks
• Uses standard encryption algorithm to provide confidentiality (AES)
• Provides authentication via digital certificates
Secure sockets layer (SSL) or transport layer security (TLS) with encryption. SSL
based VPNs are much simpler than IPSec based VPNs. Does not require special client
software.

Trusted VPN:
All traffic on the VPN relies on the security of a provider’s network to protect the
network. Can be separated into layer 2 and layer 3
technologies:
for layer 2 VPNs include:
• asynchronous transfer mode circuits
• frame relay circuits
• transport of layer 2 frames over MultiProtocol Label Switching (MPLS)
for layer 2 VPNs include:
• Multi protocol label switching (MPLS) with constrained distribution of routing
information through border gateway protocol (BGP)

Types of VPN:

Site to Site:
Connects entire networks and facilitates secure data interchanged between different
sites. Uses VPN gateways

Remote access:
Connects individual hosts to private networks and facilitates teleworkers who need to
access their company’s network securely using the internet. Every host has VPN client
software installed.

3.1.5 Evaluate the use of a VPN.


Advantages of VPN:
• Employees can work from anywhere by connecting to the VPN of the company
• Branches of the company are able to connect to the headquarters of the company.
• It is cheap
• It is reliable
• It saves time and increases the productivity

Disadvantages of VPN
• It has a low speed
• Compatibility issues can arise between the users of the network

3.1.6 Define the terms: protocol & data packet


Protocol- Set of rules for data communication.

Data Pocket- combination of bits in some lengths send across the network.

Data- Anything in a form suitable for use with computer such us binary. Typically data
meaningless.

Packet- A small unit of data in network communication.


3.1.7 Explain why protocols are necessary

Protocols are the set of rules computers follow when communicating across a network.
Without them, no information can be transmitted as computers don't know how to
interpret the signals coming through the network.

Protocols have essential functions:

Data integrity – Means that the data has not been changed/corrupted deliberately or
accidentally during the transmission. Uses checksum mechanisms.

Source integrity – Means that the identity of the sender has been verified. Digital
signatures are used to prove source integrity.

Flow control- Networks have limited memory and bandwidth. The transport layer is
responsible for taking advantage of its protocols and facing situations where an overload
occurs. These protocols can request form a sending application to slow down the data
flow rate. The transport layer controls the reliability of a given link through flow control.

Congestion management – Congestion happens when the request on the network


resources exceeds the offered capacity.
Deadlock prevention – A Deadlock is a situation in which two or more network
competing actions are waiting for each other to finish, and thus neither ever does
creating a deadlock. The persistence timer is used to resolve the situation.

Error checking – Process of checking for errors

Error correction – Ability to correct errors

3.1.8 Explain why the speed of data transmission across a network can vary

Reasons why speed may vary:


• The speed may vary at different times of the day
• The speed may vary depending on the distance. Rural and urban areas will have
different speeds with rural being the slowest and urban being the fastest.
• The speed may vary depending on your specific internet provider
• The speed may vary depending on the quality of the cable that is used (Fibre vs
Copper)
• Speed may vary depending on which connection method is used ( WIFI, UTP,
CABLE)

3.1.9 Explain why compression of data is often necessary when transmitting across
a network

All networks have limited bandwidth. Compressing a file reduces its size which reduces
bandwidth uses and results in faster transfer speeds.

There are two types of compression:

Lossy Compression:
Some of the information is lost to an acceptable degree. There is no way to get the
original file background
Examples : JPEG, MP3, MP4

Loseless Compression:
The compression method reduces the number of bits by identifying and eliminating any
statistical redundancy. There is no loss of information during loseless compression.
Examples = ZIP, GIF, PNG

Uses of compression:
Backups and Archiving
So backup files don't take as much space as the original ones.

File Transfer
If the file is smaller it will take less time to upload/download.

Web use of media Files


Download of MP3 files(smaller music files)

File encryption and protection


Compressed files which their data is mixed up and has no meaning.

3.1.10 Outline the characteristics of different transmission media

Wired:

Copper cable ( metal conductor) , most common kind of cabling in computer networks

Coaxial cable, consists of two copper conductors it was used in computer networks, as
well as to carry TV signals. Low cost of installation.

Unshielded Twisted Pair Cable (UTP) ,very popular in LANs. Easy to install. Prone to
electrical interference. Low cost of installation. Good for short distances.

Shielded Twisted Pair Cable, Same as UTP but harder to install and less prone to
electrical interference.

Fiber Optic Cable, Optical cable that carries a beam of light, Very expensive, Offers
very high speeds, Needs fewer repeaters. Extremely secure. Used for data and telephone
lines

Wireless:

Microwave Radio, used extensively for mobile telephone networks and LANs, info is
carried through the air.

Satellites, use microwave signals


Infrared, used only for very short distances, requires line of site, very secure

RFID, uses various radio technologies, active RFID needs internal power. Passive RFID
needs no power source.

Bluetooth, bluetooth devices use microwave radio to exchange data, transmit at very
low power levels, regularly changing frequiencies.

CHARACTERISTICS OF TRANSMISSION MEDIA:

Transmission Speed Cost Security Reliability


media
Fiber Optic 3 3 3 3
Metal Conductor 2 2 2 2
Wireless 1 1 1 1

3.1.11 Explain how data is transmitted by packet switching


Data packet is a unit of information.

Packet switching refers to a communication method used in computer networks in


which data are grouped into packets. The original file is divided into packets before
transmission and each packet may follow a different path to each destination. Each
packet is sent individually, possibly reaching the destination via different routes.
With packet switching the communication channel can be used more efficiently and
delays are minimized.

3.1.12 Outline the advantages and disadvantages of wireless networks

Advantages

Does not take space or time to lay the cable's.


• No extra cost for cables.
• You can bring your own device
• Increased mobility
• Easy to use
• Easy installation
• Expansion is easier
• Guest usage

Disadvantages

• Risk of cancer
• 2-50x slower than wired communication
• Less stable
• Car crashes, because of talking on mobile
• Security issues
• Weak privacy
• High error rates
• Can be unsustainable because of weather
• The distance that wireless networking covers is smaller
• Can be used to steal data

3.1.13 Hardware and software components of a wireless network

Hardware:

A modem, allows you to connect to the internet

A wireless router, Acts the same as a wired router, but in some cases will also act as a
WAP (wireless access point), WAP allows data transfer between a device and a network,
wireless router will usually have LAN jacks for wired devices.

A wireless network adapter, also known as a wireless NIC, it is required for any
devices that don’t have wireless capabilities.

A device that can connect to the network, PC ,mobile ,games console.

Wireless antennas, Access points and routers will often utilize WiFi antennas that
significantly increase the effective communication area of a network. They are fixed,
optional or removable.

A wireless repeater, signal booster, connects to a router or access point. Purpose is to


receive an existing signal and to rebroadcast it.

Ethernet to wireless access point or to wireless repeater, using ethernet cables to


carry signal to the wireless repeater or WAP.
Ethernet over powerline to wireless repeater or WAP, it uses power lines to carry the
signal to the wireless repeater or WAP.

Software:

DHCP, dynamic host configuration protocol is a network protocol that allows a server to
automatically assign an IP address to a client device.

Software Firewall, a network security system that determines what data comes in and
goes out of a network or pc.

Name/SSID, A service set identification (SSID) is a set of 32 alphanumeric characters,


it is used to differentiate one WLAN from another. It is case sensitive.

NIC drivers, a network interface card driver is a driver for the NIC cards, the driver
operated the hardware of the card, it acts as a translator between the OS and the NIC.

OS, Operating system handles system resources and is responsible for managing all
protocols software and hardware that have to cooperate so that a network can exist and
function.

Security software, Includes all software that prevents unauthorized access, use ,
disclosure, disruption, modification, perusal, inspection, recording or destruction of data.

WAP, Wireless application protocol specifies a set of protocols for accessing


information over a mobile wireless network. It allows users to access the internet,
exchange emails and surf the web.

Web Browser, is an application software that is used to find retrieve and display content
on the WWW. Includes, text images audio.

3.1.14 Describe the characteristics of wireless networks

WiFi (Wireless Fidelity)


• Also called Wireless LAN (WLAN)
• Used in laptops/mobile devices to connect wirelessly to home network
• Most preferred network type to implement a home network
• Allows relatively slow to fast data transmissions (depending on the version)
• Backwards compatible with most older WiFi standards (a/b/g/n)
• Small transmitting radius makes it suited for homes, usually <20m

WiMAX
• WiMAX = Worldwide Interoperability for Microwave Access
• Designed for large distance high speed internet access
• Relatively cheap method of providing internet over a large area - suited for poorer
countries
• Rivaled by Long Term Evolution (LTE) standard
• Can be used as a form of wireless variant of DSL phone transmission lines

3G (Third Generation)
• The primary way mobile phones access the internet today
• Allows the tunneling of phone lines (mobiles don't have to switch back to phone
network when receiving a call
• Relatively fast

LTE ( long term evolution)


• 4G data network
• High speed data
• smartphones and mobile data terminals
• large capacity
• fast

WiMAX vs LTE
• Both considered 4G technologies and both are IP technologies
• They use different channels
• LTE is compatible with 3G and 2G while WiMAX is not
• Building an LTE network is more expensive
• LTE allows much greater speed for mobile users
• WiMAX is less popular and less widespread than LTE
• WiMAX is considered a better choice for low-cost network installation in
developing countries

3.1.15 Different method of network security

Why do networks need security?

Because they need to protect from hackers intruders or unauthorized users, which can
cause harm in multiple ways including and not limited to:
• Disabling operations
• Inserting viruses or malicious code
• Steal identities
• Steal devices
• Steal sensitive information
• Cause a DOS attack (denial of service)

Types of network security:

Encryption, uses complex math to alter a message into a form that is not understandable
to an unauthorized person.

Symmetric-key encryption, also known as single key or secret key encryption,


both the sender and receiver will use the same key to encrypt a packet before it is sent.
(DES, AES)

Public-key encryption, also known as asymmetric key encryption, uses two keys
the public key is used for encryption while the private key is used for decryption. This
type of encryption is used on the internet. ( SSL, TLS)

Method Advantages Disadvantages


Public-key encryption Two sides don’t need to Messages take more time to
have already shared secret encrypt and decrypt.
key to communicate using Public key authenticity
encryption. needs to be verified.
Symmetric-Key encryption Encryption speed is faster Keys must be shared before
and uses less resources that they can be used.
public-key encryption If the key becomes
unknown by unauthorized
individuals then a new key
must be made

Other methods:

Free access, anyone can access the internet, no security features.

Use of a password, weak password are easy to crack.

Install an antivirus program, Prevents detects and removes malicious software.


Use a software firewall, Help keep intruders from getting into your devices.

Use of a password to access the interface of the access points (ROUTER LOGIN
PAGE)

Turn On/ Off wireless connectivity, very good option if wireless connectivity is not
needed

Enable/Disable SSID broadcast, By disabling a routers SSID broadcast devices in


range will not be able to find the wireless network unless they enter the SSID correctly
manually. This does not provide a security feature as hidden networks and SSIDs are
relatively easy to detect.

Block access to wireless devices by MAC address, MAC stands for medium access
controls, follows mac protocol and is a sub-layer of data link. Network security can be
increased by giving access to specific devices using their MAC address since each MAC
address is unique.

WEP wireless security, compatible with older devices, encryption method, increases
security, can be cracked but is relatively hard to crack.

WPA/WPA2, Uses AES, considered best protection.

WPS, designed to allow novice and residential users to securely operate their wireless
networks.

WPS methods:
• PIN that is entered on the device we wish to connect, pin is either in GUI or
sticker on router
• Push button, push WPS button on both devices
• NFC, device must be in close range to connect
• USB transfer, transfer data between router and device using USB

Prevent physical access, offers great protection but extreme cost.

Use router hardware firewall, will prevent people from hacking router but not people
in range of router.

Use encryption for sensitive data.


3.1.16 Advantages and disadvantages of each method of network security.

Method Advantages Disadvantages


No security Fast speed Anyone can access the
network
Use a password Easy to use, prevents Takes some time to enter
unauthorized access password. Can be cracked if
password is weak.
Antivirus Good protection from virus May slow down computer
Software firewall Control and monitor traffic May slow down computer
flow, prevents unauthorized
access to your device
Password to access router If a person gets access to the Takes some time to enter
interface network they will not be password. Can be cracked if
able to alter any of the password is weak.
router settings
Turn on/off wireless Complete security There is no wireless
connectivity network
Enable/disable SSID Invisible to novice users Not a security feature, easily
broadcast found
Limit access by MAC Extra security Allowed list of MAC
address addresses can be easily
found, difficult to manage
list of allowed MAC
addresses
WEP Works with legacy systems Outdated
WPA Best option, strong
encryption
WPS Ease of use,no need to know New technology only works
password or SSID with WPS devices, known
security issues
Prevent physical access Limited to the interior of the Very expensive
user’s premise
Hardware firewall Prevents hackers and Cant stop people in range
unauthorized people on the from getting onto WiFi
internet from getting on
your network
Encryption Software Difficult for an Takes time
unauthorized person to read
sensitive files

THINGS TO KNOW BEFORE TOPIC 4


https://computersciencewiki.org/images/c/c6/IB-Pseudocode-rules.pdf

Topics 4.1.9-4.1.13

Inputs are resources that are given in order to solve a certain problem, for example
ingredients are used to cook a cake.

Outputs are results of the solutions, for example cake.

Pre-planning is the process of planning before the actual process of the solution. (Gantt
chart is a chart that presents the tasks and the time periods allocated for each of them.)

Pre-conditions are conditions that need to be met in order to start solving the problem
(Checking if ingredients (milk, sugar) are available for cooking).

Post-conditions are conditions that need to be met after solving the problem (Checking
the availability of place to eat the the cake).

Topics 4.1.14-4.1.16 Thinking concurrently

Concurrency is when two or more processes are using the same resources at the same
time.

Advantages:
• Efficient workable
• Time saving
• Money saving

Disadvantages:
• Errors
• System may be overloaded
• Lower speed completing a certain task

4.1.17 Identify examples of abstraction


Abstraction is the process of removing unnecessary or complex details from a process
to make it simple

Example:

No abstraction:

Leave house
Lock door
Get in car
Start car
Drive to cinema
Buy tickets
Go into theater
Watch movie

With abstraction:

Leave house
Drive to cinema
Watch movie

Topic 4.1.18 Explain why abstraction is required in the derivation of computational


solutions for a specified solution

• Abstraction enables a person to concentrate on the essential aspects of the problem


while ignoring details that tend to be distracting.
• Abstraction is a convenient way to deal with complexity as it helps to understand the
problem much easier

Topic 4.1.20 Distinguish between a real-world entity and its abstraction

The real world entity has a lot more details and complexities whilst the abstraction is a
simpler more iconic version of it

4.2.1 Describe the characteristics of standard algorithms on linear arrays.

Sequential search – used to find specific element in an array, it does this by checking
each component sequentially, ie 1 2 3 4 5
PSEUDOCODE:
Array = [2,9,5,6,7,8]
Search = 7
Found = false
Counter = 0

loop Counter from 0 to Array.length – 1


if Array[Counter] = Search
Found = true
output Array[Counter]
end if
end loop

if Found = false
output Search, “ is not found in this array”
end if

Binary search – used on sorted arrays, divides the array in two parts and checks whether
the number is higher than or lower than the middle of the array

PSEUDOCODE:

Array = [11,12,15,16,112,118,123,145]
Search = 15
Min = 0
Max = Array.length -1
Found = false
Answer = 0
Mid = 0

loop while Found != true and Min <= Max


Mid = (Min + Max) div 2
if Array[Mid] = Search
Found = true
Answer = Mid
else if Search > Array[Mid]
Min = Mid + 1
else
High = Mid – 1
end if
end while
if Found = true then
output Search, “was found at”, answer
else
output Search, “was not found in this array”
end if

Bubble sort – Compares 2 elements next to each other. If the task is to put the array in an
ascending order it will switch the places of the elements if the first one is higher than the
one next to it. The process continues until the array is put in an ascending order.

PSEUDOCODE:

Example = [1,663,8,2,4,1,22,66,20,122]

* if you want it to be in descending order then <


* if you want it to be in ascending order then >

Loop I from 0 to Array.length


loop j from 0 to array.length -1
if Example[j] > Example[j+1]
Temp = Example[j]
Example[J] = Example[J+1]
Example[J+1] = Temp
end if
end loop
end loop

loop x from 0 to array.length -1


print Example[x]
end loop

Selection sort- Sorting by finding the highest or lowest number from an array then puts
it in first place. Then it does the same starting from the second element and so on and so
forth

PSEUDOCODE:
* > is for descending order
* < is for ascending order
ELEMENTS = [1,5,3,86,256,420,9,510,51,24,60]
Min = 0
I=0
Temp = 0

Loop Min from 0 to array.length -1


I = Min
Loop Current from Min+1 to array.length
if ELEMENTS[Current] > ELEMENTS[I]
I = Current
end if
end loop
TEMP = ELEMENTS[I]
ELEMENTS[I] = ELEMENTS[Min]
ElEMENTS[Min] = TEMP
end loop

output ELEMENTS
4.2.2 Outline the standard operations of collections.

Collections store a set of elements. The elements may be of any type (numbers, objects,
arrays,Strings, etc.).

The following code is guaranteed to retrieve each item in the collection exactly once.
// STUFF is a collection that already exists
STUFF.resetNext()
loop while STUFF.hasNext()
ITEM = STUFF.getNext()
// process ITEM in whatever way is needed
end loop

These are the commands used on collections:

Method name Description Example Elaborate


addItem() Adds an item Stuff.addItem(42) Adds an element ,
whether it is a value
string object etc.
getNext() Get the next item X = Stuff.getNext() getNext() will return
the first item in the
collection when it is
first
called.
Note: getNext() does
not remove the item
from a collection.
resetNext() Go back to the start Stuff.resetNext() Restarts the iteration
of the collections Stuff.getNext() of the collection, the
two lines of code
will retrieve the first
item in the
collection.
hasNext() Tests if the If Stuff.hasNext() Returns true if there
collection has a next then are one or more
item elements in the
collection that have
not been accessed by
the present iteration
(getNext).
isEmpty() Tests if a collection If Stuff.isEmptry() Returns true if the
is empty collection is empty.

4.2.3 Discuss an algorithm to solve a specific problem


• A binary search is faster, but can only be performed in a sorted list
• A sequential search is slower but can be performed whether the list is sorted or not
• A bubble sort can "quit early" if no swaps are made in a pass. But it makes lots of
swaps.
• A selection sort must always perform a certain number of passes - it cannot "quit
early". But it makes fewer swaps generally
• Both bubble and selection sort are equally complex

4.2.4 Analyze an algorithm presented as a flow chart.


Watch this video to learn trace tables.
https://www.youtube.com/watch?v=UbANyxE7pGE
4.3.1 State the fundamental operations of a computer
• Add - Adding data to the RAM or to registers
• Compare - Comparing values (< = >) or comparing the length of the data in
different registers
• Retrieve - Loading data from RAM or from registers
• Store - Saves the changes made in the registers or in the RAM

4.3.2 Distinguish between fundamental and compound operations of a computer

Key difference: complexity


• A fundamental operation could be something like add two numbers, store a number,
move a number to another location in RAM etc.
• These are operations that do not require the processor to go through a large number of
sub operations to reach a result.
• A compound operation is an operation that involves a number of stages/other
operations. Think of it as a group of operations that combine together to form an
operation.

An example of fundamental instructions:


Load Register 32ab
Add 29
Store Result
Compare Result to register 4

Examples of compound/complex instructions:


Find the biggest number in an array
Sort the names alphabetically

4.3.3 Explain the essential features of a computer language

There are two types of computer languages, high level and low level

The essential features of any computer language:


• Fixed vocabulary – there are fixed terms that are used for specific operations in
specific languages (if and or)
• Unambiguous meaning – One term cannot have several meanings
• Consistent grammar and syntax – there are preserved consistent grammar and
syntax rules so the computer can understand the code
4.3.4 Explain the need for higher level languages

• They save time for developers since they are easier to debug
• They are more easily understandable for beginners
• They do not require the use of memory addresses and memory locations

4.3.5 Outline the need for a translation process from a higher level language to
machine executable code

Most programs are written in higher level language, however a CPU can only
understand machine language so a translator is needed to convert the higher level
language to machine code.

Compiler - Translator that executes the translation process only once, It will translate
the whole source program into an object program. It will also give error messages for
any syntax error found. A program only correctly compiles when all syntax errors are
removed

Interpreter – Translator that goes through the process of translation every time. Refers
to the process of reading each line translating it and executing it, errors are
communicated for every instruction that it interpreted.

Java Virtual Machine (Java) – Combines interpretation and compilation. Source code
is compiled into java virtual machine bytecode. This bytecode is then interpreted by the
java virtual machine interpreter. The java architecture allows code to run on any
machine through the java virtual machine.

4.3.6 Define the terms : Variable, constant , operator, object

Variable – Variables are a name that is used to store a data element of a program, value
can be changed during program execution. (MyNumber = 12)

Constant - Represents things and quantities that don’t change. They are basically non
modifiable variables. (PI = 3.14)

Operator – Used to manipulate operands. (2 + 3), 2 and 3 are operands while + is the
operator.

Object - Collection of data and actions. Actions refer to the operations that can be
performed by an object. Data includes a number of data members. Data members are
used to store the current state of an object and actions are used to change or access data
members.

4.3.7 Define various operators

for IBO pseudocode:

Operator Usage + Example


= Is equal to. Can be used to set a value or
compare two values.

If x = 6
min = 6
≠ Does not equal to

Min ≠ Max
> Greater than.

If Min > 6
< Less than

If Max < 6
>= Greater than or equal to

If Max >= 6
<= Less than or equal to
If Min <= 6
div Divide but without a remainder
22 divide 3 = 7.3333
22 div 3 = 7
mod Modulo operation, calculates the
remainder of a division and gives the result

9 mod 3 = 0 (no remainder)


11 mod 3 = 2 ( 2 remainder)
4.3.8 Analyze the use of variables, constants and operators in algorithms.
Constant – Should be used when we don’t want the value to change or don’t intend to
change, example the value of pi. Furthermore if a constant is used many times it is a
good idea to create it as a global variable.

Variable – Value we expect to change.

4.3.9 Construct algorithms using loops and branching


Candidate must understand how to create efficient programs using loops + must be able
to create flowcharts that loop

4.3.10 Describe the characteristics and applications of a collection

See 4.2.2 for characteristics

Some applications for collections


• Useful for group of items when you don’t know how many items you’ll be
needing/using (contrast to arrays where the size is set in stone at creation)
• Because the collection is only as big as you need it to be, it is an efficient use of RAM
(memory)
• Can be of any data type (primitive or even your own object)
4.3.11 Construct algorithms using the access methods of a collection

Learn how to write pseudocode for collections problems (solving past papers)

see 4.2.2 for commands

4.3.12 Discuss the need for sub-programs and collections within programmed
solutions

Advantages of sub-programs/modules:
-Manageable tasks

• Breaking down a programming project into modules makes it more manageable.


• These individual modules are easier to design, implement and test.
• Then you can use these modules to construct the overall program.

-Distributed development

• Modular programming allows distributed development.


• By breaking down the problem into multiple tasks, different developers can work in
parallel.
• And this will shorten the development time.

-Code re-usability

• A program module can be reused in programs.


• This is a convenient feature because it reduces redundant code.
• Modules can also be reused in future projects.
• It is much easier to reuse a module than recreate program logic from scratch.

-Program readability

• Modular programming leads to more readable programs.


• Modules can be implemented as user-defined functions.
• A program that has plenty of functions is straightforward.
• But a program with no functions can be very long and hard to

Advantages of collections:
• Methods of collections are predefined algorithms that a programmer can use
immediately. For example hasNext() Instead of writing logic to check if the
collection is empty
• Performance is increased by the data management capabilities which can be
gained using collections
• Software reuse is facilitated because all the methods are predefined and are based
on a common language

You might also like