0% found this document useful (0 votes)
14 views14 pages

Computer Science Notes (1) (1)

The document provides a comprehensive overview of the history and evolution of computing, detailing significant milestones, key figures, and technological advancements from early mechanical devices to modern computers. It covers computer systems, architectures, software development methodologies, and computational thinking, along with an introduction to the Python programming language. Additionally, it discusses the Internet, cloud computing, and the roles within software development teams.

Uploaded by

lopege8710
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views14 pages

Computer Science Notes (1) (1)

The document provides a comprehensive overview of the history and evolution of computing, detailing significant milestones, key figures, and technological advancements from early mechanical devices to modern computers. It covers computer systems, architectures, software development methodologies, and computational thinking, along with an introduction to the Python programming language. Additionally, it discusses the Internet, cloud computing, and the roles within software development teams.

Uploaded by

lopege8710
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

History of Computing

● Dutch computer scientist E.W Dijkstra - “When all is said and done, the only
thing computers can do for us is to manipulate symbols and produce results of
such manipulations.”
● Computer - A device that can be programmed to carry out general purpose
logical/mathematical computations.
● Programmable Computer - Can be re-programmed to improve solutions, or
adapted when the problem changes. Can even be programmed to solve
different problems.
● General Purpose Computer - Can carry out a wide range of tasks, not built for
a specific purpose.
● Digital Computer - One that operates using digital signals.
● Signals - Used to represent changing information. Used to transmit
information from one place to another. Discrete, can only have a limited
number of values.
● Electronic Computer - A computer that operates through the use of electricity.
● Electricity - The movement of electrons through a material.
● Semiconductor - A material that falls somewhere between a conductor and an
insulator. E.g. Silicone. They can be used to control the flow of electricity
making modern computers possible.
● Modern Computers:
○ Able to carry out general purpose computation via programs.
○ Fairly inexpensive, robust and portable.
○ Have good performance.
○ Relatively good energy efficiency.
○ Fairly durable.
● Abacus - Aid to a person doing computations.
● Computers (people) - As early as the 17th century the term Computers
referred to people doing mathematical calculations.
● Slide rule - 1600s analog computer. Able to calculate:
○ Logarithms
○ Trigonometric functions
○ Squares
○ Cubes and their roots.
● Difference Engine - 1822 Charles Babbage designed a mechanical computer
used to calculate polynomials (x3+2x2+6x+2=0). Solved the problem of human
error in computing. Size of a car, thousands of moving parts.
● Analytical Engine - Charles Babbage, general purpose computer able to store
data on punched cards. Programmes stored on punched cards. Never built.
● Ada Lovelace - First computer programmer. Realised the Analytic Engine
could be used for general purpose computing, wrote programmes for it. Wrote
and published the first algorithm designed to be carried out by a machine.
● Percy Ludgate - Irish, designed a similar machine to Babbage’s Analytical
Engine, smaller and more portable, also never built.
● Turing Machine - Alan Turing, A-machine (automatic machine), a Turing
Machine provided a relatively simple theoretical “machine” that demonstrated
the true power of computing before computers as we know them existed.
Turing Machine consists of four parts:
○ A tape that symbols can be written to and read from.
○ A head that does the reading and writing.
○ A state register that stores the state of the machine at any given time.
○ A table of instructions that tells the machine what to do next, based on
the state of the machine and the symbol being read at the time.
● Vacuum Tubes - Small devices that control the flow of electricity.
● ENIAC - Electronic Numerical Integrator and Computer, First electronic,
digital, programmable, general purpose computer. Operated by plugging and
unplugging cables. Kathleen McNulty, an Irish woman, was one of the first
programmers to work on it.
● Transistors - Small electronic switches, performed the same job as a vacuum
tube but more efficiently.
● Integrated Circuits - Third Generation of Computers, a number of electronic
circuits on one semiconductor, a Chip. Example of one is the AGS (Apollo
Guidance System)
● Microprocessors - Fourth Generation, CPUs. 1971, Intel 4004.
● Personal Computers - PCs made possible by microprocessors with billions of
transistors. Called microcomputers at the time. Commodore, Apple, IBM.
Computers now usable by non-experts, development of OS (Operating
Systems) such as Windows, Displays, Hardware such as keyboards and
mice.
● GENERATIONS:
○ First Generation - Vacuum Tubes.
○ Second Generation - Transistors.
○ Third Generation - Integrated Circuits.
○ Fourth Generation - Microprocessors.
○ Potential Fifth Generation - Quantum Computing (Far future)
● Ireland and Supercomputers - 14 of the 500 fastest computers on Earth in
Ireland, One named Kay after Kathleen McNulty.

