Paper 2 Flashcards
What is an algorithm?
An algorithm can be described as “A set of steps that show how to perform a task or reach a goal”.
What is Binary search?
Binary search is an efficient algorithm for finding an item from a sorted list of items.
How does Binary search work?
It works by repeatedly dividing in half the portion of the list that could contain the item, until you’ve narrowed down the possible locations to just one.
What is linear search?
A linear search is the simplest method of searching a data set. Starting at the beginning of the data set, each item of data is examined until a match is made. Once the item is found, the search ends. If there is no match, the algorithm must deal with this.
What are the types of translators in computer?
Compiler
Interpreter
Assembler
What is the compiler?
A compiler translates a high-level language into machine code
What is the interpreter?
An interpreter is another type of program that translates a high-level language into machine code
What is the assembler?
An assembler translates assembly language into machine code. Assembly language is a low-level language written in mnemonics that closely reflects the operations of the CPU .
What are 2D arrays?
A two-dimensional array is similar to a one-dimensional array, but it can be visualised as a grid (or table) with rows and columns. Positions in a two dimensional array are referenced like a map using horizontal and vertical reference numbers. They are sometimes called matrices.
Examples of High-level Programming languages:
Python, Visual Basic, C#, Java, C++, PHP, Delphi, Logo
Examples of Query languages:
SQL
Examples of Markup languages:
HTML, XML
Examples of Low-level Programming languages:
Assembly language
What does Assembly language do?
Assembly language allows a programmer to create programs more easily than writing in machine code
What does Assembly language have to do?
Translate into machine code before can be executed