Uploaded by Cecilia Oliveira

CS Paper 1 resumo based on Past Papers

advertisement
CS Paper 1 resumo based on Past Papers
1 DATA REPRESENTATION
1.1 Number systems
 A computer only process data in binary form because data is processed in a computer by
using logic gates that only have 2 states; 0 and 1
Hexadecimal:






Used in: error messages, debugging, URL, assembly language, ASCII, Unicode, color in HTML
Is easier/quicker to read than binary
Is easier/quicker to write/type than binary
Takes up less room on the screen than binary
Is easier to debug than binary
Is less prone to human error than binary
In a logical shift, bits are lost so binary value is incorrect
Overflow occurs when data in 8-bit register is larger than 255 so all bits required to represent
value cannot fit in 8-bit register
1.1 Text, sound, images
Text is stored in ASCII format and text files are usually stored in a lossless format. Numbers can be
stored as real, integer, currency, and so on. Lossless format is used since accuracy of data is very
important.




Sample rate is number of samples taken in a second
sample resolution is the number of bits per sample
An image is a series of pixels that are converted to binary, which is processed by a
computer
Resolution = number of pixels in the image
Colour depth = w
File size and quality of image increases as resolution and colour depth increase
Character set = All characters and symbols that can be represented by a computer
system, each character and symbol is assigned a unique value.
Unicode takes up more storage space as each character is encoded using more bits

Data storage and compression
8 bits in a byte




1.1-

1024 mebibytes in a gibibyte

Compression exists to reduce the size of the file so less storage and bandwidth required,
less transmission time
Lossless compression
 reduces file size without permanent loss of data
 e.g. run length encoding (RLE)
 A compression algorithm is used
 No data is removed in the process
 original file can be restored
 Repeated words/symbols can be indexed
 Indexed patterns replaced by numerical values
Lossy compression
 e.g. reducing resolution or colour depth, reducing sample rate or resolution
 DATA TRANSMISSION
2.1- Types of data transmission
data is broken down into packets to be transmitted
Packet switching
 Data is broken down into packets
 Each packet could take a different route
 A router controls route packet takes
 Packets may arrive out of order

Once last packet has arrived, packets are reordered
Serial data transmission




where data is sent one bit at a time over a single wire or channel.
Slower than parallel as only small pieces can be sent at a time
Good for long distances as data cannot be skewed
USB uses serial data transmission: USB connection is automatically detected and is fast
Parallel data transmission





where data is sent several bits at a time over multiple wires or channels.
Faster than serial as large quantities can be sent at time
Data can be skewed so is more suitable for short distances
IC uses parallel data transmission
CPU buses use parallel transmission
Simplex data transmission




where data is sent in one direction only.
Slow
e.g. = connection between computer and printer using USB cable.
Files to be printed are sent from computer to the printer, but data is not sent from printer to
computer.
Half-duplex data transmission




where data is sent in two directions, but not at same time.
faster transmission of large amount of data
data can be downloaded and uploaded, not at same time
data is not required to travel long distances so skewing is not a problem
Duplex data transmission


where data is sent in two directions at same time.
faster
2.2- Methods of error detection
 Errors can occur during data transmission due to interference, e.g. data loss, data gain and
data change
 Including parity byte and parity block check
Parity checks




Parity checks can be even (check for an even number of 1-bits) or odd (check for an odd
number of 1-bits).
bit that is added to make the even or odd total is known as the parity bit.
It is possible that two errors in data could result in an error not being detected.
Sometimes error not detected as there is transportation of bits
Automatic Repeat Request (ARQ)



ARQ uses acknowledgement to indicate data has been received correctly.
A timeout is used which is time allowed to elapse before an acknowledgement is received.
If an acknowledgement is not received before timeout, then data is sent again.
Checksum




Data is sent in blocks.
An additional value, called the checksum, is sent at end of the block of data.
checksum is calculated based on number of bytes in block of data.
If checksum calculated at receiver’s end doesn't match checksum that is sent at end of the
data block, then an error has occurred.
Echo Check




Data is transmitted.
data is then returned to sender.
sender compares data sent with the data received back.
If they are different then an error has occurred and data needs to be sent again.
2.3 encryption
 Asymmetric encryption includes the use of public and private keys
 Data before encryption = plain text
 Encryption key used to scramble data
 Encryption key = type of algorithm used
 Data after encryption = cipher text
 Encryption prevents data from being understood by hacker
