A piece of software that takes source code and converts it to machine code
Machine code
The binary representation of an instruction, split into the opcode and the instructions data
Assembly code
Uses text to represent machine code instructions, or mnemonics
Components of a processor
ALU - Arithmetic Logic Unit
CU - Control Unit
MU - Memory Unit
Control Unit (CU)
Manages the execution of machine code by sending control signals to the rest of the computer. Control signals are sent via a control bus to connected devices, such as hard drives or the graphics card.
Clock speed
The measure of how quickly a CPU can process instructions
Memory Unit
Pulls instructions and data from main memory into the registers for processing
Arithmetic Logic Unit (ALU)
Responsible for carrying out logical and mathematical operations e.g. division, multiplication
Memory Unit (MU)
Stores currently running programs, current files and the operating system. The fetch–decode–execute cycle describes the whole process of executing a single instruction.
Control bus
Carries signals around the CPU, generated by the CU to coordinate the fetch-decode-execute cycle
Address bus
Carries memory addresses from the processor to primary memory
Data bus
Carries data and instructions to and from the CPU and RAM in a Von Neumann processor
Processor speed
Measured by the number of clock cycles the processor can perform in a second, measured in hertz (Hz)
Converting binary (base 2) to decimal (base 10)
Steps to convert
Hardware
The physical parts of the computer, both internal and external
External hardware components
Monitor
Mouse
Keyboard
Printer
Internal hardware components
Processor
Hard disk
Memory chips
Sound cards
Graphics cards
Circuitry to connect devices
Software
Any program that can be run on a computer
Assembler
A program that translates assembly language into machine code
Interpreter
A program for translating a high level language by reading each statement in the source code and immediately performing the action
Bytecode
An intermediate code between source code and object code. Bytecode is translated into appropriate instruction code by a virtual machine.
Scheduling
The process of allocating access to the processor and other resources
Memory management
How the operating system uses RAM to optimise computer performance
Virtual memory
When applications need more memory than a computer has, the OS will use a section of secondary storage to mimic RAM
File management
The OS is responsible for managing the files stored and the folders they are stored in
Input/output management
The OS is responsible for dealing with input devices (keyboards, mouse) and output devices (screen, printers)
Debugging
The process of finding and correcting errors
Declaring all variables and constants at the beginning of a program forces you to plan first and allows the computer to quickly identify variables it doesn't recognise
Meaningful variable names
Help identify and trace bugs, allow the programmer to follow the code more easily
Definite iteration
Iterating for a definite period
Indefinite iteration
Iterating until a condition is met
Benefits of breaking a program into manageable blocks
Can be called at any time using the subroutine's unique name
Gain an overview of how the program is put together
Can use top-down approach to develop the whole project
Easier to test and debug as each subroutine is self-contained
Subroutines are useful for group projects with other developers as they help each developer to develop small sections of the project
Subroutine
A self-contained block of code that can do one or more related processes
Function
Like a subroutine but it returns a value
Advantages of functions
Can make the overall code neater and easier to understand
Makes the code less repetitive
Sampling
The process of converting analogue sound waves into a digital form
Sound synthesis
Sound that is produced digitally rather than in analogue format
ADC
Converts analogue data into digital form to get it into a computer
DAC
Converts digital data back into analogue form to hear it from a computer