CS 104 Study Guide for Exam 1
CS 104 Study Guide for Exam 1 CS 104
Popular in Computer science principles
Popular in ComputerScienence
This 3 page Study Guide was uploaded by Julianna Pfadt on Saturday January 23, 2016. The Study Guide belongs to CS 104 at University of Alabama - Tuscaloosa taught by Jeffrey gray in Summer 2015. Since its upload, it has received 47 views. For similar materials see Computer science principles in ComputerScienence at University of Alabama - Tuscaloosa.
Reviews for CS 104 Study Guide for Exam 1
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 01/23/16
UA CS 104 Computer Sciences Principles (for math majors) Exam 1 Study Guide Important Concepts to Review in the Slides: Review Ch.1 of Blown to Bits 1. Moore’s Law 2. Metcalfe’s Law 3. Principles of Bits > exponential growth, nothing goes away, technology makes it a “flat world” 4. Very likely that there are transmission errors when messages are sent and they must be resent until the message is received correctly Odd parity and even parity 1. 1001 even; 1000 odd 2. Used to detect errors > pattern for card game > ERROR CORRECTION Credit cards and checksums 1. ERROR DETECTION 2. The Luhn Algorithm (*memorize this) Example: 49927398716 Reverse the credit card no. :61789372994 Sum the digits of the odd places: 6+7+9+7+9+4=S1=42 Double, the sum the digits in the even places (if doubled no. is two digits, sum the digits): 1,8,3,2,9 => 2,16,6,4,18 => 2,7,6,4,9 2+7+6+4+9=S2=28 Last digit of sum of S1 and S2 should be 0: 42+28=70 CONFIRMED Binary Number 1. Long string of 0’s and 1’s Byte = Binary Term; Bit = Binary Digit 1. 1 Byte = 8 Bits ~ 1 character 2. Subscript of 2 => binary no. 3. Subscript of 10 => decimal no. Convert binary to decimal and decimal to binary 1. Powers of 2 => 2 , n=0,1,…,n 2. 10101 2 21 (10ltiply down, add across) Hexadecimal: 1. 0-F: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F 2. Streams of bits converted to hex by 4-bit squeances: 100110110011 3. Color codes are in hexadecimal 4. Each 2-letter hex no. represents 256 values (a byte), or one part of RBG 5. Colors represented in 3 Bytes: red, blue, green 3 bytes in a pixel, each byte represents a color (RBG) 16 million colors!! (1byte*1byte*1byte = 256 ~16 million ) Octal: Base 8 Oct 31 = Dec25 1. “A” in text is represented as decimal 25, which is 31 in octals Grayscale, red eye removal, color filters Compression (optimize storage) 1. Lossless vs Lossy Compression 2. White&Black block patterns as compression with RLE Computation: calculation that involves a process following a well-defined model understood and expressed in an algorithm Turing Machine 1. Alan Turing > Father of CS 2. Can compute ANY algorithm Hardware>you can touch it; software>set of instructions that tell the computer what to do (programs) Compiler, translator, interpreter Lower level vs. higher level RAM, ROM, external storage 5 Phases of Software Development: 1. Understand the problem 2. Plan the logic 3. Code the program 4. Test the program 5. Deploy the program, produce, maintain Types of errors: syntax errors and logical errors Flowcharts and Pseudocode Relational operators: <, >, = Boolean/Logical operators: and, or, not Loops: forever, repeat, repeat until Variable swap in programming Sturctures: sequence, decision, loop Truth Tables Broadcasting; and all other important concepts used in Maze Game Parameter: an additional piece of information provided to the block that helps the block do its function Procedural Abstraction: using parameters and same code to make code usable for many contexts (abstraction=> hiding the details) When to Create a New Block 1. When a piece of code becomes very long 2. When code is very repetitive Types of Blocks 1. Command: method; preforms a given set of instructions (no output) 2. Reporter: function; preforms given set of instructions (gives output) 3. Predicate: Boolean function; (output is True/False) Validating parameters Max Block, >= Block, Sum Method, Mystery blocks from quizzes Storing data in a list, integrating through a list Practice running through code to find the output and become familiar with Snap!
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'