CS1011: Introduction to Computer Systems

Pete Jinks (me) & Peter Capon

CS1011 introduces the basic concepts and terminology of Computer Science & Computer Systems. It covers a great breadth of material, but not very deeply, providing a framework that reveals the relevance of, and relationships between the other CS course units, which go into more detail.

Books

We do not know of any book that covers the course, so you are not expected to buy any for CS1011. However, you might find some of the following helpful. All of them are in the Departmental Library and the Student Resource Centre, so you can read them there, or at least look at them before buying.

These are a readable introduction at about the level of an "Equinox" or "Horizon" programme if you are not familiar with computers (one of them should be recommended for CS1311):
"Computers" Long & Long
"Computers: Tools for an Information Age" Capron
"Essentials of Computing" Capron
"Computers & Information Systems with hands-on software tutorials" Szymanski et al.

These go into more detail, but often about different examples than we use. They may be helpful if you want a different viewpoint:
"Computer Science: an overview" Brookshear
"Introduction to Computing" Greenfield

This is recommended for CS1211 and CS1222, and has lots of information about hardware, which is mainly missing from the other books:
"Principles of Computer Hardware" Clements

What is Computer Science?

Early History

1623 Wilhelm Schickard (1592-1635), of T*:ubingen, W*:urttemberg (a friend of the astronomer Kepler), makes his "Calculating Clock" - a 6-digit machine that can add and subtract.

1786 J. H. M*:uller, of the Hessian army, conceives the idea of a "difference engine": a special-purpose calculator for tabulating values of a polynomial, which can approximate almost all useful functions.
e.g. for f(x)=$x sup 4$ we expect:

x=	0	1	2	3	4	5	. . .
f(x)=	0	1	16	81	256	625	. . .
If we repeatedly take the differences between adjacent pairs of numbers we get:
0		1		16		81		256		625		. . .
	1		15		65		175		369		. . .
		14		50		110		194		. . .
			36		60		84		. . .
				24		24		. . .
Because the highest power of x in f(x) is 4, the 4th set of differences is constant.

A difference engine works by repeatedly performing additions to generate values of a polynomial, for as many values of x as we want - we initialise the values to the first diagonal of differences above (0,1,14,36,24):
(-> means the value is unchanged)

x:	0	1	2	3	4	5	6	7	8
f(x):	0	1	16	81	256	625	1296	2401	4096
D1:	 1	 15	 65	 175	 369	 671	 1105	 1695	 2465
D2:	  14	  50	  110	  194	  302	  434	  590	  770	  974
D3:	   36	   60	   84	   108	   132	   156	   180	   204	   228
D4:	    24	    ->	    ->	    ->	    ->	    ->	    ->	    ->	    ->
  initialise:
    fx=0 D1=1 D2=14 D3=36 D4=24
  repeatedly:
    new fx = fx + D1
    new D1= D1 + D2
    new D2= D2 + D3
    new D3= D3 + D4
    D4 is unchanged

1822 Charles Babbage (1792-1871), of London, reinvents the difference engine & obtains government funding.

1832 produces a prototype segment, which operates on 6-digit numbers and 2 levels of differences. The complete engine was to use 20-digit numbers and 6 levels of differences.

Starting from x=0, moving in steps of 1, to calculate f(X) for an N-th order polynomial requires X steps, each of N additions. A simple serial method using a single adder would take XN time units.
A faster parallel method would do the N additions of each step simultaneously, taking just X time units, but at each step we would need both the set of "old" values and a set of "new" values to stop the additions interfering with each other.

Babbage used a pipelined method that, like the serial method, needs only one set of values, but is nearly as fast as the parallel method, as it takes 2X time units. He split each step into two, first calculating every other value, and then calculating the remaining interleaved values:

  initialise, and then repeatedly:
    new D1= D1 + D2,  new D3= D3 + D4,  new D5= etc.
    new fx = fx + D1,  new D2= D2 + D3,  new D4= etc.
    (as before, keep the final difference constant)
x:	0		1		2		3		4
f(x):	0	->	1	->	16	->	81	->	256
D1:	 -1	 1	 ->	 15	 ->	 65	 ->	 175	 ->
D2:	  2	  ->	  14	  ->	  50	  ->	  110	  ->	  194
D3:	   -12	   12	   ->	   36	   ->	   60	   ->	   84	   ->
D4:	    24	    ->	    ->	    ->	    24	    ->	    ->	    ->	    ->
[the bold numbers are the previous initial values] 1836 Babbage produces the first design for his "Analytical Engine".
The final design had three punch card readers for programs and data. The memory had 50 40-digit words of memory and 2 accumulators. It had conditional jumps, and a form of microcoding: the meaning of instructions depended on the positioning of metal studs in a slotted barrel. It would have done an addition in 3 seconds and a multiplication or division in 2-4 minutes.

1842 Babbage's difference engine project is officially cancelled.

1853 Pehr George Scheutz of Stockholm, completes the first really useful difference engine, operating on 15-digit numbers and 4th-order differences, with a printer.

1858 used to calculate astronomical tables for an observatory in Albany, New York. A second similar machine had a long useful life in the British government.

1871 Babbage produces a prototype section of the Analytical Engine's "mill" (CPU) and printer. No more is ever assembled.

Babbage spent the last 40-odd years of his life designing and redesigning his difference and analytical engines. The implementation of the difference engine was never completed, and that of the analytical engine barely started.

C.S. Lessons & Themes

Applications

Correctness

Automation

Algorithms

Notations

Analysis

Speed, Size, Cost

Technology
Techniques & Tools
Reliability
Infrastructure
Standardisation

Layers

We typically use a series of layers and transformations between them, each dealing with a different level of detail/complexity.
e.g. customer requirements
-> problem specification
-> solution design
-> program implementation
-> machine instructions
-> execution on a computer
-> digital logic
-> circuits
-> transistors
-> quantum electromechanics

Layers are as independent as possible but some interaction is inevitable

Each layer/transformation usually consists of sub-layers & sub-transformations.


Some transformations can be automated, others can't (yet)

Is Computer Science a science?

Scientists try to show they understand something, by predicting what will happen.
Engineers try things out to see what will happen.