COMPSCI 111 Final Exam Notes PDF

Title COMPSCI 111 Final Exam Notes
Author Humza Rashad
Course An Introduction to Practical Computing
Institution University of Auckland
Pages 20
File Size 1.1 MB
File Type PDF
Total Downloads 51
Total Views 160

Summary

COMPSCI 111 FInal Exam Notes...


Description

COMP SCI 111 – FINAL EXAM Computer hardware The parts of the system that you can hit with a hammer are called hardware. Motherboard – - The main circuit board to which all components are connected, allowing them to communicate with each other. Central processing unit (CPU) – - The ‘brain’ of a computer. Processes data in a computer using its instruction set. CPUs must be kept cool, generally using a heatsink and fan. - Clock speed (measured in Hertz [Hz]) measures the speed at which electrical signals pass through the processor. Primary memory – Main form of primary memory is Random Access Memory (RAM). More RAM improves a computer’s speed by providing more quick access memory. Volatile. It’s capacity is measured in bytes, clock speed measured in Hz. There are many types of RAM; common type is DDR3 SDRAM. Secondary memory – - non-volatile storage; the storage medium retains its contents without needing a supply of electricity. Many forms of secondary storage: Hard disk drive (HDD), Solid state drive (SSD), USB drives, external HDDs. HDDs - cheap, can consume more power than SSDs. Stores data on spinning magnetic disks. Data is read and written by moving heads. SSDs - Costlier than HDDs, can wear out faster than HDDs, low power usage, use less space. Redundant Array of Independent Disks (RAID) - pools HDDs/SSDs together to form a larger, more reliable data storage mechanism. Has numerous configurations. RAID 0 – data stripes used to increase speed. RAID 1 – data redundancy used to increase reliability. RAID 10 combines RAID 0 and RAID 1 together. Expansion cards - e.g sound card, graphics card, network card. Plugged into motherboard using slots that follow certain standards: ISA, PCI-E, AGP.

Memory hierarchy

Memory capacity (smallest to biggest) - byte, KB, MB, GB. Moore’s law The number of transistors on a single integrated circuit doubles approximately every 18 months, while the price remains the same. In 3 years, CPUs will be 4 times faster. In 15 years, CPUs will be 1000 times faster. Computer peripherals Input devices - E.g keyboard, mouse. Output devices - E.g monitor, speaker. Output & Input devices are both peripherals. All peripherals are connected to the motherboard via ports which form a bus. Wired connections: USB (Universal Serial Bus), Thunderbolt high speed connector, Ethernet, VGA, DVI and HDMI for monitors. Wireless connections: Wi-Fi & Bluetooth. Digital information Information in the real world is continuous & analog. Information stored by a computer is digital & represented by discrete numbers. Numbers are used to represent all information manipulated by a computer. Binary to decimal + Decimal to Binary Decimal:

Decimal number system: — 1st dial from right: 100 — 2nd dial from right: 101 — 3rd dial from right: 102 — etc. e.g

Binary:

Byte prefixes

Each binary number is known as a Binary digIT, or bit. A bit can be either a 0 or a 1. A group of eight bits is a byte. Bytes are the common unit of measurement for memory capacity There are two sets of prefixes: Decimal & Binary. Decimal prefixes are preferred because they are easier to calculate, however binary prefixes are more accurate.

Software fundamentals What is software: Instructions and other data used by the computer. User can perform tasks and interact with the hardware through software. Software is loaded from secondary memory into primary memory, where it is executed by the CPU. System software: Operating system (eg. Windows, Mac OS X), Device drivers, Diagnostic and maintenance tools (eg. Disk Cleanup). Application software: Used by users to perform tasks on the computer File formats/extension File formats sometimes follow a standard; an agreed way of encoding data (eg. webpages use the HTML5 standard) Standards can be: - Open ❖ Published openly ❖ Free to use ❖ Eg. HTML, PDF ❖ ❖ ❖

Proprietary Owned by a company Others can use the standard if they pay for a licence Eg. MP3

Kinds of software 1. Proprietary software Commercial - must be purchased. Examples: Microsoft Office, Adobe Acrobat, SPSS

