Binary Numbers

This is currently a mere list of links.


Compilers, Machine instructions, Variables, Memory

The compiler translates the source code (the Pascal statements like writeln) of your program into machine language. That's called the object code version of your program. The machine language is just a series of numbers that the CPU recognizes as instructions.

When you run your program, the operating system reads in the object code and hands over control to those instructions.

The machine language instructions don't use named variables. Instead, they refer to locations in memory that the compiler has assigned to each variable. For example, your variable called "tax" may be stored in location 27. If your program adds 100 to tax, then the machine language instructions will get the current value from location 27, move it into the CPU, add 100, and move the result back to location 27.

Since different kinds of data (integers, real numbers, etc.) occupy different amounts of space in memory and require different kinds of CPU operations, the compiler has to know what type of data is in each variable.

CSCI1200: Midterm Review, General

Midterm Review: General Computer Stuff

October 1996

History of Computers

Computers were originally developed to do arithmetic, such as calculating the tables used to aim naval guns.

Major stages of hardware:

Every change made computers smaller, faster, cooler (literally), less expensive.

Major stages of software:

Major changes in computer usage:

CSCW

CSCW stands for Computer Supported Collaborative Work. It's the next stage in computer usage, and it's really here already. "Collaborative" means working together. Applications that we've seen that help people to work together, whether they are on the sam e campus or in company offices thousands of miles apart, include:

E-Mail, Pine

Pine is an application that runs on Unix machines. Your e-mail address is on a Unix machine (spot, rintintin, ucb, etc.).

Pine lets you send e-mail, read e-mail you've received, and organize your e-mail in "folders".

Pine isn't the only e-mail application. Just about every unix machine runs "mail", a less sophisticated but adequate e-mailer. Lots of people with PC's or Mac's prefer "Eudora", which automatically gets your mail from the Unix machine and lets you rea d, edit, and send using windows and pulldown menus.

E-mail is pretty reliable. If your mail doesn't go through quickly, you will usually get a warning, and if it still fails to go through after a few days, you'll get a message saying delivery has failed.

Even though it's reliable, e-mail is NOT SECURE! Hackers often get into it, and government agencies have the right to read it, especially when it's sent over public systems (like the CU computers). Also, it's easy to fake an e-mail message, making it look like somebody else sent it.

So: Don't send important information, like your credit card PIN, over e-mail!

E-mail messages can be made more secure by using the PGP (Pretty Good Privacy) system. Look it up on the Web if you're interested.

There's a lot of politics surrounding PGP, which is interesting as well. PGP was a developed by Phil Zimmerman, here in Boulder, and made available to anyone who wants it. The US Govt. would prefer that people didn't use it, because it makes it hard f or the FBI and CIA to break into computers. (This isn't paranoia on my part -- that's their official reason.) A lot of European governments actually recommend that people use it, because it increases business security. There are strong arguments and feeli ngs on both sides.

Binary numbers and Digital data

Binary numbers

The binary system represents numbers using just two digits, 1 and 0. It's used for virtually all computer data storage and calculation. It's especially useful for computers because it is

For details of binary arithmetic, see Web page about binary

Digital data

"Digital" data is represented as numbers. Those are usually binary numbers, but they don't have to be. Just about anything can be represented digitally: pictures, sounds, shapes, measurements of energy or voltage, etc.

Most of the things we represent digitally on computers are "analog" data in the real world -- that is, they are infinitely variable. A musical tone, for example, doesn't just have 10 levels of volume. It has infinite levels. But it's possible to approx imate the tone by representing it with just enough levels to make it sound acceptably good.

Digital data is useful because it can be stored on computers and communicated reliably between computerized systems. CD's store music as digital data; old-style phonograph records and cassette tapes store it as analog data.

Digital data can also be used in calculations. Some of the things this is good for are correcting data that has errors in it, changing data to make it appear or sound differently (the spinning windows you often see on TV shows like Home Improvement are done digitally), and doing engineering calculations to predict how something like a new airplane wing shape will behave.