Process:
 personal details before encryption is the plain text
 The plain text is encrypted using an encryption algorithm
 The plain text is encrypted using a key
 The encrypted text is cypher/cipher text
 The key is transmitted separately (from the text)
 The key is used to decrypt the cypher text (after transmission)
3- HARDWARE
3.1 Computer Architecture
 CPU processes instructions and data that are input into the computer so that the result can
be output
 A microprocessor is a type of integrated circuit on a single chip
CU
 It sends control signals that manage transfer of data and instructions within CPU
 It decodes an instruction using an instruction set
Core



to process an instruction
to carry out a fetch-execute cycle
dual core CPU: can process two instructions simultaneously increasing performance


instruction set is a list of all the commands that can be processed by a CPU and the
commands are machine code
MAR temporarily stores address of next instruction

Program counter (PC) holds address / location of the instruction

The address held in PC is sent to MAR

Address is sent using address bus – PC is incremented

The instruction is sent from address in memory to MDR

Instruction is transferred using the data bus

Instruction sent to CIR
Embedded system
 used to perform a dedicated function
 e.g. domestic appliances, cars, security systems, lighting systems or vending machines.
 Runs on firmware
 Built into a device
 Does not have any additional peripherals
MDR and ALU in fetch-decode-execute
 Data fetched from RAM is stored in MDR
 Data from MDR is sent to ALU to be executed
 ALU performs calculation and logical operations on data
 ALU has a built-in register where it stores interim results of calculations
 After calculations, ALU sends data to MDR
 Data is sent from MDR to be written to RAM
3.2 Input and Output devices
Input devices:
 barcode scanner
 digital camera
 keyboard
 microphone
 optical mouse
 QR code scanner
 touch screen (resistive, capacitive and infra-red)
 two-dimensional (2D) and three-dimensional (3D) scanners
touchscreen advantages:
 Does not require peripherals (mouse or keyboard)
 Number of possible inputs limited / menu driven interface
 Less chance of input error
 Resistant to weather
infrared touchscreen:
 (Infrared) rays are sent across screen
 Has sensors around edge // Sensors capture beams
 (Infrared) rays form a grid across the screen
 (Infrared) ray is broken (by a finger blocking a beam)
 Calculation is made (on where beam is broken) to locate the ‘touch’
 Co-ordinates are used to locate the touch
Capacitive touchscreen:
 Conductive layer
 An electrostatic/electric field is created
 Sensor(s) (around the screen) monitor the electrostatic field
 When touched (electrostatic) charge is transferred to finger
 Location of touch is calculated // Co-ordinates used to calculate touch
 Does not work with gloves as stops the electrostatic field from being changed as blocks
charge from finger
 Could use conductive stylus so charge will be changed
Resistive touchscreen:
 Uses two/multiple layers
 When top layer touched / pushed two layers make contact
 Circuit is completed when layers touch
 Point of contact is determined/calculated
barcode scanner:
 Shines light / laser at barcode
 Light is called an illuminator
 Light is reflected back
 White lines reflect light
 Black lines reflect less light/absorbs light
 Sensors detect the light
 Different reflections / bars will give different binary values
 A microprocessor interprets the data
Barcode advantages in store:
 barcode identifies a (unique) product
 barcode can be used to look up product (in a database)
 data about stock levels can be stored on a system
 stock can be automatically deducted from the system
 can check stock is below a certain level // check stock level
 automatic re-order // Alerts when stock is low
 automatically update new stock level
 to locate if an item of stock is available in another location
QR code:
 Read/scanned using app (on mobile device)
 It is the camera that is used to scan/capture the image
 The three large squares are used to define the alignment // uses alignment targets/modules
 Black squares reflect less light // white squares reflect more light
 The app/device processes the image
 Each small square/pixel is converted to a binary value
Output devices:
 actuator
 digital light processing (DLP) projector
 inkjet printer
 laser printer
 light emitting diode (LED) screen
 liquid crystal display (LCD) projector
 liquid crystal display (LCD) screen
 speaker
 3D printer
Inkjet printer
 Cheaper cost of printing per page
 Faster printing speed
 Lower quality of images printed
LCD screen
 Higher resolution
 More visible pixels
 Image is brighter
 Colours are more often accurate
LED screen
 Runs at cool temperature

Bright screen