Shareware - User has a trial period in which to evaluate the software, and purchase it if they want Freeware - Software is free to use but source code is not publically available 2. Open source software Software that is free to use and whose source code is public. Examples: Apache, GNU User interfaces Two kinds of user interface: 1. Command line interface (CLI) User enters text commands to perform tasks. Can complete tasks very quickly by combining commands. Can be difficult to use the text commands if you don’t know or understand them. 2. Graphical user interface (GUI) User performs tasks using the software’s graphical elements (eg. windows, pointers, icons, menus). Generally easy to use, especially for new users. Can be inefficient for experienced users, but keyboard shortcuts help to make GUIs more efficient Components of computer networks and the Internet Types of networks: ● Local Area Network (LAN) - Connect networking equipment located geographically close together (e.g., campus, office) ● Metropolitan Area Network (MAN) - Connect computing equipment over larger distances than a LAN (e.g., a city) ● Wide Area Network (WAN) - Connect LANs and other networks over large geographic distances. Packet switching Data is broken into packets, which are then sent on the best route in the network Internet protocol fundamentals Protocol: A standardised method of communication. Ensures that the sender and receiver can communicate properly. TCP: transports data reliably, UDP: transports data faster but less reliably, FTP: used for transferring files over a network, HTTP: used for client/server communication such as transferring web pages. IP v4 address format + IP v6 addresses Version 4 - 32-bit number, Maximum addresses possible 232 (~4.3 billion) Version 6 - 128-bit number As more people use the Internet, organisations tasked with maintaining it need to ensure the Internet can handle the increased demand (eg. moving from IPv4 to IPv6)

DNS Domain name system (DNS) is used to convert between IP addresses and human-readable text (domain name) . DNS servers perform the translation between IP address and URL. Email protocols and email structure

SMTP - Simple Mail Transfer Protocol: Used to send emails from an email client via the e mail server POP3 – Post Office Protocol v3: Emails downloaded from the server to the email client. Emails are then deleted from the server No Internet connection needed to read downloaded messages. Disadvantages: If messages are deleted in the email client, then they are lost forever. Difficult to access your email from different devices IMAP – Internet Message Access Protocol: - Downloads a copy of emails to the email client and keeps emails on the server. Emails can only be read when online, although most email clients can store a copy for offline access. Provides other helpful features such as folders. Designed to allow users to access their emails from multiple devices. - Email encryption to make emails more secure. BCC - cannot see whos received, CC can see Synchronous and Asynchronous communication Synchronous means of communication - Instant messaging. This happens when the sender’s IM client connects to the server, the server helps clients to exchange IP addresses, once connected, sender and recipient can chat without needing the server. Wikipedia Wikipedia is the best known wiki. Launched in 2001 by Jimmy Wales and Larry Sanger. First Wiki created by Ward Cunningham they have created/edited or are interested in, allowing them to watch for vandalism. Generally, Wikipedia articles on academic topics are more accurate than articles on pop culture and politics Wiki markup Four levels of headings: Internal links: [[name of page | label]] External links: [URL label] WWW background Tim Berners-Lee built the first website in 1990. In 1994, Berners-Lee established the World Wide Web Consortium (W3C), which creates standards for the WWW. Webpage: a document on the WWW that is usually accessed through a web browser Website: a collection of webpages usually on the same topic or theme Web browser: application software used to access content on the WWW Web server: a computer with software that makes files available on the WWW Proxy: Sits between client and server so it can intercept and process requests. Cache: stores recently requested resources so they can be accessed quickly. A proxy can use a cache to store recent requests, enabling it to process requests faster. Firewall: prevents unauthorised access to a private network

URL and its parts https://www.cs.auckland.ac.nz/~andrew/teaching.html Protocol: https (Other common protocols: ftp, http) Domain: www.cs.auckland.ac.nz (Can be a domain name or an IP address) Path on server: /~andrew/ Resource: teaching.html WWW search engines Spiders crawl across the WWW to scan web pages. Spiders are programs that follow links and gather information from webpages. The search engine’s index is updated with information gathered by the spiders Filter bubble - Occurs when a search algorithm offers personalised results, which limits the diversity of information presented to the user. Malware Malware: malicious software, which includes: ● Viruses: inserts itself into another program; runs and spreads itself when the program is opened ● Worms: similar to viruses except they don’t need a program in order to run; spreads by itself ● Trojans: malware disguised as legitimate software ● Spyware: runs in the background, monitoring the user’s activities and sending the info back to the operator Logic bombs: malware deliberately inserted into a program which runs when a certain condition is fulfilled