Hardware

Major components of a personal computer (or any other computer) are:

The computer also has a small amount of ROM (read only memory) that holds the basic input/output system. The computer needs this at bootstrap time, to give it the instructions for checking itself out and reading the operating system from disk. And it h as various i/o "ports" or "boards" for connecting to printers, modems, networks, etc.

The RAM is connected to the CPU by the data bus and the address bus. The CPU puts address information on the address bus, and reads or writes data to RAM over the data bus. It does this at the pace of the system clock, which runs at several megahertz (millions of operations per second). All these parts, along with the ROM, are on a single printed circuit board called the "mother board."

Computers get more powerful every year. Two changes to the hardware that will increase their power are increasing the clock speed and using a CPU with a larger "word" size -- 32 bit instead of 16, for example. A larger word lets the CPU do operations w ith larger pieces of data at each clock cycle. It may also allow the CPU to use more bits to specify memory locations over the address bus -- this lets the system work with more memory.

Applications

Applications are slick programs written by major software companies to perform common tasks.

Some of the most common applications are word processors (Word Perfect, MS Word), spreadsheets (Excel), database systems, communications programs, and graphics programs.

Learning to use computers

Computers and their applications change at an amazing rate. If you learn a detailed set of steps to perform a job with your PC today, chances are you will just have to learn a different one in six months. And if you tried to learn everything that you might possibly need, you'd spend all your time learning and have no time to do any work.

Because of this, you have to develop the ability to learn about computers "on demand." That is, when the work you're doing requires you to know something, learn it right then.

Techniques for learning on-demand

The three techniques most people use to learn about computers on demand are

You have to choose among the three techniques based on your environment and the demands of the task. If there's no one around who knows the system, you'll have to rely more on the manual and trying things out. If you're learning a programming language , you should be reluctant to depend too heavily on trying things out, because what works with your test data set may not work with all data.

When you get something new...

In addition to on-demand learning, you should try to get a broad overview of any new computer system or application that you'll be expected to use. There's often an on-line tutorial, which will give you an idea of what the system can do. Once y ou know that, you can postpone learning the details of how until you need it.

Operating Systems: DOS, Unix, and Windows

Operating Systems are programs that almost act like part of the hardware. They provide simple and consistent ways for other programs (and users) to work with files, to interact with the screen and keyboard, to connect to the modem, and other hardware- related operations.

On more powerful computers, operating systems also make it possible for several users to use the same machine simultaneously.

Some of the file-related goals of an operating system are:

Unix is an operating system invented at Bell Labs. Its commands, file structures, and general style of interaction are the basis of MS-DOS.

MS-DOS is an operating system originally developed for the first IBM-PC in the early 1980s. It's similar to Unix and to CP/M, another early microcomputer operating system.

A shell is a user interface to the operating system (OS). It lets the user command the OS to display directories, copy files, etc.

Windows is a Graphical User Interface (GUI) shell that runs on top of MS-DOS (Windows 3 and below) or replaces it entirely (WIndows 95 and Windows NT). It provides windows, pull-down menus, dialog boxes, etc., which other applications can use so they will have a consistent "look and feel". Macintosh has its own, similar GUI. This style of interaction was invented at Xerox's Palo Alto Research Center (PARC) and refined by Apple for the Lisa and Macintosh.

Some important commands for MS-DOS and Unix are as follows (there are equivalent commands in the Windows menus):

The Internet and the Web

The Internet was originally funded by the US Department of Defense, which wanted a reliable communications network in case of war.

E-mail and ftp were the most common ways of using the Internet until three or four years ago.

Gopher is a simple system that makes it easy for anyone to look for files on the Internet, but it doesn't display any graphics.

Web Browsers, invented about 1993, provide a graphical interface to all the files on the Web. Mosaic was the first browser. The commercial spinoff version of Mosaic is Netscape. Microsoft's Explorer is the chief competitor.