Computer Systems

● Computer System - A system that involves interaction between hardware,


software, data and the user. Can be made up of multiple computers or
programmes interacting with each other.
● Computer Architecture - Specification of how a computer's parts are physically
and logically laid out and connected.
● Von Neumann Architecture - John von Neumann 1945, described a computer
architecture comprised of four main parts:
○ Central Processing Unit (CPU) which processes instructions.
○ Memory that stores data to be operated on and instructions
(programmes) as well as the results.
○ A bus connecting CPU to memory.
○ Input and output devices.

● CPU - Carries out computations on data by following instructions. Modern


CPUs contain billions of transistors. The CPU contains the ALU, control unit
and registers.
● ALU - Arithmetic and logic unit,where arithmetic and logical operations take
place. Receives instructions and data from memory, and operates on the data
following instructions.
● Registers - Temporary memory that the CPU can access very quickly. Very
expensive, smaller capacity than RAM. Examples include:
○ Programme Counter.
○ Data Registers.
○ Address Registers.
● Programme Counter - A register in the CPU that stores where the CPU is in
the programme sequence at any given time. Also contains the memory
location of the next instruction to be carried out.
● Address Registers - Store memory addresses.
● RAM - Random access memory, not where files are stored long term.
Temporary/Volatile memory - holds the data and instructions of the program
currently being executed. Faster than non-volatile memory.
● Volatile Memory - When the computer loses power the data is lost.
● ROM - Read only memory, non-volatile. A use of ROM is to store the BIOS.
● BIOS - Basic input/output system, stores the basic startup routines, when the
computer is powered on, the BIOS performs the necessary checks before
handing over control to the OS.
● Fetch and Execute Cycle - CPU fetches the next instruction from memory, the
instruction is found at the memory address and stored as Binary code, the
CPU decodes the Binary, revealing the instruction, and the instruction is
executed. The CPU may use registers to store data while executing the
instruction. When complete, the CPU sends the result back to memory if
required.
● Clock - Generate a signal of a continuous stream of electrical pulses at a very
stable frequency. Ensures everything operates together at the exactly right
timing.
● CPU Speed - Mainly determined by clock speed. 5GHz = 5 billion instructions
per second. Speed is also affected by the number of cores.
● Cores - Parts of the CPU that execute instructions simultaneously. 8 cores
means 8 instructions at once.
● Bus - Connects the CPU and Memory. Communication channel that carries
data between computer components internally. USB (Universal Serial Bus) is
an example of the term being used more widely.
● Input and Output Devices - I/O, examples include display, secondary storage,
USBs, mice.
● Secondary Storage - Store data persistently. Slower than primary storage but
cheaper. Bigger in size usually.
● Hard Drives - Example of secondary storage. 2 main types:
○ Magnetic
○ SSD
● Magnetic Drive - Hard drive with a rotating magnetic “platter” with data that is
read by the “head”. Cheaper than SSDs and hold more storage.
● SSD - Solid state drive, faster and more durable than magnetic drives, no
moving parts. Based on flash memory.
● Motherboard - Circuit board that parts are physically mounted on. Devices are
either plugged into or soldered to the motherboard. They usually include the
CPU, memory and I/O devices.
● Circuit Board - Board of non-conductive material that contains pathways (like
wires) that connect devices.
● Binary - Symbol pairs (1,0). Used to represent all information on a computer.
On/off, High/Low voltage. Very little noise.
● Operating System - Series of programs that control the operation of the
computer, application programmes and attached devices. Runs in the
background while the computer is on. Functions include :
○ Managing data from/to I/O.
○ Managing interactions with other computers.
○ Controlling where programmes/data are located in memory.
○ UI, allowing the user to interact with the computer.
○ Managing the file system.
○ Managing hardware.
○ Access and security.
● Layer Model - User interacts with programme, programme interacts with OS,
OS interacts with hardware.
● WWW - World Wide Web, a system of connected files hosted on the internet,
e.g. HTML files. All connected using hyperlinks. Uses the Internet as a
transmission medium. 1989 Tim Beners-Lee.
● Internet - 1969, two computers interacted with each other. First instance of
“live” or real-time data sharing between computers. Today, billions of
computers are connected by copper wires, fibre optic cables, satellite,
microwaves, and under-sea cables.
● IOT - Internet of Things, more and more non-computer objects such as cars
and TVs are becoming interconnected.
● Client-Server Model - Client issues a request to the server, server then carries
out the request and the information representing the webpage is transmitted
to your computer (client). It’s a distributed system, meaning workloads are
shared across more than one computer. Can be multiple clients and multiple
servers.
● Communication Protocols - Rules describing how to transmit data across a
network e.g. the Internet. Different protocol layers, requests travel “down” the
layers from clients and “up” the layers to servers. Layers are:
○ Application - HTTP/HTTPS
○ Transport - TCP (Transmission Control Protocol)
○ Network - IP (Internet Protocol)
○ Physical - WiFi
● HTTP - Hypertext Transport Protocol, a request-response protocol. Allows a
client to request a resource and the server to respond to the right computer
with the resource.
● HTTPS - Hypertext Transport Protocol Secure, automatically encrypts data,
used widely especially for online payments.
● URL - Uniform Resource Locator, a format of addressing resources in the
internet
● TCP - Transmission Control Protocol, transport layer, ensures binary is
transported reliably. Information is broken into “packets”, TCP keeps track of
packets.
● IP - Internet Protocol, network layer, handles the creation of packets and their
route to their destination. Uses IP address, a code that identifies a particular
computer network or particular computer on a network. Every computer
connected to the Internet has a unique IP address. IP ensures that the correct
IP address is connected to every packet. TCP/IP are often connected.
● WiFi - Wireless Fidelity, radio wave technology that allows devices to
communicate wirelessly and to access the Internet. Physical layer.
● VOIP - Voice Over Internet Protocol, not a single protocol but a number of
methods designed to deliver voice data (and often video data) across the
Internet. E.g. Skype, Facetime.
● MAC address - Media access control address: Used as a unique hardware
identification that uniquely identifies each device on a given network, Used by
websites to locate where to send data packets to.
● DNS - Domain Name Server : Used to identify website names by repurposing
the IP address into a readable domain name, used by client side to locate
where to send and receive data packets/ packet requests.
● Internet Hardware Components - Used to help move data. Includes:
○ Gateways.
○ Routers.
○ Network Bridges.
○ Switches.
○ Repeaters.
● Gateways - Connect two networks that have different protocols.
● Routers - Forward data packets between computer networks.
● Network Bridges - Create a single network from multiple segments.
● Switches - Forward data to only devices that need to receive it.
● Repeaters - Receive data and re-transmit it.
● Cloud Computing - Storing, processing and/or accessing data over the
Internet on servers specifically designed for this purpose. Cloud is an
expression for a server accessed via the Internet. Generally managed by
companies, these companies are responsible for keeping data available,
accessible and secure. Customers pay for as much storage and processing
power as they require, “elasticity”. E.g. Google Drive, One Drive, Amazon
Cloud, Dropbox. Allows multiple people access, remote access, and latest
software, although there is a risk of security breach and Internet access is
required.