Uses large amount of tiny mirrors
Each mirror creates pixel in image
Used to display image on a wall
DLP
Sensors
 acoustic
 accelerometer
 flow
 gas
 humidity
 infra-red
 level
 light
 magnetic field
 moisture
 pH
 pressure
 proximity
 temperature
Scanner
 A light is shone onto the surface of the document
 The light is moved across/down/under the document
 reflected light is captured (using mirrors and lenses)
 The reflections are converted to binary
3.3 Data Storage
Virtual memory




virtual memory is needed to create 3D models to extend RAM capacity , to stop 3D
modelling software from freezing/crashing when physical RAM is full, to allow computer to
process large amount of data required for 3D modelling.
Hard drive is partitioned to create virtual memory
When RAM is full pages of data that are not required are transferred from RAM to virtual
memory
When the data is required again the pages are transferred back to RAM
Storage
 Primary storage is directly accessed by the CPU
 Secondary storage is not directly accessed by CPU and is necessary for more permanent
storage of data







ROM



RAM


Magnetic storage uses platters which are divided into tracks and sectors, Data is read and
written using electromagnets, magnetic field stores binary value, cheaper, more longetivity
Optical storage uses lasers to create and read pits and lands, disc is rotates, laser beam is
used, makes indentations on surface of disc, pits and lands represent binary values
Solid-state (flash memory) uses NAND or NOR technology. Transistors are used as control
gates and floating gates, uses less power
Pages of data are transferred between RAM and virtual memory when needed
Cloud storage can be accessed remotely in comparison to storing data locally
Physical servers and storage are needed to store data in cloud storage
Off-line storage: non-volatile, portable, CD
Needed if device needs to store boot-up instructions or if device needs data that should not
be deleted.
Primary storage
Volatile
Primary storage
Non-volatile
Cloud storage
 Storage consisting of servers that are often in a remote location, that are often
maintained/backed up by a third-party company
 Storage that is normally accessed using a network (often the internet)
3.4 Network Hardware
Mac Address
 A network interface card is given a MAC address at point of manufacture
 MAC addresses are usually written as hexadecimal
 MAC addresses are created using manufacturer code and the serial code
 used to identify a device
 it is a unique (address)
 does not change
 it is set by the manufacturer
 the first part is the manufacturer ID
 the second part is the serial number
IP Address
 An IP address is allocated by network and they can be static or dynamic
 consists of values between 0–255 / 0–FFF
 values are separated by full stops / colons
 can be public or private
 can be IPv4 / have four groups of digits
Router:
 A router sends data to a specific destination on a network
 A router can assign IP addresses
 A router can connect a local network to the internet
 Uses IP address to send data only to its correct destination
4- SOFTWARE
4.1 Types of software and interrupts
 System software provides the services that computer requires, including operating system
and utility software
 Application software provides the services that user requires
 Application softwares directly run on the operating system
 The operating system is run on the firmware
 The bootloader (firmware) is run on the hardware
Operating system functions
 managing files
 handling interrupts
 providing an interface
 managing peripherals and drivers
 managing memory
 managing multitasking
 providing a platform for running applications
 providing system security
 managing user accounts
interrupts
 interrupt = signal sent from device that requests processor time
 Software interrupts include division by zero and two processes trying to access same
memory location
 Hardware interrupts include pressing a key on the keyboard and moving mouse
Freeware
 Software is still covered by copyright
 Free trial
 User not allowed to access source code so cannot fix bugs
Free software
 User has access to source code so can make changes
 Cost can be applied but not necessarily
Shareware
 Trial version of software for limited time
 Free of charge
 Limited features
4.2 Types of language
Syntax = Structure of language statements in computer program
High-level
 Easier to read/understand/write
 Easier to debug
 Code is portable
 not able to directly manipulate the hardware
 may need to wait for translation before running
 program may be less efficient
 uses natural language
 needs translator to convert into machine code
Low-level
 e.g. assembly language
Assembly language
 written using mnemonic codes
Compiler
 translates whole code at once before executing it
 produces an executable file
 provides an error report for whole code if errors are detected
interpreter
 translates and executes the code line-by-line
 stops execution when an error is found
IDE functions
 IDE = Software that provides useful functions for a programmer writing a computer program.
 code editors
 run-time environment
 translators
 error diagnostics
 auto-completion
 auto-correction
 prettyprint

5 INTERNET
5.1 Internet and WWW