Web Browsers can only display the Web pages you ask for. To actually find pages, you need to look through the Web. Several techniques work:

For more tips, see the Web pointers page

The information on the Web is often suspect. A lot of it is advertising, or technical discussions by unqualified individuals. It's worth looking over, but bring a healthy dose of skepticism to whatever you find.

One good question is always: if this is such great information, why is it free? Stock quotes on the Web, for example, are free because they are delayed long enough to make them worth much less. If you like what you see, the providers expect you subscr ibe to their up-to-the-minute service.

A lot of how-to information on the Web is free because someone who was interested just decided to write it up in their spare time. But that usually means it hasn't been checked for accuracy by anyone else. (Like the Web site you're reading right now, for example!)

HTML and SGML

SGML stands for Standard Generic Markup Language. It's a standard way to represent information about how various parts of a document should appear. It was originally developed so that large documents, such as books or government reports, could be bid out to word processors or typesetters with different kinds of equipment.

HTML stands for HyperText Markup Language. HTML is a kind of SGML. It's what web pages are written in. HyperText is "beyond text". On the Web, that means it includes links that let you go to other pages or graphics or other programs, just by clicking on a word or an icon.

HTML looks like ordinary text with lots of weird codes mixed into it, surrounded by angle brackets. To see some HTML, select View Source from your Web Browser menu.

If you want to have your own Web page today, you'll probably have to write it in HTML, just like documents had to be written in some form of SGML for word processing or typesetting a few years ago. It probably won't be long before you'll just write yo ur Web page in a WYSIWYG (What You See Is What You Get) environment, like MS Word.

rtf and ftp

rtf stands for rich text format. MS Word and lots of other systems can store their documents in that format, for two reasons:

MS Word: Styles and Outlining

Styles and Outlining are two features of MS Word that can be used together. They will help you develop documents that are well organized and consistent, as well as easy to modify -- like a good program.

Styles

A "Style" in MS Word is a set of formatting commands (like Palatino font, 12 point size, 6 point spacing before, boldface).

You apply a Style to a paragraph of text (for headings, the "paragraph" is usually a single line) by selecting the text, then choosing the Style from the Style menu (upper left corner of the Word screen).

If you change the formatting of a Style (use the Format/Style... menu), then all the paragraphs in that Style will automatically change.

Styles "inherit" formatting information from their "parent" styles. See the Web page on Styles for more information.

Outline mode

MS Word lets you view and develop your document in Outline mode (under the View menu). You can choose to look at nothing but the top-level section headings, or however much more you want. That makes it easy to organize and reorganize things.

Outline mode is an alternative view of the document you will actually print in Normal mode. With Word's outline feature, you should not develop an outline, then start a new document to write the text that "fleshes out" the outline. Instead, the outline should contain the actual headings and subheadings of the document. Then, shift to Normal view and write paragraphs of text under the headings. The outline and the final report or paper are different ways of looking at the same MS Word file.

Since you can always shift back and forth between Outline and Normal view of the same document, you can keep track of its organization. You can even "drag" sections of the document from one point to another in Outline view, which is much easier than cu tting them and pasting them in Normal view.

If you start developing your document in Outline Mode, Word will automatically create some Styles for you, such as Heading 1 and Heading 2, and Normal (which you always get). You might have to modify them to appear the way you want, though.


RETURN to CSCI 1200 Home Page

- John Rieman

1. What is a "Network PC"?

2. What does a cache do for a computer?

3. What does a buffer do?

4. What is distributed processing?

5. Give an example of a client-server relationship

6. Give an example of parallel processing

7. What are some of the processors, besides the CPU, that may run in parallel in a PC?

8. What is the system bus?

9. If a document is 10,000 words long, and each word averages 6 characters in length, how much disk space will the document require?

10. Why does the number 32767 often pop up in programming? What might happen if you add 1 to 32767?