Computing Flashcards
1 byte in bits
8 bits
Kilo mega giga tera in bytes
1000^1 ^2 ^3 ^4
Kibi mebi Gibi tebi in bytes
1024 ^1 ^2 ^3 ^4
What does processor do
Receives data and follow instructions through ALU and control unit
Also known as CPU
Follow instructions and decide where data should be stored
What does the memory do
Stores data, instructions and results for immediate use
Random excess memory
Data and instructions are stored temporarily so that they can be used by processor
Read only memory
Non volatile data
Needed to start up computer
Secondary storage
Large amounts of data stored
Hard disk or hard drive
Data bus
Bidirectional
Transports data processed in the CPU
Input and output
Input is instructions computer receives
Output is final results produced
Advantages and disadvantages of magnetic
Can store large amounts of data and cheap
But easily damaged when dropped and slower than solid state
Advantages and disadvantages of optical
Can store large amounts of data
But vulnerable to scratches, data on,y can be rewritten once and less storage than magnetic
Advantages and disadvantages of solid state
Fastest, not as vulnerable to scratches and drops, smaller and lighter and quieter
But much more expe
Types of algorithms
Decomposition and generalisation
Decomposition
Break down a complex problem into more manageable parts
Sub problem with helps find solutions to bigger problems
Generalisation
Replace 2 or more similar items into 1
2 approaches to decompose a problem
Incremental approach
Modular approach
Data validation techniques
Length check - Check if input is not too long or not too short
Range check - Check if code is in required range
Presence check - Check if required input is provided
Format check - Ensure input matches arrangement
Error types
Syntax - does not follow rules
Run time - When program hangs or crashes
Incorrect use of command
Logic error - give an unexpected output when incorrect algorithm is written