The internet is the infrastructure
The world wide web is collection of websites and web pages accessed using internet
A URL is a text-based address for a web page; it can contain the protocol, the domain name
and the web page/file name
URL converted into IP address by being sent to DNS which looks up corresponding IP address
Browser send URL to DNS, DNS finds IP address, DNS returns IP address to browser, browser
sends request to web server
ISP






Provide access to the internet
Usually charge a monthly fee
Monitor usage
Give users an IP address
Determine bandwidth
Supports domain names




Provide security services
Provide web hosting facilities
Provide access to Email / Mailbox
Provides online data storage
Web browser
 main purpose = to render hypertext markup language (HTML) and display web pages
 storing bookmarks and favourites
 recording user history
 allowing use of multiple tabs
 storing cookies
 providing navigation tools
 providing an address bar
cookies functions
 saving personal details
 tracking user preferences
 holding items in an online shopping cart
 storing login details
HTML
 Structure = layout e.g. head, body
 Presentation = formatting e.g. colour of the font
 Formatting can be changed without needing to alter structure so regular updates can be
made without altering structure
5.2 Digital currency
 A digital currency is one that only exists electronically
 Blockchain, in its basic form, is a digital ledger, that is a time-stamped series of records that
cannot be altered
5.3 cyber security
DDoS attack
 multiple computers are used as bots
 designed to deny people access to a
 numerous requests are sent (to a server) at the same time
 server is unable to respond to all the requests
 the server fails / times out as a result.
SSL




SSL is a security protocol.
Encrypts any data that is sent.
Sends digital certificates which are sent to user’s browser / requested by user’s browser that
contains destination’s public key that can be used to authenticate destination.
Once the certificate is authenticated, transaction will begin.
Anti-virus
 Scans the computer system for viruses
 Has a record of known viruses
 Removes any viruses that are found

Checks data before it is downloaded and stops download if virus found/warns user may
contain virus
Anti-spyware
 Scans the computer for spyware
 Removes any spyware that is found
 Can prevent spyware being downloaded
Firewall
 Monitors traffic coming into and out of the computer system
 Checks that traffic meets any criteria/rules set
 Blocks any traffic that does not meet the criteria/rules set
Biometrics
 Data needed to enter is unique to individual therefore it is very difficult to replicate
 Lock out after set number of attempts
2-step verification
 Extra data is sent to device, pre-set by user making it more difficult for hacker to obtain it
 Data has to be entered into the same system so if attempted from a remote location, it will
not be accepted
Phishing
 Legitimate looking email send to user
 Encourages user to click link
 Link directs user to fake website
Pharming
 Malicious code installed into user’s hard drive
 Code will direct user to legitimate looking web page
 User encouraged to enter personal details
Proxy server:
 Prevents direct access to the webserver
 Sits between user and webserver
 If an attack is launched it hits the proxy server instead // can be used to help prevent DDOS
// help prevent hacking of webserver
 Used to direct invalid traffic away from the webserver
 Filters traffic
 If traffic is valid the data from the webserver will be obtained by the user
 If traffic is invalid the request to obtain data is declined
 Can block requests from certain IP addresses
Spam:




Junk / unwanted email
Sent to large numbers of people
Used for advertising / spreading malware
Fills up mail boxes
6 AUTOMATED AND EMERGING TECHNOLOGIES
6.1 Automated systems
 Sensor sends data/signal to microprocessor
 Data/Signal is converted from analogue data to digital data using ADC
 Value to compared to stored value
 If value is outside range, microprocessor sends signal to output device
 Process is continuous
6.2 Robotics
 Robotics is a branch of computer science that incorporates the design, construction and
operation of robots
 Examples include factory equipment, domestic robots and drones
Robot characteristics
 a mechanical structure or framework
 electrical components, such as sensors, microprocessors and actuators
 programmable
 can be used in industry, transport, medicine, agriculture, domestic, entertainment
 more efficient than a human
 more accurate than a human
 can lift larger and heavier equipment than a human
 can replace humans working in a dangerous environment
 reduces running costs, such as wages and overheads
 can produce consistent results/output
 can work 24 hours a day // do not need to take breaks.
6.3 Artificial intelligence
 AI is a branch of computer science dealing with the simulation of intelligent behaviours by
computers
Expert systems
 Expert systems have a knowledge base, a rule base, an inference engine and an interface
 Machine learning is when a program has the ability to automatically adapt its own processes
and/or data
 Components: rule base, interface, inference engine
 Expert systems need knowledge base to generate facts and make decisions

To
Download