Software Development

● Agile approach - flexible and collaborative way of working on projects


● Waterfall approach - More formal and less flexible way of working on projects
● Steps of a software development process
○ Investigate - Identifying and fully analysing the nature of the problem
and what has to be done
○ Plan - Planning what to do and how, timeframes, staff and
management, making flowcharts for the projects
○ Design - Top-down or modular approaches
■ Top-down - Starts with the main system and breaks it down into
smaller units
■ Modular - Similar to top-down but each task is set into a
“module” that a certain team works on
○ Create - The writing of the actual code to accomplish the task set-forth
in the plan stage
○ Evaluate - Testing of the software created to ensure it meets all tasks
and works properly and as expected
○ Iterate - Improve on the original design either by noticing something
could be made better or fixing errors made in the original code
○ Document - Create documentation on the project, write down how it
functions, what part is responsible for what etc
● Teams
○ Business analyst - identifies users and stakeholders, feasibility studies
○ Project manager - forms the team, supervises the team
○ System analyst - Establishes hardware and software requirements,
works with the business analyst
○ Designer - Designs the software
○ Developer - Develops the code for the software
○ Tester - Ensures the software functions as expected
○ Admin support - Organises meetings, keeps track of correspondence
○ User liaison (social media manager) - Ensures communication between
the users and project team

Computational Thinking

● Computational thinking -A way of approaching problems that is particularly


useful in computing. It can also be useful for tackling many other kinds of
problems.
● Pattern matching - identifying patterns and recognising when two patterns are
similar.
● Abstraction - ignoring irrelevant details and reducing a problem to its essential
features.
● Decomposition - breaking a complex task down into a set of smaller and
simpler tasks.
● Algorithms - using a sequence of steps to solve a problem.
● Binary - A system of storing data using 1s and 0s
● Hex - A base16 system of storing data. 0 to F
Python

