3 Flashcards
Computer
- Takes some kind of input and processes it to produce and output
- Made up of hardware and software
Von Neumann concept
- Stored program concept - allowed both program instructions and data to be stored together in a computer’s main memory
RAM
- Random-access memory
- Consists of a collection of storage locations, each with its own unique memory address
Control unit
- Decodes instructions received from main memory
- Coordinates the actions of the other parts of the CPU in order to execute them
Arithmetic logic unit
- Performs arithmetic and logic operations on data
Registers
- Proved fast temporary storage for instructions, intermediate results, and data
Instruction register
- Holds the instructions currently being executed
Accumulator
- Holds the results of calculations from ALU
Fetch-decode-execute-cycle
- CPU fetches an instruction from memory
- Decodes the instruction
- Executes the instruction
Address bus
- Carries the address of the memory location that the CPU will read and write to
- Unidirectional
Data bus
- Holds the value being read from or written to memory
Control bus
- Carries command signals from the control unit to other components so that they know whether to read or write data
Cache
- Very fast storage which contains frequently used intructions and data
Clock
- Sends out electronic signals at regular intervals to all the other hardware components in order to synchronise their actions
Fetch
- The control unit places the memory address of the next instruction on the address bus
- It sends a read signal to RAM along the control bus
- The RAM receives the signal and copies the content of the memory location indicated by the address bus onto the data bus
Decode
- The control unit decodes the instruction
Execute
- The control unit sends signals to the other components of the CPU instructing them what to do
Pipelining
- The CPU executes programs more quickly by overlappping the stages of the fetch-decode-execute cycle
Why is secondary storage needed?
- Storage of programs and data when the power is turned off
- Semi-permanent storage that can change
- Backup of data files
- Archive of data files
Magnetic storage + 3
- Data is stored on the surface of a platter as a series of bits
- An area that is magnetised represents a 1 and an area that is demagnetised represents a 0
- To write the magnetic states is altered, to read te magnetic states are detected
1. Has high storage capacity
2. Quick to access data
3. Has moving parts which eventually fail
Optical storage + 3
- Data is stored as pits and lands on the surface of the disk
- A land represents a 1 and a pit represents a 2
1. Low capacitiy compared to other types of storage
2. Slow to access data
3. Thin, lightweight and portable
Solid-state storage + 5
- Uses chips, made of transistors that trap electrons in a pool
- Full pools represent 0s and empty pools represent 1s
1. Medium storage capacity
2. Very quick to access data
3. No moving parts, very reliable
4. No noise, low power
5. Expensive compared to other types of storage
Embedded system
- A computer system with a dedicated function within a larger machanical system
- Designed to perform one particular function
- Small and inexpensive
- Low power consumption
Examples of embedded systems
- Traffic lights
- Domestic appliances
- Factory equipment
- Engine management systems
- Hospital equipment
Internet of things
- A system of interrelated computing devices, mechanical and digital, with the ability to transfer data over a network without requiring human-to-human or human-to-comuter interaction
Operating system
- A program that controls and manages the hardware and all other software on a computer and provides an interface for users
Application software
- Programs or apps designed for end users, such as web browsers, a spreadsheet, a console game, an email client, or a payroll application
Utility software
- Programs that add functionality to a computer system or improve its performance in some way
- Examples: disk repair, compression, anti-malware, encryption
Operating system: File management
- The OS organises and keeps track of files stored on a computer’s secondary storage
- File permissions are used to control who can access a file and what they are allowed to do with it
1. Read
2. Write
3. Execute
4. Delete
Operating system: Process management + types
- When programs are loaded into the computer’s main memory, the OS allocates each of them a share of the CPU
1. First in first out
2. Shortest job first
3. Round robin
First in first out
- Processes queue in the order in which they arrive
Shortest job first
- The proces which is closes to finishing goes next
Round robin
- Each process is assigned a time slice
- Processes wait in the queue
- The process at the head of the queue goes next
- At the end of its time slice, if it is not completed, it goes to the back of the queue
Operating system: Device driver
- A piece of software that relays instructions and data between the OS and the peripheral device e.g printers
Operating system: User management
- OS provides a user interface - graphical user interface (GUI) with windows, icons, menus and pointers
Operating system: Access control
- Determining who is allowed to use the computer system
- Uses passwords or some form of biometric scan such as face recognition
Utility software: file repair
- A file has become corrupt, unrecognisable, or damaged as a result of a cyberattack or a device malfunction
- Scans the damaged file and extracts as much data as possible and stores it in a new file
Utility software: backup
- Backup tool makes a backup of important data and stores it on a different storage device
- Should the file get lost or damaged, it can be restored
Utility software: data compression
- A tool used to compress files to reduce their file size freeing up space
1. Takes up less space
2. Uses less mobile data when sent across network
3. Takes less time to view file
Utility software: disk defragmentation
- Rearranges the files stored on a machanical hard drive to speed up access and consolidate free space
Utility software: anti-malware
- Anti-malware tools are designed to eliminate malicious software from a computer
Utility software: robust software
- A code vulnerability is a flaw in a program that compromises security
1. Not a properly thought-through design
2. Not sticking to agreed coding practices and standards
3. Making do with a temporary fix to a problem
4. Writing unstructured code instead of subprograms
5. Skipping testing
Code reviews
- Review by another programmer - someone with more experience to check for any bad programming practices
- An automated review - a specialist piece of software is used to examine the code. Highlights potential issues such as vulnerabilities
Instruction set
- The instructions that a CPU can execute
High-level language
- Such as Python or Java, has to be translated into machine code in order for the computer to execute
Low-level language
- Assembly language
Mnemonic
- A short memorable keyword which is translated into appropriate binary code
- For example: ADD
Translators
- Input text of program written in a high-level language and output machine code
- Compiler and interpreter
Compiler
- Translates all the code in one go
Interpreter
- Translated and runs one line at a time