Week 1 - Computers, Data And Algorithms Flashcards
At the most abstract level, what do Computers do?
They receive user input, process data and with the processed data, create information for storage and/or output.
What are the characteristics of modern computers?
They operate on numerical data represented as digits and they are usually general purpose.
They are able to save, store, load, unload, compile and integrate source code.
What is an example of non-numerical data?
Words. They are symbols and considered symbolic data.
What is the difference between numerical and non-numerical data?
Numerical data are numbers. They can go from -infinity to +infinity. They have mathematical properties.
Words do not have an absolute answer.
What is the definition of General Purpose/ Turing Complete?
You are able to load different instructions (algorithms) into the same machine.
Turing complete because you can solve all types of computational tasks.
What is an analog signal?
An analog signal is purely continuous and represents a range outside discrete data.
What is an example of an analog signal?
Sound, light, vinyl players, film
What is digital data?
It is a sequence of discrete values. It breaks down data into intervals.
Computers operate on what sort of data? How does a computer recognise text?
Binary data (0s and 1s)
Text is represented as binary data.
What is the problem of NOISE
When you record analog data, it captures different intensities.
When you record digital data, it is represented as a binary and therefore, cleaner and more resilient to noise.
Evaluating analog vs digital: what are the trade offs?
Analog: capturing in a continuous, hard boundary
[-] potentially pigeonhole things
Digital: you are breaking information captures into something discrete.
[-] You may lose some of the edges, lose some information
[+] lands itself well for computing
[+] more precise
What are the 3 Data Types?
- Numbers (Integers and Floats)
- Boolean (True or False, binary)
- Character Bytes
What is Character Encoding?
It is the process of assigning numbers (1,2,3…) to symbolic characters (a,b,c…) allowing them to be stored, transmitted and transformed using digital computers.
What is an example of Character Encodings?
ASCII table represents the Latin alphabet. UTF-8.
You need to install these encodings into the computer.
What is UTF-8?
ASCII could only represent the Latin alphabet and was seriously limited because there are way more characters in the world other than the Latin alphabet. UTF-8 helped to solve that issue by varying the length character encoding. This enabled more interoperability.
What is a file?
It is a self-contained piece of information/resource.
What is a format? What is an example?
Standards for encoding/decoding information in a file type. Universal file formats (standards) are pdf. Jpg. Png.
What are the 2 types of files?
Binary File: allows you to contain other things
Text File: allows you to only save text files
What are computer systems composed of?
Hardware and Software
What does Hardware mean?
Hardware represents the physical material components of the computer system
What does Software mean?
Software represents the non-material components e.g., application software
What are the basic hardware components?
- Central Processing Unit (CPU)
- Read Only Memory (ROM)
- Random Access Memory (RAM)
- Storage
- Motherboard
- Input/Output devices (I/O)
What does the CPU do?
Does all the numerical and logical processing - the brain of the computer
ROM vs RAM
Memory is needed to hold data in the interim
ROM: memory cannot be overwritten - fixed. An example, how the computer boots up
RAM: different working data. Loaded and unloaded.
Motherboard
Circuit board that connects the different hardware components together (CPU, storage etc)
Inputs and Outputs
The external devices such as the keyboard, mouse etc.
What are Algorithms?
They are a well-ordered collection of unambiguous and effectively computable operations that when executed produces a result (solves a problem) and halts in a finite amount of time.
Well ordered, unambiguous, effectively computable
Well ordered: must follow a fixed sequence, pre-determined
Unambiguous and effectively computable: works on numerical, Boolean logic
How do you solve a problem using computation?
First, break down the problem into a numerical problem. This is your input.
What is a computer program?
A computer program is the implementation of an algorithm so that it can be executed by a computer
What is a source code?
Source code for programs are typically written in a high-level programming language which is human readable (Java, C+)
How do you implement an algorithm?
You write the source code. it is a matter of mapping the instructions into programming language
Operators of Boolean logic
AND, OR, NOT
Combinatorial/sequential logic: when there are multiple conditions (A and B and NOT C)
Truth Table: mapping out 1s and 0s to give you answers
What are executable files?
Containers that has all the necessary files to run the instructions
How to form an executable file?
The source code for a program is compiled into an object code by a compiler. The object code files are then linked to form an executable file.
Executable programs are
Files containing machine code in binary form
Machine code is
machine specific
What is an interpreted program? What are its pros and cons?
Interpret (or dynamic) programes refers to source code that is not machine specific. Source code is executed directly by an interpreter, skipping the building phase completely. Source code is compiled into byte code and executed by a “virtual machine”
Pros: More portable
Con: Runs slower than compiled program
What is an Operating System?
An OS is a system software that runs every time the computer is started. The OS kernel manages hardware devices through firmware and device drivers; loads programs and data into memory and sends instructions to the CPU
What is the word for running a computer program?
Process
Processes are managed by?
The OS
Program’s code and any data required for manipulation or processing is loaded into?
The RAM
The CPU runs a ____cycle?
Fetch/execution
Users typically interact with computers through a?
Graphical user interface (GUI)
Command Line interface (CLI)
What are the pros and cons of the GUI?
Pros: doesn’t expose the commands to the user; more user friendly
Cons: might limit what you can do with the machine; lower affordability
What are the pros and cons of the CLI?
Pros: Customisable, more permutations
Cons: only works if you KNOW the commands
What are Application Programming Interfaces (APIs)?
Software interface that exposes services to other software developers so that they can write programs that use those services.
What does an API allow you to do?
It allows for integration of software and sometimes to expose data within databases.
What is the definition of a deterministic system?
Always produces the same output every time it is given the same input or initial state
What is an example of a deterministic system?
A machine/computer. It follows an algorithm which is well-ordered, numerical, unambiguous and Boolean.
When does non-deterministic behaviour arise?
Non-deterministic behaviour can arise as a side-effect when deterministic programs are run concurrently or in parallel at the thread or instruction level.