Theory Flashcards
Define the term operating system. [1]
A set of programs through which a computer manages/controls its own resources
Outline the function of the ALU. [1]
Part of a processor that performs arithmetic and logical operations
Outline the relationship between binary and hexadecimal. [2]
Binary is base 2, whereas hexadecimal is base 16;
Each hexadecimal digit can be represented by a group of 4 binary digits;
Describe the characteristics of a stack. [2]
Data structure;
Which can only be accessed at one end/LIFO (last in first out);
Identify two applications of a stack in computing. [2]
Translations of one programming language to another;
Used in calculations;
State three advantages of using sub-programs while solving programming problems. [3]
A large program can be broken into smaller pieces;
A sub-program could be written independently;
Easier maintenance;
What does the MOD function do?
Basically just finds the remainder.
Static vs Dynamic [2]
Fixed size for static, and only has one data type;
Dynamic structure can change in size, and the data type isn’t fixed;
How does post-order traverse?
Put the apple on the right of the node;
What are stacks, linked lists and queues? (static or dynamic?)
Dynamic;
Why is dynamic structure good?
Make memory allocation more efficient, by only using as much as is necessary, while also allowing the programmer to design more flexible algorithms, where the size of a data structure is not known before runtime.
What is the role of the MDR? [2]
Holds the content of the memory;
Which is to be transferred from the memory to the other CPU components;
What is the importance of Memory Management function? [3]
Allocates and deallocates memory;
Allowing more programs to run concurrently;
Provides memory protection;
Define recursion [1]
A function/algorithm that calls itself;
Describe the characteristics of a queue [2]
FIFO;
Items can only be added to one end and removed from the other end;
Explain the benefits of Binary Search Trees (BST’s) compared to a stack when finding specific item;
The data in a binary search tree is ordered;
Each element in a stack has to be checked;
Which for large data sets will be ineffeicient;
Explain the purpose of cache memory [3]
Cache memory is a small-sized type of volatile computer memory;
that provides high-speed data access to a processor;
and stores frequently used computer programs, applications and data;
Applications of stacks [2]
Evaluating arithmetic expressions;
Parsing;
Outline the function of an OS in managing primary memory [2]
The operating system (OS) makes sure that each running program always has enough memory for its data;
The OS assigns memory to programs by freeing up space in the computer’s memory;
Outline the need for a translation process from high level language to machine code [2]
So that the computer can excecute the program;
As the computer only understands machine code;
What is an xor gate? (own understanding)
An XOR gate is the same as an or gate, just with the exception that 1 and 1 is 0, not 1.
Identify 3 operating management techniques.
Multitasking;
Virtual memory;
Interrupt;
Paging;
Application of queues;
Playlist queue;
Super market queue;
Print queue;
What is a child node?
A child node is a node that has up to two links to other nodes and has only one parent node.
What are the steps of traversing using post order tree traversal?
Start from the root node;
If the root is null, return immediately;
Traverse left subtree;
Traverse right subtree;
Visit root;
What are the steps of traversing using in order tree traversal?
Start from the root node;
If the root is null, return immediately;
Traverse the left subtree;
Visit the root node;
Traverse the right subtree;
What are the steps of traversing using pre-order tree traversal?
Start from the root node;
If the root is null, return immediately;
Visit the root node;
Traverse the left subtree;
Traverse the right subtree;
What are the differences between primary storage and secondary storage?
Primary Storage is volatile, cache memory or some other specialized hardware to store data as the computer is on;
Primary storage stores data that is currently in use;
What is the difference between bubble and selection sort algorithms?
Bubble sort swaps adjacent items;
Selection sort finds the next smallest (each time it checks);
What is the difference between non-binary and binary trees?
A node on a non-binary tree can have as many subtrees as it wants, however, a node on a binary tree can only have 2.
Describe the steps needed to calculate the sum of all numbers held in a circular linked list.
Initialize a variable sum 0;
Loop from beginning to the end, until all nodes get traversed;
Add current number to the total sum;
End when the end node is pointing to the header;
Compare the use of arrays and linked lists.
Arrays are fixed in size, while linked lists can expand and contract their size;
Elements are stored consecutively in arrays, whereas in linked lists it is stored randomly;
Outline the role of the data bus.
Data bus transfers data from from-to CPU to be processed ;
Address bus carries address of memory storage to be written;
What is the purpose of cache memory?
Is used to save time in accessing RAM;
Compare the uses of static and dynamic data structures [3]
Static data structures have a predetermined number of elements, whereas in dynamic structure the does not have to be defined in advance;
Static data structures has limited size, the amount of memory available is the only limit in dynamic structures;
In static data structure, elements can be directly accessed. Whereas in a dynamic data structure elements have to be accessed sequentially which takes longer;
Define the term bit [1]
Bit is a binary digit, and the smallest unit of data. Can be 0 or 1.
Outline the role of an address and data bus [2]
Data bus is a physical connection to transport data from-to CPU to be processed;
Address bus is a physical connection to transport an address of memory storage where data (transported in the data bus) should be read/written;
Describe how a system uses paging [3]
memory management method that uses secondary memory to increase the amount of
primary memory;
transfers data blocks of the same size (“pages”);
from secondary storage to main storage when they are required;
and returns them to secondary storage when they are not;
State the part of the CPU that performs the decoding [1]
The CU;
Outline the function of the MAR [2]
Stores the address of the next instruction to be fetched;
To be written/read to RAM;
Describe the steps involved in using the bubble sort algorithm as a way to sort an array [4]
Loops through array;
Comparing each pair of adjacent item;
Swaps if required (if in wrong order);
Ends until there is no more swapping required;
Describe one difference between queues and stacks [2]
Queue is a first-in-first-out (FIFO) data structure;
and stack is last-in-first-out (LIFO) data structure;
Why is hexadecimal used in computing? [1]
Hexadecimal numbers are used for shorter representation of data because a
(modern) byte can be represented exactly by two hexadecimal digits;
Hexadecimal numbers are used for shorter representation of data, because
computers store and handle binary digits, and four binary digits make one
hexadecimal digit;
Outline what is virtual memory [1]
Virtual memory is a memory management capability of an OS;
that (uses hardware and software to) allow a computer to compensate for physical memory shortages by temporarily transferring data from random access memory (RAM) to disk storage;
What are the collection functions?
addItem( data ) = add data item to the collection
.resetNext() = start at the beginning
.hasNext() → tells whether there is another item in the list
.getNext() → retrieves a data item from the collection
.isEmpty() → check whether collection is empty