● Python - General purpose language used to solve various problems, named


after Monty Python
● Variable types:
○ String - a string alphanumeric characters - “abcde”
○ Int (integer) - a whole number - 1
○ Float - a number with a decimal point - 1,2
○ Boolean - True/False, 0/1
● Assigning variables - by convention snake case is used, can’t use python
keywords, can’t start with a number, can’t contain spaces or special
characters - syntax “x = 1”
● Print out the variable type using the “type()” function
● Switch two variables:
○ Canonical swap - a,b = b,a
○ Third temp variable
● Operators:
○ Add - +
○ Subtract - -
○ Multiply - *
○ Divide - /
○ Floor divide - Number before the decimal point after division - //
○ Modulus - The remainder after division - %
○ Exponent - **
● Incrementing variables:
○ x+=1 - increment x by 1
○ x-=1 - decrement x by 1
○ x*=1 - multiply x by 1
○ x/=1 - divide x by 1
● Rounding - syntax “round(x, 2)” - rounds the value of x to two decimal places
● String concatenation - joins two strings together using the + operator
● String replication - multiplies a string using the * operator
● ASCII - American Standard Code for Information Interchange - A system of
encoding character
● Obtaining the ASCII value of a character - “ord(x)” - returns the decimal value
of the character
● Converting the decimal value of a character into a letter - “chr(x)”
● Converting strings to upper/lower case - “x=x1.upper()”, “x=x.lower()”
● Find the length of a string - “len(x)”
● Indexing:
○ Index starts at [0]
○ Last value given by [-1]
○ Substring - part of a string between given indexes [6:10] - returns the
characters between the 5th and 9th letters inclusive
● Inputs - “input(“Input an example: ”)”
● Boolean logic - A form of algebra centred around three basic operators - And,
Or, Not - returns either True or False

● Boolean comparative operators:


○ == - is equal to
○ != - isn’t equal to
○ < - is less than
○ > - is greater than
○ <= - is less than or equal to
○ >= - is greater than or equal to
● Conditionals:
○ If - if the condition is true
○ Elif - if the 1st condition isn't true, if this one is
○ Else - if neither above are true
● Nested conditionals - and if statement inside another if statement
● Iteration - Repeating a task using a “while” or a “for” loop
● While loop - syntax “while i < 10:” - repeats the code inside while the value of i
is less than 10
● An infinite loop can be done using “while True:” if a condition we’re looking for
is met, we can escape this loop using “break”
● A for loop - syntax “for i in range(6):” - repeats the code 6 times
● A for loop with a range not starting at 0 that only takes into account every
other number - syntax “for i in range(2,100,2)” the loop starts at 2 and goes up
to 100 only using every other number
● Nested loops - two loops, one inside the other eg. when printing a square
made of * you’d use one loop to cycle through the columns and another inside
it for rows
● Lists - A collection of data items - syntax “example_list = [x,y,z]”
● Indexing a list works the same way as indexing a string explained above
● List methods:
○ append() - adds an element at the end of the list
○ clear() - removes all elements from the list
○ copy() - returns a copy of the list
○ count() - returns the number of specified elements in the list
○ extend() - adds the elements of a list to the end of the specified list
(joins two lists)
○ index() - returns the index of a specified value
○ insert() - adds an element at the specified index
○ pop() - removes the element at the specified index and returns that
element
○ remove() - removes the first instance of an item with the specified value
○ reverse() - reverses the list
○ sort() - sorts the list from smallest to largest
● Testing software:
○ A way of checking if the code works as expected
○ Most often recorded in a table consisting of: test case ID, brief
description, test data, expected result, actual result, pass(Y/N)
● Equivalence partitions - Partitions the range of inputs into areas that should
behave similarly eg. driving licence ages under 17 and over 17 have different
outputs so they are in two separate areas
● Extreme values - Identifying possible extreme values eg. entering an age
above 99
● Boundary values - Values between two possible outcomes, bugs are often
found here eg. the age of 17 in the driving licence eligibility program
● Error anticipation - Predicting any possible errors that may occur eg. entering
a negative age
● Unit testing - a function which tests if the original function outputs the
expected result
● Functions - A block of code callable from any other part of the code in order to
utilise the code
● Argument - a value(s) taken in by a function used to perform calculations
within the function
● Importing functions - A custom function can be imported into another python
file by using the syntax “import filename.py”
● Recursion - Breaking a problem into smaller pieces
● Searching algorithms:
○ Linear - Iterates through each item until it finds the right one
○ Binary search - Requires the list to be sorted prior to running, Finds the
first and last index, from there it gets the half-way index based on the
half-way point, it uses that value as the first or last index and searches
through the new smaller list
● Sorting algorithms:
○ Selection sort - Takes the first value and the remaining items in a list,
finds the smallest value in the unsorted section and swaps it with the
first item
○ Insertion sort - Same as selection but starts at second and works
towards the right
○ Bubble sort - Checks two items beside each other and swaps them if
necessary
○ Quicksort - Weird, need to understand before I write notes

