Computer Science 1.1-1.6 (Paper 1) Flashcards
You can edit cards if I forgot something, flashcards based on the OCR J277 spec document
1.1.1 - What happens in the Fetch stage of the FDE cycle?
Address of next instruction is loaded into MAR and PC is incremented by 1
1.1.1 - What is the ALU and what does it do?
Arithmetic Logic Unit - performs arithmetic and logical calculations
1.1.1 - What is the CU and what does it do?
Control Unit - Decodes instructions and organises the other registers
1.1.1 - What is the cache and what does it do?
Smaller, volatile primary storage which is faster to access than the RAM and stores frequently used instructions
1.1.1 - What are registers?
Specialised units in the CPU which store one piece of information each
1.1.1 - What is the MAR and what does it do?
Memory Address Register - stores the current memory address where data is to be retrieved from or stored to
1.1.1 - What is the MDR and what does it do?
Memory Data Register - stores the data that’s been retrieved from or will be stored to memory
1.1.1 - What is the PC and what does it do?
Program Counter - keeps track of the current instruction and increments which each clock cycle
1.1.1 - What does the accumulator do?
Stores the results of calculations
1.1.1 - What is the difference between data and an address?
Data is a value used in calculations, whereas an address describes where in memory the data is stored
1.1.2 - What are the 3 factors affecting CPU speed?
Clock speed, cache size, number of cores
1.1.2 - How does clock speed affect CPU performance?
A higher clock speed means more FDE cycles can be performed every second, so the CPU performs better
1.1.2 - How does cache size affect CPU performance?
A larger cache means more instructions can be stored with a faster access time, so it takes less time to retrieve instructions on average, leading to each instruction taking less time to execute on average ==> higher CPU performance
1.1.2 - How does number of cores affect CPU performance?
More cores allow the CPU to run more FDE cycles in parallel, increasing the CPU performance
1.1.3 - What is an embedded system?
A computer system which is designed for a specific purpose, e.g. automatic thermostat in a fridge, traffic lights. It is also part of another machine or computer.
1.1.3 - What are the typical characteristics of embedded systems?
Fast and efficient, streamlined for one task, low memory capacity
1.2.1 - Why do computers have primary storage?
It is faster to access than secondary storage
1.2.1 - What is RAM and what are its characteristics?
Random Access Memory - volatile, fast access time, random access (any part of it can be accessed at any time), low storage (usually around 4-16GB)
1.2.1 - What is ROM and what are its characteristics?
Read Only Memory - non-volatile, very small (a few MB), contains the boot loader which loads the OS from secondary storage
1.2.1 - Why might virtual memory be needed in a system?
So the system doesn’t crash if it runs out of space in RAM
1.2.1 - What is virtual memory?
When the RAM is full, part of the secondary storage is used as temporary RAM - processes currently in use have priority to be in RAM
1.2.2 - Why do computers have secondary storage?
To be able to store information in a non-volatile way, i.e. it won’t get wiped when the computer switches off
1.2.2 - Name 3 types of secondary storage
Optical, Magnetic, Solid-state
1.2.2 - What are the advantages of optical storage?
Shock resistant, lightweight, portable, low cost
1.2.2 - What are the disadvantages of optical storage?
Low capacity, vulnerable to scratches, requires an external device to read/write
1.2.2 - What are the advantages of magnetic storage?
Durable, high capacity, medium cost
1.2.2 - What are the disadvantages of magnetic storage?
Moving parts so vulnerable to shocks, not very portable
1.2.2 - What are the advantages of solid state storage?
Portable (USB flash memory), high capacity, shock resistant since no moving parts
1.2.2 - What are the disadvantages of solid state storage?
High cost, limited number of read/write cycles
1.2.3 - Why is data stored in binary?
Binary can be represented by on/off switches, making calculations and storage easier and more efficient
1.2.3 - How many bits are in a nibble?
4
1.2.3 - How many nibbles are in a byte?
2 (8 bits)
1.2.3 - How many bytes are in a kilobyte?
1024
1.2.3 - How many kilobytes are in a megabyte?
1024
1.2.3 - How many megabytes are in a gigabyte?
1024
1.2.3 - How many gigabytes are in a terabyte?
1024
1.2.3 - How many terabytes are in a petabyte?
1024
1.2.3 - Order the data units from bit to petabyte
bit, nibble, B, KB, MB, GB, TB, PB
1.2.3 - How do you calculate required storage capacity given a number of files and their size?
file size x number of files
1.2.3 - How do you calculate the size of a sound file?
Duration (s) x Sample rate x bit depth (+ metadata)
1.2.3 - How do you calculate the size of an image file?
Colour Depth x Width x Height (+ metadata)
1.2.3 - How do you calculate the size of a text file?
Bits per character x Number of characters (+ metadata)
1.2.4 - What is the range of one byte of data in denary, binary and hexadecimal?
255, 11111111, FF
1.2.4 - What is the most significant bit and why?
The leftmost bit because it has the highest value
1.2.4 - What is the least significant bit and why?
The rightmost bit because it has the lowest value
1.2.4 - How do you peform a binary left shift?
Move each bit to the left, ‘chop off’ the remainder
1.2.4 - What is the effect of a binary left shift?
Multiplies the number by 2
1.2.4 - How do you perform a binary right shift?
Move each bit one place to the right, ‘chop off’ the remainder
1.2.4 - What is the effect of a binary right shift?
Divides the number by 2
1.2.4 - How are characters represented in binary?
A character set is used, so that each character corresponds to one binary value taking up a certain amount of space
1.2.4 - How is the number of different characters stored in a character set limited by the bits available?
One byte for each character only allows for 256 different values, or 256 characters, etc.
1.2.4 - Describe ASCII
ASCII uses 1B per character, allowing for 256 different characters, however only using 128, which doesn’t allow for international languages or all punctuation signs, but is more memory efficient
1.2.4 - Describe Unicode
Unicode uses 2B per character, allowing for 65,536 possible characters, allowing for all international characters and emojis, but is less memory efficient than ASCII
1.2.4 - How are character sets logically ordered?
The value of B is one more than A, the value of 7 is one more than 6, etc.
1.2.4 - How are pixels stored in binary?
Each pixel has a specific colour, represented by a specific binary code (hex codes)
1.2.4 - What is the effect of changing the colour depth of an image?
Increasing the colour depth increases the quality and increases the image size
1.2.4 - What is the effect of changing the resolution of an image?
Increasing the resolution increases the quality and increases the image size
1.2.4 - What does metadata do?
It stores additional information about the file, such as file type, image width, bit depth, etc.
1.2.4 - How is analogue sound stored in binary?
The amplitude of the sound wave is taken at specific intervals and stored as a binary value, the size of which depends on bit depth
1.2.4 - What is sample rate measured in?
Hertz (Hz)
1.2.4 - What is bit depth?
The number of bits available to store each sample in an audio file
1.2.5 - Where may compression be needed?
Transportation of files, uploading and downloading files from the internet, archiving files
1.2.5 - What are the advantages of lossy compression?
Makes the file smaller than lossless compression
1.2.5 - What are the disadvantages of lossy compression?
Some information is permanently lost; file quality decreases
1.2.5 - What are the advantages of lossless compression?
The same quality is retained
1.2.5 - What are the disadvantages of lossless compression?
File is made less small than lossy compression