2.1 Elements of computational thinking Flashcards
What is abstraction?
When you remove unnecessary details so that you are left with a simplified model that is much easier to understand.
What details remain when something is abstracted?
Only the details that are necessary to understand the meaning of the model / how to use it.
What does abstraction allow us to do?
Focus on only the necessary parts of a program.
Why is abstraction important in programming?
It simplifies solutions, saving time and resources when we write programs. Also, by simplifying the solution, it means that we need less computing power to run abstracted models, which can save money.
What details might you abstract from a photo to make it into a map?
Buildings, trees, bins, signs, cars, people
What might happen if we did not abstract solutions?
Programs might be too complicated to follow and there could be lots of errors made during the writing of it.
What are preconditions?
Preconditions are conditions that are required for your solution to work.
For example a speed camera requires a road and a car travelling along it.
What would the preconditions be for a self scan till.
Items to scan
What would the preconditions be for a card reader?
A card to read
How long does it take to fetch data from RAM?
60 nanoseconds
How long is a processors cycle time?
2 nanoseconds
What is level two cache?
A small memory chip which is built directly into the motherboard which can be accessed in 30 nanoseconds.
What is level one cache?
Memory built directly into the processor which can be accessed at the speed of the processor because there is no memory bus.
What does level two cache store?
Recently accessed data from RAM.
What does level one cache store?
Recently accessed data from level one cache.