theory Flashcards
why do computers use binary
- circuits in a computers processor are made up of billions of TRANSISTORS
- a transistor is a tiny switch that is activated by the ELECTRONIC SIGNALS it receives
- the digits 1/0 used in binary reflect the ON/OFF states of a transistor
units for data storage
1 bit b = 1/0
1 nibble = 4b
1 byte B = 8b
1 kilobyte kB = 1000B
1 megabyte MB = 1000kB
1 gigabyte GB = 1000MB
1 terabyte TB = 1000GB
Kites Make Great Toys
overflow error
error from attempting to represent a number thats too large for the registers available
eg biggest 8b number is 255 - so over 8b cant be represented
binary > decimal
place values
128, 64, 32, 16, 8, 4, 2, 1
eg 7 = 0000 0111
binary addition
1 + 0 = 1
1 + 1 = 0 carry 1
1 + 1 + 1 = 1 carry 1
hexadecimal uses
colour
MAC address
why humans use hexadecimal
- simpler to remember
- quicker to write/type
- less likely to make errors (fewer digits)
- easy to convert hex to binary
hexadecimal
base-16 number system
uses 0-9 and A-F to represent numbers from 0-15
hex > decimal
place values 16, 1
multiply left hand by 16 then add right hand
eg hex 37
= 16x3 +7
= 55
decimal > hex
divide by 16 to get left column
remainder = right column
eg 27
= 27/16 = 1r11
= hex 1B
binary > hex
splits into 2 nibbles of 4b
convert each nibble into hex using
8, 4, 2, 1 place values
eg 1110 0101
= 8+4+2= 14 4+1=5
= E5
hex > binary
split hex characters
convert into binary using 8, 4, 2, 1 place values
eg 3B
3 = 0011
B = 11 = 1011
= 0011 1011
binary left shift
x2^no. bits shifted
binary right shift
/2^no. bits shifted
standard ASCII
American Standard Code for Information Interchange
encodes 128 characters into 7b codes
includes 0-9, A-Z, a-z, punctuation
extended ASCII
encodes 256 characters into 8b codes
includes accents
1 character = 1B
limitations of standard ASCII
- encodes 128 characters into 7b codes
- only covers Latin alphabet
- those who don’t use latin alphabet cant communicate eg Chinese, Greek, Arabic
advantages of ASCII
- uses English language so it can store all alphanumeric characters
- takes less space as it has only 128 characters
unicode
first 128 characters are the same as ASCII
unicode was developed to use 16b per character to represent 2^16 characters
can also use 32b per character to represent 2^32 characters
advantages of unicode
can represent more characters such as other alphabets and emojis
useful for global communication
disadvantage of unicode
uses up more storage / data
how pixels make up an image
- make up bitmap images
- each pixel is a single colour and given a binary value which represents that colour
- the smaller the pixels the better the quality
- a pixels colour can be changed by changing the binary value
pixel
smallest identifiable area of an image
make up bitmap images
resolution
concentration of pixels within a specific area
(area is defined by image width x height in pixels)
eg 72ppi is a typical screen resolution
colour or bit depth
- no. bits used to represent each colour
- higher bit depth = greater range of colour
- a pixel is given a no. bits (n)
- the no. combinations (2^n) dictates the bit depth and number of colours represented
1b = 2 colours
8 b = 2^8 colours
file size
resolution x bit depth
or height x width x bit depth
eg 20 x 20pixels and 8 colours
= 20 x 20 x 3 = 1200
higher resolution and bit depth = better quality but larger files
meta data
data about data
info other than the image data stored within a file
eg colour depth, resolution, date created, author
analogue sound
continuous waves
(one constant line)
digital sound
discrete waves
digitised by measuring and recording sound waves
(blocks at diff amplitudes)
analogue > digital converter
converts inputs to digital signals
sound sample
a measure of amplitude at a point in time
sampled using sample resolution (bit depth) and sampling rate
sampling rate
no. samples taken per second
1Hz - 1 sample per second
usually 44.1kHz
greater sample freq. = greater the accuracy + file size
(more samples = more bits)
sample resolution (b depth)
the no. bits used to record each measurement
increased bit depth = better quality (can represent more sound + height of wave is accurately measured) = greater file size
usually 16b = 2^16 values
file size of sound
sampling rate x sample resolution x duration (secs)
character set
a list of the characters and the binary codes used to represent each one
eg ASCII or UNICODE
compression
reducing the file size using an algorithm
used to:
- send files with smaller size
- store files with less storage (cheaper)
- send files faster
- reduce download size
lossy compression
removes info permanently
removes info less likely to be noticed by human eye
significant file size reduction can not be converted back
lossy compression eg
JPG
MP4
MP3
never text - would delete characters
can be used for video, music, photos
lossless compression
reduces file size sometimes
doesn’t loose any info
file can be converted back (data is restored exactly like it was originally)
lossless compression eg
PNG
PDF
GIF
TIFF
FLAC
can be used for images, text, music
lossless algorithms (2)
RLE - run length encoding
huffman trees
RLE
uses freq. / data pairs to encode
each run length of the same coloured pixel
eg 1 = - and 0 =.
-…- = 10001 = 11 30 11
useful on simple images not text (can increase file size)
huffman trees
analyse freq. that characters are used
characters are placed in binary tree structure with most frequent at top
how to work out file size reduction
original - new size / original
benefits of compression
- smaller files = fewer packets = faster transmission (quicker + reduced traffic)
- reduces download times (streaming possible)
- images on web pages appear faster
- reduces space on disk/ servers
boolean operators
NOT
OR
AND
XOR
truth tables
shows what happens if each combination of true / false is used
boolean logic
in which the answer is true or false (only 2 states)
1 = T
0 = F
AND logic gate
both conditions true = true
P = A AND B
P = A.B
=D-
NOT logic gate
condition is false = true
P = NOT A
P = Ā
=>-
OR logic gate
one or more conditions are true = true
P = A OR B
P = A+B
= )>-
XOR logic gate
only one condition is true = true
P = A XOR B
P = A ⊕ B
=))>-
hardware
The physical components that make up a computer system
software
non-physical programs that are stored by and run on a computer system
hardware eg
input - mic keyboard mouse
output -monitor speaker printer
storage - USB stick hard-drive
software eg
word processing software, instant messaging, email, operating system, web browser
computer system
combination of hard+ soft-ware working together
takes a set of digital inputs processes them and creates a set of outputs
input -> process (<->secondary storage) -> output
2 types of software
system
application
software -> system -> (OS or utility programs)
or -> application
system software
provides a platform for other softwares to work
e.g. OS or utility programs
application software
apps that allow use to perform tasks as the general user (play games, write essays)
operating system
processor management
storage management
memory management
input/ output device management
application management
security management
multitasking
application managment
controls access to apps the user instals
allows user to use authorised programs
allows user to install/uninstall apps
manages software updates
copies the program to and (allocates it to)an area of their RAM
memory management
-lets data be copied onto main memory
-keeps a record of where each program and data is (easy and fast to access)
- makes sure not to overwrite existing files
multitasking
Allows multiple tasks to run simultaneously (without would only ever be able to do one thing)
provides a task manager - can see what current task is taking up space / memory on the CPU (can then close this task to run efficiently)
peripherals
external components to a computer system e.g. keyboard
interrupts
signals sent to the CPU by external devices to indicate an event that needs immediate attention
e.g. mouse click ->response is opening document
- hardware interrupts - by hardware device e.g. printer out of paper
- software interrupts - by program - error message displayed
network
connection between 2 or more devices to share info / communicate
stand alone
not on a network can’t share or communicate with other devices
5 ways user managment is used on your schools network
- provides and username/ password - only allows those authorised to access your files on school network
- provides access rights - not all can access certain files or areas
- secondary storage can’t be used / accessed so virus’ aren’t downloaded onto the network
- users restricted from installing new software which prevents introduction of malware or software conflicts
- settings/ profile managed by administrators
utility software
perform extra functionality + housekeeping tasks to keep computer running efficiently
utility software eg
encryption software
defragmentation software
data compression
disk clean up tools
anti- virus software
encryption software
used to encode text so cannot be understood without a key to decode it e.g. files/passwords
data compression software
makes files smaller in size
to reduce storage space and send files using less data
disk clean up tools
scans + finds files no longer needed
finds duplicate files
deletes and frees up space
anti virus software
detects harmful files from infecting devices with malware
warns + informs of dangers
(prevents getting virus)
quarantines + removes virus
can’t fix harm caused by virus
disk defragmentation software
reorganised files so they are stored together
read faster and new files don’t need to be fragmented
embedded system
A computer system with one dedicated task ( no multitasking)
built into a physical device
e.g. camera, microwave, washing machine, card reader, toaster, oven, traffic light
what is a programming language
used to give a series of instructions to devices to perform a specific task
two levels of programming languages
low-level e.g. machine code assembly language
high-level e.g.python, Java
macine code
binary instructions (1,0) slow and inefficient what the computer understands
each processor only understands its own type of machine code - can’t use apple apps on a samsung (diff processor types)
assembly language
allows the programmer to create programs easily
uses mnemonics and simple instructions to get the machine to do something
shorter and easier to understand
processor specific
used for embedded systems
assembler
translates assembly language into machine code
high level languages
use statements close to English or maths making it easy to write programs to solve problems
it is machine independent so can work on other devices
translated into machine code by a compiler or interpreter
+ of high level languages
Machine independent
easier to understand
easier to debug
easier to learn and written faster
- of low level languages
not machine independent
hard to understand
hard to debug
+ of low level languages
can run quickly
require less memory
statements in low-level languages can control specific hardware
2 types of translator for high level languages
interpreter
complier
interpreter
- translate and runs one line at a time
- Has no output as it runs the program straight away
- slow to run as is translated every time it’s run
- user need an interpreter installed
- user can see and copy the source code
- used for program development
e.g. python idle
compiler
- translates whole program to execute later
- outputs object code (machine code) which can be used later
- Run fast as it is already in the machine code
- user does not need a compiler installed to run software
- user cannot see the source code when distributed
- used for software that is run frequently or sold to third party
computer system
sores/ processes a set of inputs producing an output
CPU
Processes instructions
brains of the computer runs one simple instruction at a time
can run billions instructions per second
collects instructions from RAM and sends data back to RAM for storage (fetch decode execute cycle)
stored program concept
The idea of storing the program instructions as well as the data in the memory (von Neumann architecture)
parts of the CPU
control unit
ALU
register
cache
control unit
controls and coordinates activities taking place in the CPU
decode and executes
receives signals
ALU
performs operations on data
arithmetic operations (maths) and logical operations (comparing data)
registers
Store small amounts of data + results the CPU is currently working on
temporary storage is emptied once a CPU is finished and sends data to RAM
cache definition
stores data or instructions that are most commonly used so is faster to access
clock speed (processor speed)
Number of clock cycles per second (Hz)
1 cycle per sec = 1Hz = 1 instruction
todays CPU have a clock speed of 3.6GHz which is 3.6 bill cycles per sec
buses
set of parallel wires connecting two or more components of a computer
system bus is made of three types address bus, data bus, control bus
CPU is also connected to external devices by buses
can be one directional or bidirectional
control bus
Send signals between devices to ensure the correct devices are communicating
insures instruction data received and sent to correct location
BIDIRECTIONAL
address bus
stores the address/location of the memory slot where the instruction need to be collected from and data stored
ONE DIRECTION
data bus
carries data/instructions throughout the computer system
BIDIRECTIONAL
3 factors affect CPU performance
clock speed
processor cores
cache
multi-core processor (no. processors)
dual core has two processors
potential to perform two instructions at once
A dual core processor of 1 GHz means 2 1GHz processors which is 2 GHz
why dual processors dont always perform 2 instructions at once
Software can’t take full advantage of two cores (sequential processing)
parallel processing - programs can be run simultaneously split between different cores (multi core is better)
sequential processing - programs run in sequence so can we only processed by one core (single core is fine)
cache memory
A small amount of fast expensive memory in the CPU
can be accessed faster than RAM
stores recently/frequently used data
Level one - small but fastest located on the CPU
level two - fast but slower than ever one but more data - given to each core
level 3 - slowest but most storage faster than ram
fetch decode execute cycle
Fetch
-The control unit reads the memory address of the next instruction
-the instruction is copied from memory to one of the registers in the CPU
Decode
-the control unit decodes the instruction to work out what it is so it can be executed
Execute
-the instruction is carried out-data may be read from/written to RAM
memory
stores inputs / outputs
for a computer to work efficiently
storage
User stores files and information
nonvolatile long-term permanent
motherboard
ROM
RAM
CPU
hard disk drive
when device is switched off
Only ROM and hard disk drive store data ROM permanently stores instructions for device start-up (bootstrap)
hard drive permanently stores OS apps installed and files
when device is switched on
CPU wakes up and starts to process data from the start up instructions it receives from ROM
then the
Hardrive sends instruction to load OS to RAM which sends to CPU
than CPU loads OS which was stored in the hard drive
(fetch decode execute begins to happen constantly)
when the user turns off the device
RAM clears all contents so computer is fast when used again
hard disk keeps all existing apps and files stored and saves any new apps or files
ROM retains start up instructions ready to use (never deleted)
CPU go to sleep
2 types of primary memory
RAM
ROM
RAM
DATA AND INSTRUCTIONS IN USE
Volatile (data doesn’t stay clear when powered off)
can write from and written to
fast access and hard drive
Stores: OS part in use, software in use, data software is using
hard drive
stores OS permanently
nonvolatile (doesn’t lose data powered off)
typically 1- 3 TB
Slow to access and hard to locate data cheaper
why does data / OS load to RAM
hard drive is further and slower to access
has lots of unused data stored so it’s hard to locate data
reading/writing is slower
virtual memory
when RAM gets full a section of the hard drive starts working as RAN
ROM
Used to store data
Read only
Nonvolatile
Stores
- bootstrap - initial program run when computer is turned on
- BIOS - controls basic tech config of computer ( processor speed, system time)
purpose of CPU (4)
-processes data and instructions
-brain of the computer
-runs on instruction at a time (runs billions per second)
-collects instructions from RAM and sends data back to RAM (fetch decode execute)
fetch (2)
-control unit reads memory address of instruction
-insturction is copied from memory into CPU registers
decode (1)
-control unit decodes instruction to work out what it is and what to do
execute
- instruction carried out
what does teh ALU do (2)
- performs arithmetic operations -+x/
- performs logical operations AND OR < =
emmbeded system (2)
-a computer with a specific single purpose
-built into a physical device
(held in non volitile memory)
embeded system eg
microwave
oven
traffic light
washing machine
camera
RAM vs ROM (4)
ROM-nonvolitle ~ RAM-volitile
ROM-read only ~ RAM-read/write from/to
ROM-cheaper ~ RAM-expensive
ROM-stores bootstrap +BIOS ~ RAM-stores data/OS/instruction in use currently
whats held in RAM
OS part in use
software in use
data software is using
factors that affect CPU performance
- no. cores
- cache size
- clock speed
cache
- more cache means more frequently used data is stored near the CPU
- the means its faster to access rather than fetching it from RAM
- level1 cache means its closer so is fastest to be accessd
clock speed
- determins number of cycles per sec (Hz)
- 1Hz = 1 cycle per sec = 1 instructions per sec
- faster speed = more instructions carried oht and a faster comouter
no. processor cores
- multiple cores means the POTENTIAL to perform two instructions at once
- (sequential processing cant take advantage of multiple cores)
- more cores = more instructions at once = fater procsessing
storage method 3
magnetic
optical
solid state
magnetic storage 4
HDD/magnetic tape
- has platters
- that spin
- has read/write arm
- magnetic field determines binary value
magnetic storage +3/ -4
+ large storage
+ cheap
+ fast read/write
- lots of parts
- not durable
- sealed unit ( cant fix easily)
- not portable
optical storage 4
CD/ DVD/ BluRay
- is a disk
- binary represtented using pits/lands
- laser shines on - pits reflect light differently to determine binary value (read)
- laser makes indents on disk (write)
optical storage +3/ -2
+ cheapest
+ portable
+ small
- less storage
- easily scratched
solid state storage 3
SSD
- sends current which forces electrons through a barrier
- and traps them in floating gates
- binary data is stored by the held electrons
(flash memory)
solid state +5 / -1
+ no moving parts (durable
+ fastest read/write
+ fast start up
+ quiet
+ don’t need to defrag
- expensive
ssd vs hdd
- hdd moving parts (less durable)
- hdd slower to read/write
- ssd less long read/write life
- ssd expensive + less data
cloud storage4
- storing data in an off site storage system online
- files send to sever connected to internet and maintained by a third party
- servers use hdd/ssd
- data accessed via internet
computer network 2
2 or more connected computers
to communicate transmit exchange or share data/ resources (files/printers)
stand alone
not connected to a network
internet 3
group of interconnected networks
collective ownership
services use it (web, mail)
world wide web 4
uses internet
information system of linked web pages
accessed via web browser
uses HTTP to send / retrieve data
WAN 4
Wide Area Network
- networks in diff geographical location
- networks connected so computers can communicate uses resources supplied by 3rd party - BT
- uses cables satellites or radio waves
- internet is largest wan
IP address
- given to devices by network
- identifies devices on network
- routes packets to destination
- can change depending on location
e.g. 72.129.214.16
data packets
data broken into small pieces to be transmitted
contains:
- sender/receiver IP address
- packet no.
- no. packets
- actual data/message
flow through diff internet routes (prevent traffic)
put together at end in order
NIC 2
Network Interface Card
- allows communication between devices
- in every networked device
MAC address 3
Media Access Control address
- assigned to NIC
- never changes
- routers use to send packets
e.g. 3B:14:E6 - it’s in hex
router
looks at packet destination and sends to network close to destination
switch
connects nodes
seds packet to correct computer
wireless connection 3
- broadcasts radio waves to communicate
- connect via WiFi
- susceptible to interference
WAP
Wireless Access Point
- allows wireless devices to join network
wired connection
ethernet cables
wireless 3+
- no cables
- easy to connect new devices
- can have portable devices
wireless -5
- less reliable
- if many devices use th WAP connection is slow
- speed is slow far from WAP
- less secure
- affected by interference e.g. furniture
fundamental network hardware
cables (ethernet)
switch
router
WAP
LAN 2
Local Area Network
- operates on single location
- have own cabling system to a switch
network 3+
- share data / resources
- any device can accessed files saved centrally
- back up easy as files are stored on servers
network 3-
- expensive hardware
- management is complicated (have to employ maintenance people)
- malware can infiltrate network and all computers
topology
the way system parts are connected
star topology
all connected to central switch/ hub
bus topology
all connected to main cable (bus)
bus 3+ 3-
+ less cable (cheaper)
+ easily add devices
+ if central switch fails the whole network doesn’t go down
- Single cable shared by all devices so many collisions (slow)
- if this cable is damaged whole network fails
- any device can view all data on the cable - bad security
star 3+ 3-
+fast data transfer
+ if one cable fails other cables not affected
+ Devices can’t view other devices data
- requires hardware - switch
- if switch fails whole network is down
- harder to add more devices
ethernet
Standard local networking rules
describes how devices format data for transmission
E.G. copper coaxial and fibre-optic
do computers transmit data simultaneousely
Computers wait till the quiet connection before transmitting data - no traffic
copper cable
+ CHEAP
- adequate speed - for low bandwidth
- affected by electrical interference
- loss of signal over distance
fibre optic cable
+ FAST - greater bandwidth
+ FAR - less affected by distance
+ signals travel by light waves - so not affected by emag. signals
- higher cost for cabling
PAN
Personal Area Network
- connects computer devices near a person
- via Bluetooth
bluetooth
- wirelessly can connect devices over short distance
- uses radio waves
- MAC address used to pair devices
network security methods
authentication
encryption
firewall
MAC address filtering
authentication
Checking the user is allowed to access content
E.G.password biometrics two factor authentication pin pattern
encryption
data can be intercepted - encryption prevents the data from being interpreted
- HtTps:// means it’s secure
Encoding data using an
algorithm so it cannot be understood
symmetric encryption
same key used to encrypt/decrypt data
Key is private and given to the recipient
asymmetric encryption
two key (public+private) is used to decrypt more secure as the private key is never sent
firewall
Separates a trusted an untrusted network
Can be hard or software
packet filter - packets are checked to see where it’s coming from or going to packets that don’t match the rules are dropped
firewall features 5
- monitors packets in/out of network
- can allow/block traffic based on security rules
- prevent an attacker getting access to the network
- filter IP address - blocks malicious websites
- port blocking - prevent access to ports on a network
MAC address filtering
- can block access devices identified by Mac addresses
- MAC address never changes I need to find the device at manufacture
protocol
set of rules
server
computer program/device that provides a service to another computer program + user (or the client)
HTTP
hypertext transfer protocol
for accessing + recieving web pages via. Internet (written in HTML)
the protocol requests a web page from the web server
(the server sends its response containing the web page)
HTTPS
secure HTTP
encrypts info so it cant be understood
used by banks, online shops, social networks - for personal data
FTP
file transfer protocol
used for sending/ retrieving files to/from a server
SMTP
outgoing
email software sends to the server
server relays the message via mail relays
email arrives at destination server
POP/ IMAP incoming
fetch message data from remote server
POP
Post Office Protocol
downloads new message to local device (no longer on server)
IMAP
Internet Message Access Protocol
leaves messages on server
can be accessed by many devices
removed if user deletes them
- sent using SMTP to local server
- local server forwards to remote webmail server
- stored on webmail server
- can be accessed by POP/IMAP
TCP
Transmission Control Protocol
- breaks up messages into packets
- reassembles packets
- detects errors
- resends lost messages
IP
Internet Protocol
- routes packets from one IP address to another
protocol stack
defines 4 layers enabling communication on the internet
(modular design each layers responsible for a part in the communication process)
- application layer
- transport layer
- internet layer
- link layer
sending
the app used to send decides the protocol used
- computer app produces data to send
- data split into packets
- data sent + routed
- physical hardwire + cables
application layer
apps create data to send in this layer
SMTP - email
FTP - upload files to website
HTTPS - banking
transport layer
creates connection between 2 computers (hosts)
- agree on communication settings + packet size
- data divided into packets
- packets reassembled by recipient
- lost packets resent
(TCP, UDP)
internet layer
routes packets (uses routers)
source and destination address written on packets for transmission (IP)
link layer
physical hardware located here: NIC, cables/WIFI, device drivers
(MAC , ethernet, WiFI)
recieving
data packets move back up layers
- link removes MAC address
- internet layer removes IP address
- transport layer reassembles packets
- application layer uses correct protocol to display data, web page or email
layers +
self contained
- functionality can be changed without affecting other layers
diff hard/software operates on a layer providing interoperability between providers/systems
- manufacturers routers operating on the Internet layer can operate with another manufacturers NICs on the link layer
- senders and receivers using diff soft/hardware can communicate using same layer protocol
UDP
User Datagram Protocol
maintains open data connection to send a stream of packets without checking they’re received correctly - UNRELIABLE
(online gaming, video streaming)