1/149
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Bit
A single 1 or 0
Binary
Number system which has only two values for each digit
Denary
Number system which used 10 values for each digit
Hexadecimal
Number system which uses 16 values for each digit
MSB
Most significant bit, the bit with the largest value
Overflow
Answer is larger than the number of bits we started with. This produces an error / wrong answer.
Hexadecimal to denary
Convert the digit to denary. Multiply the first number by 16 and add the second number. 4A = 16×4 + 10
Left shift
0011 « 2 = 1100
Can be used to double numbers.
1 left shift = 2×
2 left shift = 4×
3 left shift = 8x
Arithmetic shift
It will preserve the MSB
11001010 » 2 = 11110010
Unsigned number
Positive binary number. Starts with 0
Signed number
Signed number is a negative binary number. Begins with a 1
Sign and magnitude examples
Positive: 01101010
Negative: 11101010
Character encoding
Process of assigning each character a denary number.
Character set
List of all characters recognised by a computer. Includes letters, numbers, symbols and space
ASCII
American standard code. Uses 7 bits to store each character. So it can represent 128 different characters. Only enough for English.
UNICODE
Uses 16 bits (2 bytes) to store each character. It can represent 65536 different characters. This is enough for all languages.
Storing images
Images are made up of pixels. Images have a width and height which makes up the image resolution. Image resolution is number of pixels in an image. Number of bits used for each pixel is colour depth.
Colour depth
Measured in bits. The more bits, the more colours. 2 bit (2²) can store 4 images. Different colours in an image will have different bit patterns. Quality of image will increase the more bits used for colour depth. This also increases file size.
Metadata
Data stored with an image which is needed to reconstruct the image. Image resolution, colour deoth, author, location and file types are examples.
Calculating file size
file size (bits) = width × height × colour depth
Then you have to divide by 8 to get it into bytes. Height × width is resolution.
Analogue
Sound waves are continues → analogue. This cannot be stored digitally so sound must be sampled to be stored digitally. A sample is when the amplitude (height) of a sound is recorded.
Sample rate
How often a sample is recorded. Measured in Hz. The more you sample the more detail so higher quality + increases file size.
Bit depth
This is the number of bits used to record each sample. A higher bit depth means more bits are used per sample which enabled height of wave to be accurately measured. So sampling closer so quality will be better.
Sample interval
Length of time between each sample. Usually fractions of a second. If we have lower sample interval then there is less time between each sample which means better sound quality.
Calculating file size for sound
Bit depth × sample rate × duration
Duration = 20 seconds
Bit depth = 16 bits
Sample rate = 100
20 × 100 × 16 = 32000 bits
32000 / 8 = 4000 bytes
4000/1000 = 4kB
Labelling a sound graph
X axis is time. Y axis is amplitude. Sample interval is between the peak of the wave. Sampling frequency is between the top wave
Sequential
Process unfold in a linear matter. First instruction must be run before second one can run.
Parallel model
Instructions are distributed across two or more processing units. This allows multiple instructions to be run at one time as each instruction is run on an individual processing unit.
Multi agent model
Multiple agents (can be programs, robots, systems) work together, each with their own goals knowledge and actions. They cooperate with eachother to achieve individual or shared objectives. Focuses on coordination and decision making forming basis of AI.
CPU
Connects to other parts of the computer using busses. Runs the instructions of your programs. Only understands binary. Instructions need to be fetched into the CPU from RAM one at a time. Uses FDE for fetching instructions.
Memory address
Integer value which is location within memory where data or instruction can be found.
ALU
Arithmetic login unit. Responsible for running maths and logic instructions (and / or / not). Uses and stores results using the ACC accumulator register
CU
Control unit. Responsible for managing the execution of instructions. It sends control signals to other parts of the computer. Controls timing of instructions
Registers
Located in CPU. Store temporary values used during the execution of instructions. Run at the same speed as CPU.
Data bus
Data can travel both ways. Transports data to and from CPU.
Control bus
Data can travel both ways. Carries control signal to and from CPU.
Address bus
Unidirectional. Transports memory address from CPU to RAM in order to locate a specific data / instruction. Used in fetch in FDE
Von Neumann architecture
One CPU, RAM, storage device, input/output device. RAM will contain both instructions and data such as applications and files.
FDE cycle
Fetch: instructions are fetched from RAM into the CPU one at a time.
Decode: The type of instructions is determined.
Execute: The instructions is run.
Each clock cycle will run one FDE cycle
What affects CPU performance
Clock speed, cache, cores
Clock speed
CPUs use FDE cycle when executing instructions. Number of clock cycles a CPU can do per second. Measured as frequency (GHz). The higher the clock speed the more instructions per second
Cache
Had a higher data transfer rate than RAM. Smaller than RAM. Stores frequently accessed data and instructions. Makes FDE faster because reduces time taken to fetch data. If data not in cache then it takes longer to fetch because we have to search cache and then RAM.
Cores
Two cores run two instructions at once. Each application can run on a separate core so having multiple cores mean that applications can be run at same time. But not all applications can be sped up by having multiple cores. To take advantage of multiple cores it must be broken down.
RAM purpose
Used for temporary data and files currently in use. Faster data transfer than storage. Used to speed up overall performance of computing system. Apps and files are always loaded into RAM before being used.
RAM key properties
RAM is volatile - all data is lost when the power is switched off. It can be read and written. Stores less data than storage device (4Gb → 16Gb)
ROM purpose
Used for storing critical system software needed for running system. Stores BIOS (basic input and output system). Also stores bootstrap. This software is used during start up of computer and located the OS on storage
ROM key properties
Non volatile - all data remains when power is switched off. Only read. Size of ROM is limited only big enough to store bootstrap and BIOS. does NOT store the OS
What is RAM and ROM measured in
Bytes
Units of measurement
1 bit = 1 or 0
1 byte = 8 bits
1 kilobytes = 1000 bytes
1 megabytes = 1000kB
1 gigabyte = 1000Mb
Virtual memory
Used as an extension to RAM, used when RAM is full. A program is moved out of RAM and into secondary storage so part of RAM is freed up for new program / data.
Secondary storage is slower than RAM, overuse of virtual memory will result in decrease in system performance (thrashing)
Slow to fast (cpu, RAM, storage)
Storage, RAM, CPU
Secondary storage
Stores data permanently, stores user files, applications, and operating system. Non volatile, can be read and written. Slower than RAM cuz files are loaded from storage to RAM to be processed
Magnetic
Uses magnetic flux to store data on spinning disks. Used in desktop computers and servers for high capacity storage. Has the largest capacity (Tb). Very reliable. Durability is good when disk not spinning. Mid transfer rate.
Optical
Has 2 parts. Disks which store data and the drives which read the disks. Uses lasers to read data off the disk. Mostly read only. Commonly used to distribute apps games or media like music. Smallest capacity, slowest transfer speed, cheapest, durability is low but is portable.
Solid state
Uses electronic switches to save data commonly used in portable devices. Can also be found in high end laptops, such ad memory sticks. Large capacity. Fastest data transfer. Very reliable, portable and durable
Graphic interface
Makes use of windows, icons, pointers and menus (WIMP). Provides code that allows apps to interact with user using WIMP. Mainly aimed at average user and easy to use
Command line interface (CLI)
Text based interface only. Commands must be known and options so harder to use. Commands give greater control over computer. Mainly used by administrators and technical experts.
Memory management
RAM must be shared amongst all running apps. OS will allocate each app a section of RAM to use. Virtual memory managed by OS.
Multitasking
Illusion apps are running simultaneously but are running sequentially
Processor management
OS decides which process gets CPU access and in which order they run. When waiting it’s held by queue. OS will decide which process is run and how long before it’s added back to queue
Peripheral management
Devices are external from PC. OS manages communication between CPU and devices using device drivers.
Device drivers
Device drivers translate messages to and from hardware so OS will understand. Allowing OS to communicate with a variety of different devices
User management
Allowing users to log in and out the system. Each user has a user area; an area of storage that can only bring accessed by them. Users are grouped together and given different levels of access known as access rights. This includes what files can be accessed and other resources.
File management
Controlling access to files using a file Explorer. Allows files to be opened deleted moved copied created etc. Implements access rights
Utility software
OS contains many small applications → utilities. This is a program that allows the system to be used and maintained.
Sources code
Code the developer writes
High level programming
Sources code is human readable but not for CPU. So must be translated to machine code. High level programming languages are human readable and muh easier to program in like python.
Web development, desktop and mobile apps, game development
High level advantages and disadvantages
Easier to read and write, easier to debug, machine independent so can be used on any computer regardless of architecture
User cannot directly manipulate hardware, slower to process instructions, needs to be translated into machine code before running.
Low level languages
Commonly machine code. Written in binary. Can only understand and execute machine code instructions. Coders use assembly code. Assembly code gives each instruction a mnemonic representation. Used when performance and direct hardware control is crucial.
Writing software, developing core components, programming microcontroller
Low level advantages and disadvantages
Complete control over the system components, uses less memory and instructions can be processed faster, allows direct manipulation of hardware
Difficult to write and understand, machine CPU dependent, knowledge of computer architecture is key to code effectively
Translator instruction set
List of all possible instructions that a particular CPU knows how to execute
Translator
Converts source code into machine code. So converted to binary so CPU understands.
Assembler, compiles and interpreters
Assembler
Translates low level assembly code into machine code. Only needs to be assembled once. Each assembly instruction maps to a single machine code instruction.
Errors are only shown at end. Once compiled source code is no longer needed. Most apps you download will be compiled.
Compiler
Protects source code, compilation is slow but machine code is executed fast. Optimises code during compilations. Easy to debug cuz translates line by line. Translated code us not saved
Compiled programs will only run on one type of computer. Compiled programs are harder to debug. If any changes to source code then it must be re compiled again an can be memory intensive.
Interpreter
One programs can be run on different types of computers. Code is easier to debug and will stop on exact line of code at fault. Requires less RAM to process code.
Runs slower than compiled code because each line is translated before run. Source code may be viewable.
Robust program
Program that anticipates all possible expected and unexpected actions that a user may take and so will not crash. 3 ways of robust programs are validation, verification, code quality.
Verification
Double checks data is typed in correctly.
Ways to improve code quality
Meaningful variable names, using functions, validating user input, adding comments
Vulnerability
Weakness in a computer program. Important to identify these weakness in order to prevent hackers from exploiting a system.
Audit trails
When programs run it often creates an audit trail of actions that have been carried out.
Eg: username that is running code, time and error occurred, any error codes or transaction results, files and networks accessed
Code reviews
A code review allows another programmer to check over code. Allows second person to consider if there are any security problems, suggest better methods or algorithms that could be used, suggest ways that make code easier to understand.
Trace tables
Used to record variable changes as code rins. Commonly used to help debugging.
How to complete:
Read code line by line
When assignment is seen write new value
Print is seen so record output
Explain the effect of changing the MSB of the first binary number.
Overflow error because not enough available bits
Explain why hexadecimal notation is used
Hexadecimal uses fewer digits so it’s easier for humans to remember.
One benefit and one drawback from increasing bit depth audio
B: it increased the accuracy of representation. DB: it takes longer to download and file size increases.
How does a career cipher work?
The positions of letters in the alphabet are shifted positions based on the key.
Explain why data on networks are encrypted
To prevent unauthorised access so data remains confidential making it unintelligible because it is scrambled.
Converting binary to twos complement
Flip the bits and then add 1
Explain the effect of an addition which adds up to 9 bits
An overflow error happens because there aren’t enough bits to store the result.
expression to show the number of bytes
(table h × table w + bit integers) / 8 + 1024
complete the expression to show temperature minimum file size for image in KiB
(colour bit depth × pixel width × pixel height) / (1024 × 8)
Compression
Compressing files allow the file size to decrease and decreases time needed for data to be sent (bandwidth). Lossy permanently removes data whereas lossless data is lost and can be restored.
Lossy
Type of compression which permanently removes data. The advantage is that it’s easier for you to store and transfer images. Disadvantage is your data cannot be restored. JPEG & MP3
Lossless
Type of compression which temporarily removes data which can be restored. Advantage is that the data can be restored and no loss of quality. The disadvantage is that it’s file size reduction is less than the lossy reduction. PNG
Pigpen
The Pigpen cipher is a substitution cipher where each letter of the alphabet is replaced by a symbol derived from a grid. It is used for encryption by substituting each letter with a specific symbol from the grid, making the message unreadable without the key.
Vigenere
The Vigenère cipher is a method of encrypting text by shifting each letter in the message based on a keyword. Each letter of the keyword tells you how many positions to shift the corresponding letter in the message.
Rail fence
The Rail Fence cipher is a transposition cipher that writes the message in a zigzag pattern across multiple "rails" (rows) and then reads off the message row by row. The number of rails determines how the letters are arranged and scrambled.
Run length coding
Run-Length Encoding (RLE) is a simple compression technique that replaces consecutive repeated characters (or "runs") in a string with a single character and a count of how many times it repeats. For example, the string "AAAABBBCCDAA" would be encoded as "4A3B2C1D2A."
ASCII vs Unicode
ASCII, 7 bits to represent 128. Can only represent English.
Unicode, can represent every language and symbol.