CS 111 – Aug. 26 Review: How might an airline use IT? Chapter 0 –Computer origins –Algorithms –Abstraction Commitment for next day: –Please read section 1.1
History Analog machines –Abacus –Mechanical calculators, adding machines, cash registers –Babbage suggested a programmable machine –Hollerith adapted Jacquard’s punch cards Digital machines –ENIAC, ABC, Mark I, Colossus –Became commercially successful in 1950s –Became increasingly affordable by 1980s Innovations often respond to needs
HW & SW Hardware – physical computer components –CPU, memory, I/O devices, network Software – programs that run on machine –Allows computer to do useful work (or play) –Tell the computer exactly what to do –Behind any program is its algorithm The secret to how it really works Clearly defined list of steps to solve a problem Needs to be precise, and spell out details Analogy: –a restaurant building, versus the actual restaurant
Algorithm example Euclidean algorithm: Given two numbers, find their greatest common divisor…. 1.Let m = larger, and n = smaller number 2.Let r = remainder after dividing m/n 3.If r = 0, then our answer is n, and we’re done. But if r ≠ 0, let m = n, and let n = r, and go to step 2. Try it out…Do you understand the steps? Does the procedure work? BTW, an algorithm should also clearly specify its input and output. √
Abstraction Our way to manage complex problems Big picture first, then the details –Details omitted until they become important –“top-down” design –Ex. Road map We can study a machine without knowing how to build one
Bits Preview of section 1.1: All information in computer is in binary form (0/1) Smallest unit of information is the bit: a single 0 or 1 When we have lots of bits, usually grouped in set of 8 called a byte Basic building block of CPU is the logic gate, which manipulates bit values. –Very fast –Logic gates combine to perform math operations