Modelling

● Computer modelling - any activity that involves using software abstractions to


represent a problem
● Model - a block of code that takes an argument(s) and returns an output(s)
● Scenario - A condition/situation in the environment that can change
● Simulation - Running a model to allow different scenarios to be tested
● Agent based modelling - A model that simulates the actions and interactions
of individual agents within an environment
● Emergent behaviours - behaviours examined in the environment as a whole
but not within individual agents

AI and Machine Learning

● Machine learning:The use of computers to identify patterns in data and make


decisions based on this data
● Deep Learning: A subset of machine learning that aims to create algorithms
that mimic how the human brain works, by learning from incredibly large data
sets
● Supervised learning: The task of learning a function that maps an input to an
output based on previous data sets with labelled input-output combinations.

● Unsupervised learning: Algorithms that find patterns in unlabelled data where


no previous patterns have been found. They do this by looking for
connections or patterns in the data set.
● Semi-Supervised learning: Algorithms that use a combination of labelled and
unlabelled data, Used because labelling large data sets can be too expensive
or time consuming. Uses the labelled data sets to “learn” how to treat
unlabelled data
● Reinforcement learning:algorithms that learn by interacting with the
environment and using a system of “reward and punishment” to determine a
best possible course of action This is the process used in the development of
self driving cars
● Data Quality: Poor data quality can lead to inaccurate outputs. When pre-
processing data, you should aim to remove all missing values, outliers and
generally imbalanced data.

Databases
● A way of organising data/information so that it can be accessed easily.
● They are useful because:
○ They store large amounts of data
○ They hold data in an organised way
○ Makes it faster to carry out searches
○ Freely available
○ Interact with different systems
● Flat File databases - Simplest database, single table.
● Attributes - Column name and the data it contains. Data is called fields.
● Records - Refers to one entry (column) in the table. AKA an instance.
● Data Types:
○ Varchar
○ Number
○ Date
● Varchar - Variable Character, like a string in python, a series of numbers,
letters and other characters.
● Number - A number that can be used in calculations.
● Date - Typically date/month/year, but can also be an integer value based on
number of days since 31/12/1899.
● CSV - Comma Separated Value, file type used to store flat file databases.
● Relational Databases - stores and provides access to data points that are
related to one another.
● Problems with single data tables:
○ Duplicate data
○ Wasted time replacing duplicate data
○ Wasted storage space
○ Hard to extract specific data
● Primary Key - a unique identifier generated to reference records.
● Foreign Key - an attribute that is created to link different tables.
● ERD - Entity Relationship Diagram. Used to visualise the relationship between
entities (tables).
HTML
● Markup language
● Uses tags rather than blocks of code
● Tags are always grounded by anchor brackets <>
● Closed using the /
● Metadata - information stored inside the <body> tag which stores info about
the website
● Attribute - provides extra info about an element eg class/id
● Comments - done using !-- inside an anchor bracket <!--p>content</p!-->
● Hyperlink - links two pages together using the anchor element <a>
● Absolute URL - Takes your to another URL
● Relative URL - Takes you to another page of the website you’re on

CSS
● Cascading Style Sheets
● Provides instructions on how the html should display its content
● Proposed by Håkon Wium Lee in 1994

Java Script
● Created by Brendan Eich in 1995
● Used to make a webpage interactive
● Introduced into a website using the <script> tag
● DOM - Document Object Model - A model of all the elements in a html
website used by the js code to trigger functions
● Can be used to modify HTML and CSS elements
● Same operators are used as in python except the increment and decrement
which use ++ and -- instead of += and -=
● Boolean operators
○ And &&
○ Or ||
○ Not !
● Variables are assigned using the syntax “var age=18”
● Lists are assigned as in python only using the var syntax as above
Cheeky revolut plug:

You might also like