Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
38 Cards in this Set
- Front
- Back
What is found in a CPU? (4) |
A Control Unit and an Arithmetic Logic Unit (As well as registers & a cache for temporary storage). |
|
What is the ALU built from? |
Logic circuits (CMOS transistors on a silicon wafer). |
|
What does the ALU do? |
It carries out fundamental operations from a fixed set (its instruction set architecture). |
|
What are the ALU inputs? |
Data & Control - control signals determine which operation produces the correct output. |
|
What happens on a CPU clock cycle? |
The next instruction is fetched from the memory address stored in the program counter. The instruction is executed. The program counter is updated. |
|
What do RISC & CISC stand for? |
Reduced Instruction Set Computers & Complex Instruction Set Computers. |
|
What are the pros of a CISC machine? (2) |
The compiler can produce much more compact code. Instructions will not have to be fetched as often. |
|
What are the cons of a CISC machine? (3) |
Are expensive to build. They have slower CPU clocks. Their instruction lengths vary. |
|
What are the pros of RISC machines? (3) |
Cheaper to build. Faster CPU clocks. Instruction lengths are (fairly) uniform. |
|
What are the cons of RISC machines? (2) |
Compilers have to be more advanced. Instructions have to be fetched more often. |
|
What are the different kinds of CPU instruction? (3) |
MOVE (e.g. STORE or LOAD). Arithmetic/Logic instructions. Control instructions (e.g. JMPEQ). |
|
What is two's complement? |
An integer representation form, where (in the BM) the numbers 0 to 127 are themselves & the numbers 128 to 255 represent the integers -128 to -1. |
|
How is a floating point represented in the BM? |
The first bit is the sign. The next 3 bits are the exponent, e (interpret as an unsigned integer and take away 8). The final 4 bits are the mantissa, m (interpret as an unsigned integer). The floating point is (+/-) m*2^e. |
|
How many characters does ASCII represent? |
256 characters - all also represented in UTF-8. |
|
What is assembly language? |
A more convenient way of representing machine instructions (by using mnemonics for opcodes and symbolic names for memory locations). |
|
What does an assembler do? |
Translates assembly language into machine code, sometimes rearranging instructions for efficiency (without changing the output). |
|
Why do high level languages use abstraction? |
It allows for greater portability & ease of reading/writing. |
|
What do compilers do? |
They translate a high-level source language into a lower-level target language. |
|
What are the steps a compiler takes? (5) |
Lexical analysis - splitting input into tokens. Preprocessing - used in C to assign macros. Syntax analysis - grouping tokens into statements & other program structures. Code generation - creating output in target language. Code optimisation - rearranging/editing code to be more efficient. |
|
What are the methods for transferring data into a register? (3) |
Immediate addressing - data stored as part of the instruction. Direct addressing - data stored in a memory location. Register indirect addressing - data stored in a memory location, which is stored in a register. |
|
Which addressing methods can also be used for transferring data from a register? (2) |
Direct & register indirect addressing. |
|
What happens before a procedure is executed? |
The return address (program counter) is saved to memory. The program counter is changed to the start of the procedure. |
|
What happens after a procedure is executed? |
The result of the procedure is stored in a special place in memory. The return address is restored and execution continues from where it left off. |
|
What are bitmapped (raster graphics) displays? |
Displays that are divided into pixels which each take up a small portion of the screen. |
|
How are the pixels changed? |
They each have row & column values and are associated with some memory, which when changed changes the pixel. |
|
How many bytes are used for each pixel (in modern PCs)?
|
3-4 bytes; 3 for the RGB values and (possibly) 1 for transparency. |
|
Why can code modify itself?
|
Because data and programs are stored together in memory. |
|
What is self-modifying code good for? |
Protecting against piracy. |
|
What is an operating system? |
A program that abstracts from some physical & logical details of a machine. It provides a UI to start programs from & helps programmers make efficient use of the machine. |
|
What is Linux? |
An OS - it is a member of the UNIX family. It is open source, has a command line interface and (sometimes) a GUI. |
|
What is Windows? |
Another OS - under commercial control by Microsoft. It has a GUI known as a WIMP interface (window, icon, menu, pointer) & has a CLI. |
|
What is an OS made up of? |
The kernel and the shell. |
|
what does the kernel do? |
It manages the computers resources. Its services include memory management, task management, file management and device management. |
|
What does memory management consist of? |
Managing virtual memory, allocating memory to programs & protecting against malware. |
|
What does task management consist of? |
Launching processes, managing the process table, handling interrupts, setting program privilege levels & carrying out time-slicing & context switching. |
|
What does file management consist of? |
Responding to program requests to open/close & read/write files, setting/checking permissions & handling buffering. |
|
What does device management consist of? |
Using device drivers to handle requests to read/write & open/close devices.
|
|
What does the shell consist of? |
A number of programs which allow access to files. It is supplied things from the kernel. |