P2P networks Peer-to-peer (P2P) networks provide another way of sharing files. Unfortunately file sharing on P2P networks is used for copyright infringement. Copyright protects an author’s work from being copied without their permission. ASCII and binary representation A = 65 a = 97 Word processing Files created by word processors store text and formatting information according to a format u Proprietary standards, eg. Word file format (.doc) u Open standards, eg. OpenDocument format (.odt) Technology and health Computer Vision Syndrome: Results from focusing eyes on a computer or other display device for long, uninterrupted periods of time. Symptoms of CVS include: Dry eyes, Blurred/double vision, Eye strain, Red/irritated eyes. Occupational Overuse Syndrome: Also referred to as Repetitive Strain Injury (RSI). Umbrella term for range of conditions characterized by: Muscle discomfort, Aches and pains, Muscle tightness and spasms, Numbness and tingling. Pain may eventually become constant and associated with loss of muscle strength and sleep disturbances.

Factors that can lead to OOS developing include: Repetitive movement – e.g. typing, Awkward postures – e.g. sitting at a desk, Psychosocial factors – excessive workload History of Computing Charles Babbage: - Victorian mathematician and inventor - “by God, I wish these tables could be made by steam.” - Decide to build a calculating engine that would use the method of finite differences to solve polynomial equations The Turing Machine: - Alan Turing, 1936 - A simple (hypothetical) computing machine n Could solve any problem for which a program could be written - The basis of all modern computers Who built the first computer? - 1936-41: - The Z1, the first programmable computer, originally created by Germany's Konrad Zuse in his parents' living room - 1936: - An abstract machine proposed by Alan Turing became the foundation for theories about computers. - 1943: - The Colossus was the first electric programmable computer, developed by Tommy Flowers at Bletchley Park, UK - 1937-42: - The ABC, the first digital computer, built by Atanasoff and his student Berry at Iowa State College - 1943-46: - ENIAC at Pennsylvania University. 14,000 vacuum tubes, 200 sqm, 50 tons. Considered to be first fully functional computer n 1949: EDSAC Digital Game Design: Play: Goal -

Participatory form of entertainment Compare to books, theater, film, which are not interactive. Also called the object of the game Might or not be achievable Defined by the rules, is arbitrary Must be nontrivial and present a challenge Victory conditions - Game does not always end when victory conditions are achieved - Can specify loss conditions

Rules: - Definitions and instructions that players agree to accept - Semiotics -- meaning and relationships between symbols - Gameplay -- challenges and actions - Sequence of play - Goals - Termination - Metarules -- exceptions or changes to rules Famous people: Alan Turing 1948 - Wrote a program to play chess A.S Douglas 1952 - Created a game of noughts and crosses with a computer component Artifact elements

Experience elements

Player elements

Artificial Intelligence: Artificial intelligence is the computational study of structures and processes that support intelligent behaviour - Term first coined in 1956: - Dartmouth Summer Research Project on Artificial Intelligence - Areas of research include: - Computer vision - Natural language processing - Robotics - Knowledge-based system Engineering Aim: -

-

To engineer, or provide computational principles and engineering techniques for, “useful” artefacts that are arguably intelligent. Mechanistic similarity to human or animal minds/brains is not necessary. The artefact may be useful in one of a variety of domains: - Industry - Mathematics - Art - Everyday life

Psychological Aim: -

To create computational principles, theories or systems that provide a greater insight on cognition in human or animal minds/brains.

General/Philosophical Aim: - To create computational principles, theories or systems that provide a greater insight on cognition in general. - Human made artefacts: - Naturally occurring organism - Cognizant entities yet to be discovered. The Turing Test: -

-

-

Proposed by Alan Turing in his 1950 paper “Computing Machinery and Intelligence”. - Defines criteria for determining machine intelligence - “Are there imaginable digital computers which would do well in the imitation game?” Imitation game: - Three players – A, B, and C - A is a man and B is a woman. C, the interrogator is of either gender - Player C is unable to see either player A or player B - C asks A and B questions, trying to determine which of the two is a man and which is the woman Standard Turing test: - Three players – A, B, and C

