Noah's Paper 1 topics Flashcards
To learn all the paper one topics quicks Contents - Computational thinking - Search algorithms - Sorting algorithms - Data types - Operators - Constants and variables - Strings
What are the three types of translators?
Compilers
Interpreters
Assemblers
Remember pneumonic CIA
What does an assembler do?
Assemblers are used to turn assembly language into machine code
What is an embedded system?
An embedded system is a computer built into another system for example in dishwashers TV’s and microwaves
They monitor and control machinery to achieve the desired result eg controlling the water pumps in the dishwasher.
What is the language used for embedded systems?
Assembly code
What are the two types of low-level language?
Machine code - harder for humans to read and write
Assembly code- easier for humans to read and write
What are the properties of Low-level languages?
- One instruction of assembly code represents one instruction of machine code
- Usually written for one type of machine or processor and won’t work on any others
- The programmer has to know about the internal structure of the CPU
- Code is very difficult to read, understand and modify
- Commands in machine code can be executed directly and there is no need for a translator
- You control exactly what the CPU does and how it uses its memory so programs will be more memory efficient and therefore faster
What are the properties of High-level languages?
- One instruction of high-level code represents many lines of low-level code
- The same code will work for many different machines and processors
- The programmer can easily store data in different structures without having to know the memory structure
- Code is easy to read, understand and modify
- Must be translated into machine code before a computer is able to understand it
- You don’t have much control over the CPU actually does so programs will be less memory efficient and therefore slower
What do trace tables help you to do?
Trace tables help you to find logic errors
Name something algorithms are tested for
They are tested for time efficiency
What are the two types of programming errors?
Syntax and logic
Define an algorithm
An algorithm is a set of instructions used to help carry out a task
What do you store lots of similar data in?
An array
Define a one-dimensional array
An array is a data structure that can store a group of data values, of the same type, under one name
Which brackets are used for arrays?
Square brackets
What would this print?
rowers = [John, James, Joe, Júan]
Output rowers [1]
James
What would this do to the array?
rowers[0] = “Joe”
Output rowers
rowers = [John, James, Joe, Júan]
rowers = [Joe, James, John, Júan]
Which element would be outputted from this array?
rowers = [John, James, Joe, Júan]
Output rowers[-1]
Júan
What is a two-dimensional array
They are like a list of lists
What would this output?
bordercrossers = [[‘júan’, ‘carlos’] , [‘sanchez’ ,’ diego’] , [‘jóse’, ‘ miguel’]
OUTPUT ‘the best chef is’ + bordercrossers[1][0]
Sanchez
Because the program calls the item that is number 1 in the array and then calls inside that list the item in 0 and prints that
What are the names of the boolean operators?
AND, OR, NOT
When are FOR loops used?
FOR loops are used when you know how many times you are going to run it
When are WHILE loops used?
WHILE loops are used when you don’t know how many times you are going to run it
What technique does Huffman coding use?
It uses the frequency of each data value
How much storage does one character in ASCII take-up?
1 byte