comp Flashcards
Define ‘hardware’
All physical parts of a computer system.
Define ‘software’
All the computer programs of a computer system.
What is system software?
Runs a computer’s hardware and applications.
operating system
utility software
What is utility software?
Keeps computing device in working order and safe.
What is an operating system?
Allows hardware to interact with applications.
What is application software?
Helps user perform specific tasks
runs on operating system
What are the roles of an operating system?
Allows user to interact with hardware, manages memory, file management, communicates between application and hardware.
What is the role of the ALU?
Arithmetic logic unit, carries out calculations and logical decisions.
What is the role of the CU?
Controls how data and instructions move around the CPU.
What is the role of the clock?
Synchronizes all components using a steady pulse.
What is the role of buses?
Collections of wires that transport instructions/data around components.
What is the Fetch-Decode-Execute cycle?
Fetches data or instruction from RAM, inspects and decodes it using registers, executes it, and goes back to RAM to grab more data.
What factors affect CPU performance?
Clock speed, cache size, number of cores.
What is main memory?
Internal memory for temporary things. RAM, cache, registers are volatile; ROM is non-volatile.
What is secondary storage?
External memory for permanent things, all non-volatile.
What is the role of secondary storage?
To permanently store data, data backup, archiving, cost efficiency.
How does optical storage work?
A laser burns pits and lands, a less powerful laser shines and reflects representing instructions in binary.
Pros: thin, lightweight, portable; Cons: low capacity, slow to access data; Examples: CD-R/RW, DVD-R/RW, Blu-ray.
How does magnetic storage work?
Magnetic fields magnetize sections of a metal spinning disk. A read/write head moves across the disk surface.
Pros: high storage capacity, quick access, cheap, portable; Cons: moving parts can be unreliable; Examples: Hard disk drive, tape.
How does solid-state storage work?
Flow of electricity forces electrons into floating gates, changes measured as 1 or 0.
Pros: very quick access, no noise, durable; Cons: limited read/write cycles, expensive; Examples: SSDs, memory sticks, flash memory cards.
Define ‘cloud storage’
Remote servers that store data, accessible over the internet.
What are the pros and cons of cloud storage?
Pros: access files from anywhere, automatic backup, easy collaboration; Cons: costly, requires internet access, can be hacked.
Define an embedded system and give an example.
A computer system with a dedicated function inside a larger mechanical system.
Examples: traffic lights, washing machines, fitness trackers.
What is a low level definition?
Languages that a CPU understands, in binary and difficult to debug/program.
What is a high level definition?
Languages that are close to natural languages of humans.
What is the hierarchy of languages?
Python/Java/Pseudocode, Source Code, Assembly language, Machine Code.
What are interpreters?
Translates source code into machine code, one line at a time.
Used for debugging.
What are compilers?
Translates source code into machine code all at once.
Quicker and takes less space; source code compiled on one system won’t work on another.
What are assemblers?
Translates assembly language into machine code.
Define ‘number base’
A system for representing numbers using a specific number of digits.
What is the role of hexadecimal?
Number base of 16, representing large numbers, more readable than binary, defining colors.
How to convert ASCII to Unicode?
Copy over ASCII number, put 2 slashes, convert value into hexadecimal.
Define ‘character set’
A collection of characters that a computer system can use to represent text.
Define ‘pixel’
Short for ‘picture element’, it’s the smallest unit of information in a digital image/display.
Define ‘analogue’
The physical quantities/form.
Define ‘data compression’
The process of reducing the size of data by encoding it using fewer bits than the original representation.
Define ‘algorithm’
A series of steps to complete a task.
What is an assignment?
Colour ← blue; CONSTANT PI ← 3.142; colour = (‘blue’); PI = 3.142.
What are arithmetic/relational/boolean operations?
9 DIV 5 = 1 (without the remainder); 9 MOD 5 = 4 (the remainder itself).
What is random number generation?
Python: ‘import random’; variable = random.randint(1, 10); Pseudocode: variable = RANDOM(1, 10).
Define ‘efficiency’
The speed and the memory required to store an algorithm.
How to compare efficiencies?
Less lines, more efficient.
Define ‘data type’
Classification of data which tells the system how the user intends to use the data.
Define ‘iteration’
A programming statement that repeats code.
Define ‘selection’
A programming concept that allows the flow of a program provided a condition is met.
Define ‘subroutine’
A small separate program that executes a commonly used specific task within the main program.
How to find the length of a string?
LEN(‘computer science’) in pseudocode.
How to use the index?
Example = (‘ritisha’); print (example[3]).
prints ‘i’
How to cast one data type to another?
Python: write data type and open bracket; Pseudocode: CHAR_TO_INT.
How to make substrings?
Example = (‘Newcastle’); substring = example [1:2:7].
Starts at position 1, goes in 2s, ends at position 6, not 7.
What are the pros of subroutines?
Saves time, saves code, possibilities for decomposition, easier to read, maintain, debug, and use in other programs.
What is the role of parameters?
Enable you to have temporary values for local variables in subroutines.
How to do ‘subroutines’?
Python: ‘def’ variable:; Pseudocode: ‘PROCEDURE’ variable; content of procedure; ‘END PROCEDURE’.
Define ‘data structure’
A way of storing and organizing data to make it easier to access and manipulate.
Define ‘global variables’
A variable that is accessible throughout the entire program, including inside functions.
Define ‘local variables’
A variable that is defined within a function and can only be accessed inside that function.
Define ‘validation’
Checking that the data entered is correct and the right data type.
Define ‘authentication’
Checking that the person is who they claim to be.