Computing 2
Computing 2
computers work
to
Computer -
Device that can receive data process the data
,
according a set of instructions and produce processed data as a
Data -
Information used in a
computer program
6 Part of the
processor that follows instructions
Name of unit
Symbol Size in
bytes computer .
Kiss
Kilobyte KD 1000 2 Part of the that data
processor processes by
Kibibyte kiB 1024
performing basic mathematical and logical
Megabyte MB 10002 operations
my
o
Mebibyte MiB
Memory
-
Stores data ,
instructions and the results
Gundu Gigabyte GB of
processing
for immediate
usage .
Teacher
Terabyte TB 1000
4
Secondary Storage - Stores large amount of data that
a or a
program
In ↑ do and unit , -> faster and more the processor Lost when E
general ,
.
powerful .
power supply is
interrupted
Multi-leve >
multiple processing units that's able to perform multiple machine instructions at time .
processors a
-
Memory - Device that data for IMMEDIATE Data ROM cannot be easily t
is used to Store
Usage
Stored on
changed and
Address - A number that is used to locate byte in remains there regardless if the is off.
power supply
on or
a
memory
Hard disk > -
Bus > -
Collection of wires for
transporting data from one
part of a
computer to another . [Databus & address bus)
Differences in data bus & address bus .
direction
#tabus
I
100101/
buses travel from the
00
Similarity
>
Both to the memory Cou
->
processor .
>
-
I 10110III
address bus
④
Input device >
->
Hardware device that allows users to enter data and instructions into
2001000/
3
01/1010
Bu T 4
a 1000101
computer #110,
Output device >
-
Hardware device that is used to
display processed data from a computer .
CPU
>
-
data bus
1000
6
address bus
4101011110
Storage media
②
Solid state tre >
-
on
③ Data
Optical stored in electronic circuits that have no
moving parts [Memery card]
+v >
e->
Much faster than optical data , not as vulnerable to damage
magnetic or
,
smaller in size and
lighter in
weight
ve > Much
- -
more
expensive
Data stored as
very small indentations that can be read or written by a laser [DVD ,
CD
, bluray]
+ ve->
Large storage capacity
-
ve- Vulnerable to scratches &f fingerprints ,
data can
only be written once
Set of
Algorithm >
-
Output >-
Results produced by an algorithm Sub-problem - A
problem whose solution contributes to
solving the
bigger problem .
(
Decomposition - Breaking a big problem down into smaller problems
methods
Decomposition
① Incremental
approach
Identify quantitative features of the input/output that causes the problem to be too
large to handle. The solution to a small version of the problem
② modular
approach
Solve of the tasks that of different natures . be other to
simple examples problem manually and identify are These tasks can
separated from each
become distinct sub-problems . This
usually results in
sub-problems that are different from each other .
a can is
running
equal sign ()
Use to store a value
an in a variable
③No
Flowchart symbols Structuring flowcharts
① Terminator ① CITARE Start with terminator symbol
exactly ONE and may stop with one a
④ Process OUTPUT ... Instructions & Flow lines should not Cross each other .
Iteration >
report process
closed loop ,
until a
particular condition is true ·
Test data -
Input data used to
perform adore
Trace table Tabulation of the invariables + output
change
>
dry
-
in a run
↓ Ye
of trace table
Purpose
① Determine
algorithm purpose
② Correcting an
algorithm
Instruction set >
-
Set of basic commands or instructions that a
processor can understand directly ,
represented in
byte form
Machine code > Instructions that
computer's processor
directly
-
can run on a
machine
in a valid are
arranged .
Error when incorrect source code do not follow the rules of the
occurs
language .
Compiler >
-
Lode translator
program
that translates source code into machine code fully before running the
compiled program
Code translator program that translates while the
Interpreter - source code into machine code interpreted program is
running
The machine
code is discarded after the is
stopped the
interpreter is needed
every time the is run
program so
program
I
,
-
~
the
program after compilation Floating point float 1. 294
-
a require recompilation because translation occur while its List list [2 , "apples" ,
1 . 27)
runnings
-Do
offer interactive Fint A sequence of
not Interpreter needs to beena
range 2) into
starting from the
-
O up till
time
, . , argument
mode
-
Java (C 8)() [4
Jarascipt/python Print (list(range (4 , ,
5
,
6, 7]
UDF ~
ange() Jint A
, sequence of into starting from argument) up to argument 2 increasing by
, , ,
argument 3 .
,
, , , ,
>
= =
def function Equal to
-
-
name
(paramete parameter 2) : requires
,
2
arguments returns true/False
Local ↓ -
Us Global variable Notegual to returns True/False
,
variable
+, addition I- subtractionI , ,
*, multiplication/division)// Floor division >
-
% modulus/ **
Exponentian) !1 >=
Operator then equal
, sign
List > can
-
E g.
.
print (subject _
nan[5]) Print [subject-1ane[2 : 8 :
2] print ("Computing" (2 : 8 : ])
t Mui
mputin
Print (subject-name[s 6]) =
print (subject-named : 8 :
CJ)
put Cmui
Changing values of lists
Using index
>"
-
I
DOES NOT WORK WITH STRINGS
E E
g. g
.
.
.
4
Scores =
[85 . 0
,
88.1 72 2
,
.
,
63 .
Subject-name = "Computing"
Scores[C] = 50 . 0
subject-name = "It subject-name [1 ) .
,
88 . 1
,
50 0 .
,
63 .
4) I
I
"
break
stages in
developing a
program
abs() >
-
absolute value
the
Gather math
outputs required for the code
import
-
the necessary
② Plan Solutions moth Leil] >
-
rounds the number
.
up
Decomposing the problem into smaller problems math floor 1- rounds the number down
-
test the code with test cases to see if it Checks to see if lower case
runs as
expected Str islowers >
.
-
all
alphabets are
isupper ()
-
> Checks to see if all
alphabets are
upper case
Data validation
techniques Str Starts
.
with 2)- > Checks to see if the
string starts with certain alphabets
Ensures
②
Range check >
- that the
input is within
range
limit in
put
to a Str
Split() >
Splits the
string ht the If there is an split at the
argument
-
,
.
space . argument,
pattern
Types of errors
①
Syntax error
E
Incorrect
Spelling of symbols
-
② Run-time error
Detected
-
when is
program running
③ Logic error
to
that run as
expected with incorrect output : Eg
.
.Incorrect or
incomplete algorithm
Detected when is
~
program running
TestCases
How to
Storage devices may be
prevent data corruption & data loss
accidentally damaged during transportation
-
&
Backup Copy
> of data damaged/lost Multiple file may
-
②
Uninterruptible power supply > -
Provides enough power for
a
computer each other's data
How to
to
completely shutdown incase of
power
failure .
prevent !
-
make regular backups of data [Applies to all] A
Authentication -
Use when
adequate protection transporting data
Methods to
prevent unauthorised access from writing to the same file at the same time
②
Security token, (2-factor authentication) Power
-
supply to a
computer fails ,
data that is
being written to storage device
③ Biometrics Memory will be lost
may become corrupted data stored in
,
volatile
How to
&
prevent ?
Authentication Set up a
-
① Passwords failure
power
Avoid the same passwords Hardware failure
using and use
unique passwords across or
damage
Storage manufacturing
-
due to defects
may fail
multiple accounts devices over use
, or age
Symbol
Use
passwords that are a mixture of lower case , upper can letters , numbers and How to
prevent ?
check
-
location at all malicious software may purposely damage and corrupt data te attack
an
replicate or sources
Install and
configure firewall to
-
them from
a
prevent spreading through the
Access control or authorisation
I network
① File
permissions
Take The interception of legitimate
care not to
accidentally grant file access to unauthorised Users
Pharming > requests to a website to fake
-
a
Configure firewalls properly to block traffic between any address as real website
Configure the firewall to block traffic from certain well-known harmful companies to steal
personal information like
passwords and credit card
from users.
program
③
Encryption Spyware > A hidden
program that secretly personal information about its
-
collects
keep secret keys private and safe users and transmits this information to attackers without the user's
Use
encryption in combination with file
permissions Knowledge
Trojan horse A to be a harmless file
I
> that
computer program pretends useless
-
or
Copyright + > -
The legal
right of owners to control the use and distribution
application . When run it does
, something harmful .
of their Virus A
intellectual
property >
-
Intellectual property > Creations of the mind that have value but can
only and modifies it When modified virus attaches
-
program is run
, Copies of
exist as data with no
physical form itself to other
programs .
Worm > A
computer program that runs automatically and attempts to
Spread
-
Free and
Open source software -
> Software Where users are
given the Does not need to attach itself to an
existing program .
legal protections that are intellectual property are either expired been
,
surrendered or are
simply
in
applicable
Freeware >
-
Open-courseware >
-
-otwa
agement - Use or distribution of copyrighted work without
permission of
copyrighted owner
100 %
20010
Crack >
-
Program that modifies proprietary software so that the software cannot detect that it is
being used illegally .
Software
3001
Crime of software that is permitted by its
piracy- copying ,
distributing and or
using proprietary not license
4 0100
5 0901
6 110
Uses of binary and hexadecimal systems
z 0111
-
RGB colour codes
8100
s 100/
-
IP address
1010
.
. .
C . ore
(IPVO) >
-
hexadecimal number system larger and overcomes the problem of insufficient Ip addresses
,
E
Mac addresses =
IP address
may change each time a device is connected to the internet and is not
permanent , a more
permanent way is to use Media and
Control address .
I Paddress -
transmits data over the internet
MAL address -
transmits data between devices in local area networks .
00 0 00 0 0 I
0 1 010 10
I I 100
0
11 I
111
or
A BQ
O O I
0 I I
[ 8 I
-1
D
Data types in excel 4
stages in the data life
cycle
= IF
(logical-test ,
value -
if - true
,
=
RIGHT ( "TEXT" num-chars]
Logical value (Booleandata TRUE/FALSE)
-
, ,
I
,
,
row-index-num , range lookup
VLookup table-array
Computer (Lookup
=
networks (tre) value ,
now-index-num range lookup
, ,
2)
make use of shared resources like printers or files Approximate match Exact match
shared internet =
Ceiling Math 1)
=
ROUND (number
-
access .
,
no of decimals
-
Sharesoftware =
Floor. math () = RAND BETWEEN ( lowest, higher) [Both inclusive]
*
Shared =
power (number [Exclusive
~
Storage ,
Data files can be stored on a central
, power )
=
RAND() Number of
number]
-SQRTC) Sumc(
=
backup purposes
=
server for ease of access ,
and
Communication Computers
-
,
in the same network
=
MAX() =
SumIF(range ,
Criteria ,
Sum-rangel
are able to share instant emails
=
MINC) = COUN+ 11
messages and
= COUNTAL) =
COUNTIF()
=
COUNT BLANKIS
Computer network ( -
ve)
= MODE . SNGLL)
the network
maintaining
Security files shared infected
-
or errors >
-
are needed
, .
O Networks
Geographical size of networks of
computing devices connected within a small
geographical area
typically within the
① Local network home school or office
area same
building ,
such as a
,
② Metropolitan area network & Network of computing devices typically spanning across zor mere
buildings within the same town or
locations
geographical
client >
Computer that initiates connection to the server to
request for resources and services to
a
operations
-
run
Server >
-
is were
powerful than a client as it needs to resource , and services
manage
Easy to schedule
backups of all shared files at intervals Administrative needed for the maintenance of
regular costs servers
Peer-to-peer network
+ ve
through
ve
backup
-
required to access
1
Feature Client-server Peer-to-peer
Function Data and resources shared using Data shared between computers. Each computer
are one or more and resources are
directly
dedicated servers- Each computer is either a client or server .
is both a client and server
a server .
Server
Applications In large businesses with large amount of people In homes or small businesses
Scalability more troublesome as cables have to be added to add new Easier as new devices can be added to the network .
devices
>Computer
-
=> C
compote
computer
T -
Compute
computer
Router >
- Device that forwards
pockets between received networks .
Moder >
-
Converts digital data into a form suitable for the transmission medium Ged nice Versa
↑a ↑
3
Bus
topologe
↓ 6
I
the :
Easy and Cheap to install Ve
-
: A break
,
uses less cabling than other
designs anywhere along the bus
may disable
the entire network
Gristopolo ,
a
tre : Can
operate over large distances and handle data than V2 A computers cable failing the entire network tofail .
-
I
↓Ve : Reduce load on Cable
-
Ve : Use other networks
each
cabling as each
computer uses individual more
cabling than
Odd
parity
&
In if the total number of is affirst is odd Os
an odd
parity , ,
add Ensures data is not
lost/corrupten .
Even parity
Checksum
The The data and checksum are sent
bytes up together
sum of all the are added .
together .