Paper 2 Flashcards
Ascii
- American Standard Code for Information Interchange
- A character encoding standard
- 7 bits per character - room for 128 characters (2^7)
- Can only represent English
Unicode
- Can represent thousands of characters
- 16 bits per character
- Developed as a response to the limitations of ASCII
- Allows characters from all major lanuages to be represented
- Uses a lot more storage
What is image size?
- width x height
- Image size is the total amount of pixels that make up a bitmap image
- Higher the image size, the higher the quality
What is colour depth
- Number of bits per pixel
- The higher the colour depth, the more detailed the image is
How to calculate bitmap file size
- Image size x colour depth
How is sound digitalized
- Sound is normally produced analogue (can’t be used in a computer)
- We digitalize sound by taking samples
- Take samples of the amplitude at regular time intervals
What is the sampling rate
- The number of samples taken per second
- Measured in Hz
- The higher the sample rate, the closer to the original sound wave the digital version looks
What is the sample resolution
- Number of bits per sample
How to calculate file size (sound)
- Rate x resolution x seconds
What is the aim of compression
- To reduce file size
- Shorter transmission times, more data stored on a device
What is LOSSY data compression
- Loses some parts of the file permanantly (irreversible)
- Used for sound and images and some quality can be lost
What is LOSSLESS data compression
- Just rearranges the file to be stored in a more efficient way or encodes it in a different format
- Used for documents
- Reversible compression
How is Huffman coding done
- Gives the most frequent characters the shortest code
- Start from the top of the tree
- Binary - 1 on right, 0 on left
Run Length Encoding (RLE)
- Stores data in frequancy-value pairs
- EG: AAABBBCC = 3A3B2C
High level code
- Like written in English
- More readable
- Portable - can run on many CPUs
- Much slower
- Allow easy debugging
Low level code
- Easier to optimise
- Specific to CPUs - every CPU has its own low level code
- Machine code and assembely code (machine is binary, assembely is a step above)
- Allows direct control over the hardware
What does an assembler do
- Assembley code to machine code
What does a compiler do
- High level to machine code
- Translate all of the code
- No source code needed to run
- Will not stop if errors - bad for debugging
What does an interpreter do
- High level to machine code
- Translates one line at a time
- Source code needed to run
- Will stop if error - good for debugging
Components of the CPU
- ALU - carries out maths and logic calculations
- Control Unit - coordinates the F-E cycle and decodes instructions
- Cache - small, fast memory that briefly holds data the CPU will need
- Clock - produces a regular signal to synchronize items
- Bus - wires that connect components
Von Neumann Architecture
- Design that uses all of the CPUs components
Fetch - Exectue cycle
- Fetch: next instruction is fetched from the RAM into the CPU
- Decode: CPU works out what needs to be done
- Execute: instruction is carried out, any additional data is fetched
RAM vs ROM
- RAM is volatile, ROM is non-volatile
- RAM holds open programs and data, ROM contains the program that the computer needs to boot
- We can’t change ROM
Wired vs wireless network
- Wired: less prone to interferance, greater reliability and bandwidth, fixed range
- Wireless: fewer wires, flexible, easy to add more devices
Star vs bus topology
- Star: reliant on the central node, easy to add new devices
- Bus: simple and cheap to set up, low performing (many collisions)
Types of cyber threats
- Pharming - redirecting a user to a fake website
- Social engineering - tricking humans
- Phishing - getting information via fake messages
- Blagging - inventing fake scenarios
- Shouldering - observing people enter passwords
- Malwares - malicious software
- Virus - replicates when host runs
- Trojan - hides inside useful software
- Outdated software - weaknesses can be exploited
Detection and prevention of cyber threats
- Penetration testing: white box (internal attack - has knowledge) and black box (external attack - has no knowledge)
- Firewalls - check packets of data and block them if they don’t meet rules
- Mac address filtering - access can be granted and denied based on the device
- Biometrics and captcha - checking it is the right human
- Automatic software updates to keep software up to date
Data table key terms
- Record = row
- Field = column
- Primary key = uniquely identifies a record
- Foreign key = primary key from another table
SQL select query
SELECT Field
FROM Table
WHERE Condition
ORDER BY Field ASC/DESC
WHERE table.primaryKey = table.foreignKey
Why do computers use binary?
- CPUs consist of billions of little transistors. Transistors can only be in a state of on or off
Hexadecimal
- Base-16 number system
- Made up of 16 digits
What is a nibble?
- A group of 4 digits
- 1 hexadecimal digit can represent up to 4 digits (1 nibble)
Why do we use hexadecimal?
- Easier to read than binary with big numbers
- Uses less digits to store bigger numbers than binary
What is a bit pattern?
- A collection of binary numbers
Bit vs byte vs nibble vs megabyte
- 1 byte = 8 bits
- 1 nibble = 4 bits
- 1 megabyte = 1000 bytes
Left shift vs right shift
- Left shift multiplies by 2
- Right shift divides by 2
What is a bitmap?
- An image made up of lots of small squares, called pixels
- A pixel is a singular point in an image and is stored as binary code
How does image size and colour depth effect file size?
- The higher the image size, the greater the number of pixels in the iage and therefore, the greater the number of bits required to store
- The greater the colour depth, the greater the number of bits stored per pixel