exam to be given during lecture hours, in normal lecture classrooms, on Wednesday 22 March
coverage includes lectures (through Mar. 17; see your notes), on-line readings (see webpage) and labs (1-6)
Kinds of questions you may encounter
knowledge of definitions
application of definitions (distinguish or categorize things based on the definition)
knowledge of facts
consequences/reasoning/informed opinions based on facts
calculational skills
analysis of situations for best strategy/approach/fit, based on comparative evaluation
Definition and history of computing
Characterizing computers
original usage of the term ‘computer’: people as computers
definition of a computer: a device which can transform data
analog (continuously varying signals or values) versus digital (discrete set of fixed values) representations
implementation technology: mechanical, electronic, … abstract (i.e., defined conceptually)
future technology: optical, DNA, quantum, ??
Important ideas
abstract notion of computer (versus actual implementations): abstractions are useful for theory
general purpose computer (versus special purpose): can solve different problems, based on program
stored program computer: program is stored in the computer, as any other data
Evolution of computers
early computer-like devices (abacus, slide rule, tables in books)
Babbage’s devices (Difference Engine and Analytical Engine)
(neither was actually built; Æ was general purpose, though)
early electronic computers (including esp. the influential Eniac: general purpose and stored program)
modern developments (from relays to tubes, transistors and miniaturization)
Representation, interpretation and semiotics
Basic semiotic situation
signs, presented and perceived (and interpreted) by people
meaning/interpretation is always in some context determined by mutual agreement, culture, etc.
meaning is given in terms of some internal, cognitive constructs (or shared external reality)
Kinds/aspects of signs
symbolic: arbitrary and conventional association with meaning (o/wise unrelated)
iconic: resembles or is similar to meaning (e.g., in physical form)
indexical: causally connected to meaning (e.g., thermometer, or smoke to fire)
Applications to computing
computers transform data; data are meaningful to people
transformations on data should reflect human meanings associated to the data
Numerals, numbers and radix representations
General issues
the use of a few, discrete symbols enhances recognition and distinguishability
to allow encoding/distinguishing a large numbers of things, we combine symbols
usual practice follows textual conventions to yield ordered “places” for symbols
when symbols are used for numerals, we call them digits (bits = binary digits)
Interpretation of combinatorial encodings
number of possible combinations: product (multiply) of possible digits in each place
order of codes: given by the ordering of digits (within place) and the ordering of places
usual practice orders places with the most significant on the left
numerical value: the sum of the product of each digit’s value with its corresponding place value
Single-radix and mixed-radix representations
single-radix uses a fixed set of digits (number of digit values = base) per place value
(note that digit values run from 0 up to b–1 for base b)
place values are 1, b (for base b), b squared, b cubed, etc.
mixed-radix uses different sets of values (which may be “digits” only in spirit) for each place
mixed-radix place values start with 1 and are the product of number of digits in previous places
(this is the same rule as for single-radix, and is actually the more general case)
Special bases
humans use base 10 (decimal) due to the number of our fingers (digits 0-9)
computers use base 2 (binary) to minimize possible confusion between values (digits or bits 0 and 1)
base 16 (hexadecimal; digits 0-9, A-F) is also used in computing because it helps human recognition
(since 16 is an even power of 2, each digit in hex is exactly 4 digits in base 2)
(the conversion factor from base 10 to base 2 is not a whole number, but is little more than 3)
a series of 8 bits is called a byte; 2 hex digits are thus the same as one byte
Skills involving single- and mixed-radix representations
evaluate numerals and convert between bases
determination of place values
digit requirements and digit req equivalences between bases
“How many digits in base b are required to distinguish n different things?”
“How many digits in base b are equivalent to n digits in base c?”
counting in some base b (i.e., given some numeral in base b, count up to the next few)
addition and multiplication (say in base 2, as generalized from base 10)
Representation of graphics and colors
Pixels and bitmaps (paintings)
we represent graphics by (abstractly) imposing a grid of squares (pixels) on the visual field
the number of pixels (by width and height, or number per unit area) is called the resolution
higher resolutions yield a finer, more accurate representation; lower ones may distort considerably
despite high res., the rectangular aspect of grid and pixels may distort (aliasing or “stair-stepping“)
we calculate the total number of pixels as the product (multiplication) of the hight and width
Abstract drawing formats
use codes to represent resolution-independent information about sizes, shapes, colors, etc.
drawings may be rendered at various resolutions to achieve finer or coarser final pictures
abstract elements of drawings allow simple and flexible resizing and reshaping, without distortion
General and comparative issues
drawings are more concise, abstract and flexible, but require time and effort to render into a visible form
paintings are closer to final visible form, but are fixed-resolution, less flexible and less abstract
Representation of color
color models: different ways of breaking color into components (Red-Green-Blue, Hue-Saturation-Brightness, Cyan-Magenta-Yellow-Black, etc.)
issues of light versus ink mixing: lights “add” to white; inks “add” to black
typically break color representation into numbers for relative amounts in each component
bits per pixel: we use one color code for each pixel (one bit = e.g., black or white)
2 to the power of number of bits yields number of possible color variations per pixel
modern, high-quality pictures use approx. 24 bits per pixel (e.g., 8 bits each for Red-Green-Blue)
Text encodings
Older (pre-computer) codes
Morse code: dots and dashes (but isn’t binary, since pauses are needed to find boundaries)
Baudot's code: 5 bits per character (but not alphabetically ordered; “shift planes” for upper/lower case)
ASCII and extended ASCII
an American standard (adopted by many others) using 7 bits per character (128 possible code)
low-numbered codes used for control codes, invisible characters such as bell, linefeed, carriage return
since 8 bits fills out an even byte, one byte is often used for a 7-bit ASCII text value
eighth bit may be left as a “leading zero”
can also be filled using the parity convention to detect errors: parity bit is (say) 0 if the number of 1 bits in the rest of the byte is even, 1 if it is odd
several different “standards” use the eighth bit for an extra 128 character codes (euro. letters, etc.)
Unicode: an international standard
Unicode is intended to represent all characters used by humans in writing (past, future, some imaginary)
codes are arranged into planes of 16 bit codes (65,536 each plane), for 16 planes
BMP = Basic Multilingual Plane includes most modern characters used in writing
UTF-8: an encoding which uses varying numbers of bytes to encode Unicode code points (or characters)
one byte pattern: 0xxxxxxx (leading 0, codes consistent with ASCII)
two byte pattern: 110xxxxx 10xxxxxx (x's mark “freight”, i.e., the actual data bits)
three byte pattern: 1110xxxx 10xxxxxx 10xxxxxx (1's in first byte = total n umber of bytes)
UTF-8 patterns allow for character boundary recognition, as well as (probabilistic) identification of UTF-8
Styled text encodings
beyond single characters, we want to represent document structures (paragraphs, headings, etc.)
this is usually done with embedded codes which act as brackets, surrounding levels of structure
(these tags may be “binary” codes or multi-character ASCII text, as in <b> … </b>)
tags may represent physical representations issues (e.g., fonts, typefaces, positioning)
tags may also represent more abstract document structure (titles, sections, rhetorical emphasis)
File formats, headers and tags
Nature and identification of file formats
files are units of storage representing single documents, but can be viewed as sequences of codes
tags are often (but not always) used at the beginning of the file to signal which file format is being used
(separate descriptions of file formats run many pages and involve considerable technical detail)
earlier parts of a format will often “frame” later parts, providing parameters which determine later structure
Degrees of abstraction in file formats
more abstract versions use language-like, nested textual representations (RTF or DIF files)
these tend to be more editable by humans, and more robust against insertion or deletion
less abstract versions use full hex numbers for internal references (addresses & indices; DOC or BMP files)
these tend to be efficient for machines, but too brittle for editing (which can break internal consistency)
Spreadsheets
Basic concepts
sheet is composed of a rectangular grid of cells, which may hold values (numeric or text) or formulas
formulas are built from numerals, cell references (e.g., B3), operators (like +,*) and functions (MID, etc.)
values are displayed in the grid (as text), but are re-computed each time data changes in the sheet
(because of cell references, formulas and thus cell values may depend on each other)
spreadsheets provide good overviews of data and allow for “what if” scenario exploration
Cell references
cell references have the form of an alphabetic column letter followed by a numeric row number
optional dollar signs (as in $C$4) force a reference to remain fixed even when a formula is moved
without the dollar signs, cell references are changed to reflect relative movement of their formula
(this allows for easy “filling” and other uses where a series of data are to be treated similarly)
The Internet
Definition and origins
The Internet is a world-wide network of (networks of) computers connected by wires (and protocols)
Network robustness
distributed routing: the network automatically determines routes based on congestion (traffic)
packet switching: unlike telephones, messages are broken into packets and disbursed
Protocols and TCP/IP
Ip addresses (numbers; 4 parts, dotted, 32 bits total) versus domain names (not directly related to numbers)