CISC 106 BASICS WEB SITE HTTPS WWW EECIS
CISC 106 BASICS: WEB SITE: • • • HTTPS: //WWW. EECIS. UDEL. EDU/~YARRINGT/106/ ALL ASSIGNMENTS AND INFORMATION IS POSTED ON WEB SITE ALL ASSIGNMENTS MUST BE SUBMITTED VIA CANVAS EMAIL: • YARRINGT@UDEL. EDU ALL LABS AND HOMEWORKS DUE MONDAYS AT MIDNIGHT UNLESS OTHERWISE NOTED
COMPUTERS What’s a computer? Hardware Software Data And people 1 -2
BASICS: DATA All data stored in a computer is in the form of a sequence of 0 s and 1 s. BINARY: System of counting using only 1 s and 0 s 1 -3
DATA • bits • 1/0 - hold a positive/negative charge. • A positive charge = switch on (or 1) • A negative charge = switch off (or 0) • bytes • 8 bits • One byte holds one number (or character) Think of a byte as eight switches 1 -4
SIZE (SPACE) • Kilobyte • • Megabyte • • ~1, 000, 000 bytes (trillion bytes) Petabyte • • ~1, 000, 000 bytes (billion bytes) Terabyte • • ~1, 000 bytes (million bytes) Gigabyte • • ~1000 bytes (thousand bytes) ~1, 000, 000 bytes (quadrillion bytes) Exabyte • ~1, 000, 000 bytes (quintillion bytes)
HARDWARE: • CPU: • • Calculator – does ALL the main calculations Measured in Hertz • • cycles/sec instructions/sec • RAM • • memory that holds instructions (FOR CPU) Not so big – we must manage the space on memory
HARDWARE: • Other: • Cache • • • Holds them close to CPU Hard Drive • • memory that holds instructions we think the CPU will want next stores data and software Motherboard • Board on which all main hardware is located and connected
CPU’S JOB (WITH A PROGRAM) CPU does the following: • Read instructions and data from memory (e. g. , RAM) • Put Data back in memory (after instruction is executed) • Add • Subtract • Multiply • Divide • Compare two values (>, <, =) 1 -8
HARDWARE <-> SOFTWARE • CPU only understands instructions written in machine language • Strings of 1 s and 0 s • We don’t write programs in 1 s and 0 s! • Although technically we could. 1 -9
SOFTWARE • Set of instructions • Written in High-level languages • Closer to our language • E. g. , • Can create powerful and complex programs without knowing how the CPU works (This is what you get to write!!!) 1 -10
SOFTWARE • Everything a computer does is controlled by software (set of instructions) • Special Software: Operating System • Software that has instructions for how other software should communicate with hardware 1 -11
RUNNING A PROGRAM • High-Level Language (what we write) is translated into Machine Language (what the CPU understands and can execute) • Done by a compiler or an interpreter 1 -12
COMPILERS & INTERPRETERS • Compiler • translates a high-level language program into a machine language program • print(“Hello earthlings”) -> compiler -> 101000001 110110100 100011101 etc. • Machine program can be run at any time (without reusing compiler) • Don’t need the code to rerun the program • Interpreter • is a program that both translates and executes the instructions in a high-level language program • Must be translated to machine language each time 1 -13
PYTHON • Is a High Level Language • Python interpreter: • A program that reads Python code statements and executes them (we’ll be using this) • Python compiler: A program that reads python programs and translates the entire thing to an executable, machine-language module that you can install and run WITHOUT having to have the software instructions available 1 -14
WHY PYTHON? • Great for interfacing one program to another • Free! • Used in industry –Google, ILM, NASA…. • Easy to get started with • Free! • Lots of “libraries” (add-ons) that do things like sound editing, • computational biology, Web database access…. . Free! • One disadvantage: a bit slower than certain other languages (less efficient) 15
PYTHON: • Python Facts: • Named after… • Monty Python • So you’ll see many references to spam, etc. • Is a “high level language” • Closer to human language than machine language • Is powerful • Has all the power of modern programming languages • GUI • Is Object-Oriented • Can be integrated into other languages • Runs on everything
- Slides: 16