A is a computer and B is a person of either sex. C, the interrogator is also a person of either gender - Player C is unable to see either player A or player B - C asks A and B questions, trying to determine which of the two is human and which is the machine Vector Graphics: -

-

-

-

Vector Graphics Object-oriented graphics: - Objects created independently - Defined by mathematical formulae Advantages: - Very small memory requirements - Memory independent of the image size - Scale to any size without loss of quality Scalable Vector Graphics: - Format for representing vector graphics images - Open standard created by W3C - New, gaining popularity - XML, text file like HTML SECTION B:

Latex Commands • Used to tell LaTeX how to typeset something – Commands are case sensitive – Optional parts are in square brackets – Compulsory parts are in curly brackets E.g \commandname[options]{argument} \documentclass[a4paper]{article} \documentclass[a4paper,twocolumn]{article} \documentclass[a4paper,twocolumn]{article}{} Characters that cannot be used in Latex that need a special way to print them are: \$%^&_~#{} Environments  New environments start new paragraphs, by using environments we can make changes to the content included in it.  \begin{environmentname}  \begin{center}  Content within the center Environment,  is centered on The page. \end{center}  \end{environmentname

Creating a document To define the type of document we use - \documentclass The document type can be either: – Book – Report – Article – Letter The document environment encloses the contents of the document

Creating titles There a four commands required to create a title 1. \title{ put the title here } 2. \author{ author goes here } 3. \date{ date goes here } • will put today’s date if date not specified 4. \maketitle{ this is written after all information has been defined}

Lists Ordered lists – List that is enumerated – Use the enumerate environment – \item is used to identify each item in the list

Unordered lists – List that uses bullet points – Use the itemize environment – \item used to identify each item in the list Mathematics There are three ways to enter mathematics mode: 1. Inline text – $ ... $ 2. Displaymath environment – Centres the maths on a line of its own 3. Equation environment – Centres the maths on a line of its own and Numbers the maths with an equation number.

HTML HTML -Hypertext Markup Language (HTML) - Used to format web pages - Contains hypertext information (links) - Written in ASCII / Unicode Embedded format codes (tags) Tags -

Tags must be correctly nested, we cannot close a tag until all the tags that it affects are closed as well.

Contains all the content that will appear on the page.

- Part of the - Specifies the title to be used by the browser - Name of the window - Used in navigation (bookmarks, history, etc.) Defines a paragraph of text - Gives different sizes of headings, is the biggest and is the smallest. Lists Ordered Lists - Automatically numbered - Contains the entire list - Is used for each list item Unordered Lists - Uses bullet points - Contains the entire list - Is used for each list item Description Lists

-

Terms and explanations Contains the entire list Defines a term in a description list Is used to describe a term in a description list

Tables - Surrounds the entire table Identifies a row in the table - Identifies each element/cell of data in the row Image Tag

Img - states that the tag is an image tag Src - the source file of the image, attribute that specifies the file name Alt - attribute to specify alternate text, displayed if the image can’t load Hypertext reference - A link to another website, can also be used to reference other documents, pages, images, files, sections E.g text that will be used as a link Sections - tag can be used to split webpage up into different sections. A section is an example of a semantic element - an element that clearly defines its content to both the browser and developer. CSS

Class selectors Styles can be applied to a group of tags using class selectors. In css code: .className { property: value; } In HTML code: - Assign the tag to the class tag can be one of the html tags stated above - Make up a class name and make the name match to the css code

ID selectors Styles can be applied to a single tag using an ID selector. In CSS code: #idName { property: value; } In HTML:

External style sheet: This goes in the HTML code to link the CSS

Internal style sheet: tags are used Inline styles:

Spreadsheets Absolute references - We use this when the cell reference should not change e.g when we are working with constants. In order to use absolute references we put $ before the row of column. Functions - sum, max, min, average IF functions:

Boolean Functions

In this example, x will be printed if the statement is true whereas the empty string will be printed if it is false. In this example, yes will be printed if true, no will be printed if not. Looking up Values: – VLOOKUP - looking up values in a vertical table – HLOOKUP looking up values in a horizontal table

Databases Digital computers have made electronic databases possible, which facilitate the storage of very large quantities of information the efficient addition, modification or removal of that ...


Similar Free PDFs