Courses
Wayne State University
College of Lifelong Learning
Interdisciplinary Studies Program
Computers and Society courses, Winter 2001
    ( http://www.cll.wayne.edu/isp/drbowen/casw01)

Mondays, 6 - 9:40 PM in 113 Rackham
Bullet1.png (242 bytes)Computers and Society
    GST 2710, Section 988, Call Number 95241, 4 credits

Bullet1.png (242 bytes)Computers and Society
    AGS 3360, Section 983, Call Number 98319, 4 credits

Office hours: Mondays 4 - 6 PM in 113 Rackham


                         Instructor

David R. Bowen
2311 A/AB
Wayne State University
Detroit, MI 48202
Daytime tel: (313) 577-1498
Evening tel: (248) 549-8518
FAX: (313) 577-8585
Home Page:
    http://www.cll.wayne.edu/isp/drbowen

Email: d.r.bowen@wayne.edu

CASicon.gif (1333 bytes)
Last updated: 2/19/01
Link back to course Welcome...

Sixth class: Agenda
Monday February 19

  1. Quiz 4
  2. Handouts
    1. Agenda
  3. Passbacks
    1. Quiz 4
    2. Assignments and Labs (as ready).
  4. Reminders:
    1. Before you leave tonight, fill in the online Attendance (Signin) form on the course web site.
    2. If you miss a class, before the next class you should go to the course web site (the URL is in the upper left-hand corner of every handout) and review the Agenda for that class, then contact me if you have questions. Assignments and quiz topics are listed on the Agenda.
    3. If you need to make up a Quiz, or ask questions, or whatever, my office hours are time set aside for this. These times are Mondays and Wednesdays, 4 - 6 PM, in 113 Rackham (the classroom).

      If these times do not work for you, contact me to make other arrangements.

      I will not let you start a Quiz if the full half hour is not available before the start of the Monday night (I teach that one, of course) or Wednesday night (someone else teaches that one) class - both start a 6 PM, so 5:30 PM is as late as you can start a Quiz.
  5. Announcements:
    1. If you are having trouble with any of the topics listed below, there is  a link on the course web site to some animations of these being carried out, with explanations to go along.
      1. Binary addition and multiplication
      2. Parts of a path
      3. Parts of a URL
    2. On pg 4-6, the text Computers, Technology and Society lists the following characters in the parenthesis as not being valid in file names (\?"<>|). The actual list is (\/:*?"<>|) - the first two characters are "\" and "/", not a "V". Generally, the characters are not allowed because they are parts of file names or paths, such as "\" and ":". The quotation mark is not allowed because it is often needed to delineate or mark off the beginning and end of a file name. "<", ">" and "|" are part of commands that redirect output. Example: In the DOS or "command" window, dir *.* > dir.txt says to print a directory of the current folder and store it in the file "dir.txt." "*" is a file search wildcard, standing for any number of characters, and so is "?", standing for any single character. Examples: file*.* includes both file1.txt, file_new.html, and file34.exe, while file?.* would include only the first one.
    3. On Pg 4-11,  the text Computers, Technology and Society says that the thing that we have been calling a "path" is a "file specification." Either name will be accepted.
  6. Spreadsheets - go to handout
  7. User interfaces - the way the user controls what the computer does.
    1. The two major types (so far) are Command Line and GUI (Graphical User Interface). Many experts feel that the next type of user interface will be an Agent Interface. You will tell software "agents" what to do, and some may adjust themselves to how you work
      1. Command line usually has a prompt, at which the user types a command or other information on the keyboard. Usually only one way to get something done.
      2. GUI uses a mouse, trackball or other pointing device in addition to the keyboard. Usually has many alternatives for each action, such as use menus, use tool button or use keystroke. Example is Search or Find command:
        1. Menu item with mouse: Edit / Find
        2. Menu item with keyboard: <Alt>E then F (<Alt> gets to menu bar then select underlined letter on menu item)
        3. Keyboard: <Ctrl>F (shown on menu item as a reminder)  ShortCutOnMenu.gif (1095 bytes)
        4. Button on toolbar  FindToolButton.gif (937 bytes) (may also be shown on menu item as a reminder)
    2. Levels of the GUI:
      1. Active elements such as
        1. Button
          1. Clickable, with action or picture on its face (e.g. "Open")
            Buttons1.gif (1348 bytes)      Buttons2.gif (1313 bytes)
          2. Toolbutton - quick selection of a menu item (same as the menu item) - can save precious time on Quizzes and Exams. Experiment with these - point the mouse to a button to see a pop-up message about what it does
            Example 1: ToolBarButtons1.gif (1274 bytes) File/ New (document); File / Open (file); File / Save;
            File / Print; Tools / Spelling and Grammar
            Example 2: ToolBarButtons2.gif (1642 bytes) Format / Font / Font:
            Format / Font / Size (can also type in a number even if it is not on the list); Format / Font / Font Style / Bold, then Italic than Underline; Format / Paragraph / Alignment then Right (lighter color indicates button is pressed and that style is selected), Center, Left and Justify
          3. Check box - check as many as you want
            CheckBoxes.gif (1609 bytes)
          4. Radio button - check only one in a group
            RadioButtons.gif (1468 bytes)
        2. Spinner - can "spin" using up/down arrows, or click and type in number
          Spinner.gif (1231 bytes)
        3. Menu (and sub-menus and so forth). "..." at the end means that there is more to do after choosing
          the menu element - means it is "safe" to choose it, nothing will happen right away
          Menus.gif (1030 bytes)
        4. Drop-down list - click on down arrow, select from menu that drops down
          DropDown.gif (1172 bytes)
        5. Icon
          IconSelected.gif (1601 bytes)
        6. Text box - type in (default may be proposed by application)
          TextBox.gif (1488 bytes)
      2. Dialog - a collection of active elements to accomplish a specific task such as saving a file (drive, folder, name, type). A dialog can have several "Tabs" or pages. In Windows, some common dialogs are:
        1. Save As...
        2. File / Open
          Dialog.gif (4321 bytes)
      3. Wizard - a series of dialogs to accomplish a specific task
  8. Information
    1. How much information can be stored in n bits?
      1. Lowest number that can be stored is zero
      2. Highest number that can be stored is 2n - 1
      3. Number of different values (codes) is 2n
      4. 210 ~ 103 = 1,000
    2. A byte - 8 bits. Computers usually handle data in bytes. How much information is this, or how many different codes?
    3. Graphics file sizes.
      Size in bytes = height × width × (pixels per inch)2 × (bytes per pixel) / (compression factor)
      Example: A graphic 0.5" high by 3" wide at 100 pixels per inch, with one byte per pixel, compression factor of 3 to 1. How large is the file? (The formula will always be given if it is needed.)
    4. Sound files. Sound can be stored in and played by computers using a sound board (a piece of hardware plugged into the inside of the computer, possibly after it was purchased). How is this done?
      1. The sound waves go into a microphone input on the sound board, and the sound board converts the sound wave into a electronic signal or voltage wave, in just the same way that sound is recorded in a studio or tape recorder.
      2. The sound board measures voltage wave at very close or rapid time intervals, and the converts the measurements into numbers.
      3. The numbers are stored in the computer, in its RAM or on its hard drive or other disk.
      4. When we want to play the sound back, the numbers are pulled back out of storage, converted to voltages by the sound board, and fed into a speaker or set of earphones.

      The graphic below shows a sound wave being measured at several points (the small circles)
      audio.gif (3688 bytes)

    5. The size of a sound file is determined by:
      1. Length of the sound in seconds
      2. Number of samples (measurements) per second, usually between 8,000 per second (tape recorder quality) and 40,000 per second (CD quality)
      3. Number of bytes used to store each measurement - 8 bits or one byte per sample for low quality, 16 bits or two bytes per sample for high quality
      4. Stereo is two independent sounds and so takes twice the storage.
      5. Compression factor (CF)

      The formula for the size of a sound file in bytes is (will be given on quizzes and exams if needed):
      File size in bytes = (length in seconds) × (samples / second) × (bytes / sample) × (2 if stereo, 1 if mono) / CF

      1. Example: A sound three seconds long, with 20,000 samples per second and 2 bytes per sample, in stereo, with a compression factor of 5, takes this many bytes:
        bytes = 3 × 20,000 × 2 × 2 / 5 = 48,000 bytes = 48 kB. A file this size could take a long time to download over the Internet. Originally, sound files download completely before playing. Streaming audio plays as it downloads, and so seems much faster to users.
    6. The table below summarizes the forms of computer information; we have not covered them all in class yet.
      Types of computer information Subtypes Examples
      Programs Operating system Windows95, Windows 98, Windows NT
      Mac OS 8
      Linux
      Unix
      Application Word program
      Excel program
      Access program
      Netscape program
      Data System information User Name and Password
      Internet address
      Network connection
      Printer description
      Icons, screen colors
      Sound files - "The Windows Sound"
      User information Word processing document - mostly text
      Spreadsheet document - text and numbers
      Database document - text and numbers
      Graphic file - can be animated
      Sound file
      Video - Graphics and sound together
      Macro script - a small program written by a user, stored as a document, executed by the corresponding application
    7. File sizes for numbers
      1. ASCII codes will not work for calculations. The ASCII code for 1 is 49 and the ASCII code for 2 is 50. If we add the ASCII codes we get 49 + 50 = 99. This is not the ASCII code for 3, which is 51, but the ASCII code for c, which is not even a number. We must use the binary code for storing numbers to be used in arithmetic. (To display number on the screen or printer, they are generally translated into ASCII by the computer, prior to display. Similarly, numbers come from the keyboard in ASCII and are converted to numbers before storage, if they are to be used for calculations. If you are typing a word processing document, the numbers get stored as characters - ASCII codes.)
      2. Computers can store numbers either as integers - whole numbers - or a "floating point" numbers - numbers with a decimal point.
        1. Integers use the straight binary number system as we have learned it in class. There are several storage arrangements. One or more bytes will be set aside for each integer, depending on how large a value we want to be able to store. For signed numbers (ones that can be + or -), generally the high-order bit is used for the sign, which reduces the size of the largest number that can be stored. The standard options are one, two or four bytes per integer. Two bytes is often called a "word", and four a "double word." It is important to pick the right scheme, depending on what range of numbers the program must accommodate. If too many bytes are allotted, storage is wasted, although with the low price of memory these days, that is not as important as it used to be. The real problem comes if too few bytes are allotted; then there are numbers that occur in the real world but cannot be stored in the computer.
          1. Example: What is the largest unsigned integer that can be stored in one byte?
          2. Example: What is the largest signed integer that can be stored in one byte?
          3. Example: What is the largest signed integer that can be stored in two bytes?
        2. Floating point numbers are stored in the form of a decimal number times an exponent, or power, or x × 10y, for example 0.5348 × 10+47. Standard schemes are four bytes per number, or eight bytes. The exponent in some schemes can be as high as 10+300 (a 1 followed by 300 zeroes) or as small as 10-300
        3. The file size, then, is the number of numbers times the bytes per number. If we have some numbers that are small and some that are large, we can have a mixed scheme. In this case, we find the size for each storage scheme and then add up the individual schemes to find the total.
        4. Example: How many bytes are required for 5,000 integers at two bytes per integer, and 2,000 floating point numbers at eight bytes per number?
    8. Computer programs or instructions. Almost all computers (and all current ones) use the same scheme for storing computer instructions (these would be in exe or com files). Data in the computer is stored in RAM memory, which is organized into bytes. The storage locations are numbered from 0 to the number of bytes of storage, minus 1. That number is called the address. The storage locations must be cheap, because there are so many of them, and hence incapable of doing arithmetic; a special location called the Accumulator is used as temporary storage where arithmetic can be done also. To add two numbers, for example, the computer copies or loads the first number into the accumulator, then adds the second number to the value already in the accumulator, and finally copies the value in the Accumulator (now containing the sum of the two numbers) into the address set aside for the sum. It is important to realize when thinking about this, that the adding, copying or loading does not change what is in the original location, only what is in the final location.

      A computer instruction, then, has two parts; a number called the "operation code" or "op code", representing the instruction (simple load from memory to accumulator, add from memory to accumulator, store from accumulator back to memory, multiply from memory to accumulator, copy from memory location to screen or disk, and so forth), and the address of the memory location to be used.

      The total set of instructions that a computer is capable of  (each type and model is different) is called the "Instruction Set" for the computer (technically, for the Central Processing Unit or CPU.) The more separate op codes a computer has in its Instruction Set, the more specifically it can carry out instructions, and the fewer instructions it needs to carry out to get a specific task done. However, having many op codes can mean that the microprocessor is very complicated, and therefore slower. (There used to be two divergent approaches - RISC or Reduced Instruction Set and CISC or Complex Instruction Set. RISC computers were supposed to be faster because it was felt that they could make up for needing to carry out more of their simpler instructions, by being much faster. However, this supposed advantage has not shown up in practice. It has also helped the CISCs that they have adopted many of the best ideas of the RISC advocates. The Intel Pentium processors are CISCs.)

      How much storage room does a computer instruction occupy?
      1. One factor is the number of different instructions that the CPU is capable of. Using the formula for the number of different values that can be stored in n bits, and knowing how many different op codes a given design needs, we can determine that part. For example, if a CPU is to have 64 op codes, we will need 6 bits. That may seem to be a large number of op codes, but many microprocessors have extra hardware such as Registers, that are capable of some arithmetic that can speed up operations on a series of numbers, and Interrupts that can handle critical events by taking the computer away from routine tasks. These features greatly increase the number of op codes needed, and some CPUs have hundreds and even thousands op codes, or more.
      2. The second factor is the size of the address portion of the instruction. This determines the maximum number of storage spaces that the CPU can have connected. If the address is one byte, that CPU could only use 256 RAM locations. Set aside two bytes, and it can use 65,000+ locations. It is not uncommon today to have five bytes for the address, with a capacity of 10+ terrabytes or 10,000 gigabytes. The program is also stored in RAM, and so additional capacity is required here. The total memory requirement is the maximum number of storage for data (text, graphics, sound and numbers) plus the maximum size of a program in instructions. This maximum number is called the "address space" of the processor. (These days, programs are large enough so that they are loaded into memory only when they are needed. A "dll" extension in Windows is the extension for such a piece of a program.)
      3. So, a CPU with 65,000+ op codes and 10 terrabytes of address space requires 2 bytes per instruction for the op code and 5 bytes per instruction for the address, or a total of 7 bytes of storage for each instruction. A program that is 1 million instructions long will require 7 × 1,000,000 bytes, or 7,000,000 bytes (7 MB). In general, (bytes per instruction) = (bytes for op codes) + (bytes for address) and (program size in bytes) = (size of instruction in bytes) × (size of program in instructions).
  9. More Windows basics - Windows Explorer and the hierarchical file system. Windows Explorer is the Windows tool of choice for managing files
    1. Last week we used Drag 'N Drop to copy files. Today we will use Cut and Paste.
    2. Open Windows (NT) Explorer (Start / Programs) and change its options to show all information
      1. Choose menu item View / Options and then the "View" tab at the top of the Options dialog
      2. Above the list box, make sure that "Show all files" is clicked
      3. Below the list box, make sure that "Display the full MS-DOS path in the title bar" is checked. This refers to the title bar on the right pane of Windows Explorer. If this is unchecked, Explorer shows only the final (lowest) folder name
      4. Make sure that "Hide MS_DOS file extensions for file types that are registered" is unchecked. Otherwise, Explorer does not show the file extension for most file names.
      5. Make sure that "Include description bar for right and left panes" is checked. Otherwise, Explorer does not show you what drives and folders you are looking at.
      6. Click OK. This puts your choices into effect.
    3. Open the test floppy diskette in Windows (NT) Explorer. (Do this by clicking on the drive icon. Click on a file, then right click on it and choose "Copy." Go to another folder on the C: drive and right click on it, choosing "Paste" (was not available until you had something copied to the clipboard.
      1. This will also work with a selection of files.
      2. "Cut" will remove files from the original location, after they are pasted into the new location
      3. "Cut" can also work with Drag 'N Drop by holding down the <Alt> key.
      4. There are keyboard alternatives for Copy/Cut and Paste. <Ctrl>c and <Shift><Insert>do copy, <Ctrl>x and <Ctrl><Delete> do Cut, and <Ctrl>v and <Ctrl><Insert> do paste.
  10. Lab 5. Read the following steps all the way through before starting.
    1. In New Perspectives On Microsoft Office 2000 Professional, do Excel Tutorial 1 on pages EXCEL 1.0 through EXCEL 1.40. The lab assignment is to edit and print out the file Inwood 2.xls according the the directions throughout the Tutorial - in other words, start at the beginning of the tutorial and work your way through it. No other part of this tutorial is assigned.
    2. Download the original Inwood.xls from the course web site using the link under Agenda 6. Alternately there are directions at the back of this book. If you are going to use the method in the back of the book, I recommend using the ISBN method, since I downloaded the wrong files using the title of the book. The ISBN can be found in the book on the page facing the Preface.
    3. Do NOT save the file to the location given in the book. Save it to your floppy diskette instead.
      REMINDER: being able to control where you save your files to is part of this course! Make sure you can do this without looking at a book or notes! So is starting Excel.
    4. When you are done, make a title sheet using Word, with (a) your name, and (b) what assignment this is (Lab 6), print out a copy of your edited file, staple the pages together, and turn in this copy, by the start of the next class. This is your lab report. You can print using either:
      1. The printer icon on the toolbar
      2. The menu item File / Print, then click OK on the "Print" dialog.

Assignment 6. Please write or type "Assignment 6" on the work you turn in for this assignment.

  1. If a file is 32 seconds long, has 25,000 samples per second, has 16-bit sound and is in stereo with a compression factor of 3.5, how big is the file?
  2. If a file with numerical data has 1,100 four-byte integers and 300 eight-byte floating point numbers, how big is it?
  3. In Computers, Technology, and Society, answer the following Review questions on Pp 6-38 and following: 4, 7, 9 and 10.