48
Welcome to the lecture 1 slides for Introduction to Computer Systems. 1

Lecture Slides 01

Embed Size (px)

DESCRIPTION

Lecture Slides

Citation preview

Welcome to the lecture 1 slides for Introduction to Computer Systems.

1

2

In these slides, we will look at a general introduction to computer systems. We

will consider different types of computer that have been built over the years, and

the fundamental ideas that make their operation possible.

3

ENIAC was the first programmable general purpose electronic computer. It was

digital and capable of being reprogrammed to solve a large number of numerical

problems. Its speed was 1000 times greater than that of electro-mechanical

machines before it. ENIAC was enormous and occupied an area of 50x30 feet.

Very different to a modern tablet or smartphone, which is more powerful still!

But how did this happen?

4

Four key inventions made a huge impact on the development of computers.

Originally, vacuum tubes were used as switches. But the large size, high power

consumption, high cost and short lifetime were very limiting. In most

applications, solid state devices such as transistors have replaced vacuum tubes.

Next came transistors, which are semiconductor devices used to amplify or

switch electronic signals ON and OFF. Transistors use less power, are more

reliable, much cheaper, and much smaller.

Check the links given in the slide for a history of evolution of computers.

5

Newer computers depend on integrated circuits.

An integrated circuit (IC) is an electronic circuit in a small package (or chip) of

semiconductor material, usually silicon. ICs may contain several billion

transistors and other components. Combining many tiny transistors into a small

chip was an enormous improvement over using discrete electronic components.

The fourth generation of computers came about after the invention of

microprocessor. A microprocessor integrates all of the functions of a central

processing unit (CPU) onto a single IC, and reduces the cost of processing power.

All modern CPUs are microprocessors. Microprocessors can be found in

computers, and in embedded systems such as mobile phones, cars, microwave

ovens and more.

6

The first digital computers were developed in 1940s. The first personal computers

were sold in 1970s, and laptops in the mid 1990s. Today, computers are

everywhere.

A general purpose computer, such as a desktop PC, can perform many functions.

An embedded system is a computer built for a particular function, and is found in

cars, washing machines, air conditioners, and many other places. An embedded

system usually does not look like a computer, and often there is no keyboard

monitor or mouse. However, like any computer, it has a processor, software and

other peripherals.

Real time computing must guarantee a response within a specific time, or

deadline. These may be used in a chemical plant, for example. Failure to meet the

deadline may result in undesired consequences.

7

Consider the above questions within your own context. Think about different

types of computers you have used and what you used them for. There are general

purpose and dedicated applications. Can you think of some applications of

dedicated computers? There are many: Banking, washing machines, GPS and

microwave ovens. Modern cars have antilock braking systems and stability

controls.

8

The changes brought in by computers are as revolutionary as those of the

industrial age.

These are somewhat differing views on the changes brought about by computers

and the impact of computers on society. Bill Gates thinks of computers very

positively. (Perhaps for obvious reasons!) But others are also able to see some

downsides. Nonetheless, it is difficult to imagine our lives today without

computers.

9

Here are more examples of some of the applications of digital computers.

Autopilots, robotics, medical diagnosis procedures, telecommunication and

traffic control are just some examples of sophisticated computers. How many

more have you experienced?

10

A computer is a system of hardware that performs arithmetic operations,

manipulates data, and makes decisions.

A computer is much faster and more accurate than people.

Computers are given a set of instructions that tell it exactly what to do at each

step of its operation. This set of instructions is called a computer program, and

there is hardware to run it.

11

The major parts of a computer are

Input device: A mouse, keyboard, disk, or some sensor

Memory unit: (Read only memory (ROM) or Random access memory (RAM).

Typical RAM capacity in today’s computers is measured in gigabytes.

Permanent storage: Hard drive or Solid State Drive – these store data even when

the computer is switched off. Typical size is in terabytes.

Control unit and ALU: Key parts of the central processing unit, which process

data and control program execution.

Output unit: A monitor, speaker or printer.

12

This picture illustrates the five major functional blocks in a computer given in the

previous slide. Each block performs specific functions to carry out the

instructions given in the program.

Input unit—Processes instructions and data into the memory.

Memory unit—Stores data and instructions received from the input unit.

Control unit—Interprets instructions and sends appropriate signals to

other units as instructed.

Arithmetic/logic unit—Arithmetic calculations and logical decisions are

performed. Then send results to the memory unit to be stored.

Output unit—Presents information from the memory to the operator or

process.

13

There are different types of computers. Examples include Microcomputer,

Minicomputer, Mainframe and Microcontroller.

A microcomputer or minicomputer is a typical desktop PC. A mainframe is a

more powerful system intended to support many users.

A microcontroller is a small computer on a single integrated circuit. It has a CPU,

memory (i.e. RAM and ROM) and input/output ports to communicate with

external devices (peripherals). They are common in embedded systems, which are

computer systems with a dedicated function.

14

This is an inside view of a desktop PC that shows different components.

All electrical/electronic systems require a power supply to work. The PC has a

power supply unit which supplies power.

RAM (random access memory): Smaller memory (2-8 GB) is used by the

computer during program execution. As soon as the computer is switched off,

whatever is in the RAM will be gone.

Hard disk: Very large permanent storage (1 TB or more) for the computer. Data

is written to RAM while programs execute, and then saved to the hard disk when

a Save operation is performed. Unlike RAM, the hard disk retains saved data

when the computer is switched off.

Cooling unit: When the computer is running, the CPU generates tremendous

amount of heat. The processor in this picture is enclosed with a complete cooling

unit, which has a fan and a heat sink to dissipate the heat.

Optical Drive – for DVD/Blu-ray discs.

15

Removing some components shows the motherboard. This is the main circuit

board of the computer. RAM and other devices can be plugged into the slots on

the board. A tablet battery keeps a small part of the motherboard running even

when the computer is off. This circuitry is responsible for keeping track of the

time and date, and storing some settings in the memory that the PC needs when it

is first turned on.

16

This is an example of an embedded computer. The basic functions of a mobile

phone are controlled by a complete computer system embedded in each phone.

The computer system moves data around between the screen, keypad,

microphone, speaker, camera and the wireless network.

17

Computers understand nothing but digital 1s and 0s. So, every program and all

data has to be converted to a stream of 1s and 0s before the computer can execute

it.

Every instruction of a program is translated into a series of low level instructions

consisting of high and low states. A high state is logic 1 and is normally

represented by a positive voltage - for example, 5V, 3.3 V or 2.4V. A low state is

logic 0 and is normally represented by 0 Volt.

18

Timing diagrams are used to describe how digital signals change with time. The

horizontal axis is time, and the vertical axis shows the state of the signal (1 or 0).

In this diagram, the signal changes between a digital 1 (battery voltage) and

digital 0 (no voltage).

19

Oscilloscopes are used to display signals, in a way similar to a timing diagram.

An oscilloscope can show the relationship between two or more digital signals.

This is useful for engineers designing electric circuits, who can see input and

output signals and check that circuits are working as intended.

20

Quantities in physical systems must be represented numerically. In the world

outside of the computer, quantities are analogue. Inside the computer, quantities

must be stored in a digital form.

21

In analogue representation a quantity, such as temperature, is represented by a

continuously variable with respect to time. For example, mercury thermometers

use a column of mercury whose height is proportional to temperature. In

analogue electrical systems, the measured physical quantity (sound, speed,

temperature) is converted to a voltage or current proportional to that quantity.

This voltage or current is then used by the system for processing and display.

22

In 1875, Alexander Graham Bell figured out how to change his voice into a

continuously variable electrical signal, send it through a wire, and change it back

to sound energy at the other end.

23

In digital representation a quantity is represented by a set discrete values or steps.

In practice, when we take a measurement of an analogue quantity, we round it off

to a convenient precision. In other words, we digitize the quantity. A digital clock

is an example of a system where we see a discrete value – if it displays the time

in hours and minutes, we might see 9:33 or 9:34, but it has no way of showing us

9:33:24.219.

24

Everything around us is analogue in nature, that is, varies continuously with time,

not in discrete steps. To get information into a computer system, it must be

converted from analogue to digital. Conversion to digital representation

introduces some inaccuracy depending on the size of the discrete steps used in

digitisation.

25

Consider two types of thermometer. In an analogue thermometer, a slight increase

in temperature will cause a slight rise in the mercury. Any change in temperature

will cause a change in the mercury, no matter how small. A digital thermometer

will only give values in a finite set of steps – for example, it may give

measurements in steps of 0.5°C. The actual temperature may gradually increases

from, 22.0 to 22.5 degrees Celsius, but in digital representation the temperature

may change abruptly from 22.0 to 22.5 degrees Celsius. It misses the

intermediate values such as 22.1, 22.2 etc. In this case 0.5 degrees Celsius is the

resolution (or accuracy) of the digital representation. The step size can vary from

one system to another.

26

The mobile phone is a mixed signal system. Voice, an analogue signal, is picked

up by an analogue microphone, then converted to a digital signal (a stream of 0s

and 1s). This is processed by a computer in the phone, and eventually the digital

audio signal is converted back to analogue form and is fed to a speaker to

generate sound.

27

In this temperature regulation system, we can set the desired temperature in 0.1

degree increments.

A temperature sensor takes the room temperature and converts it to a proportional

voltage. This analogue voltage is converted to a digital quantity by an electronic

circuit known as an analogue-to-digital converter (ADC).

The digital processor then compares this digital voltage with a pre-set digital

value for the desired room temperature and produces a digital output depending

on whether the heater needs to be turned on or not.

The digital value is then converted to an analogue quantity (voltage) by an

electronic circuit known as a digital-to-analogue converter (DAC).

The voltage is then applied to a heating element, which will produce a heat that is

proportional to the voltage. This will control the room temperature.

28

Despite some inaccuracies introduced by the digital representation of an analogue

quantity, digital representation offers numerous advantages. Digital systems are

much easier to design, make it easy to store and act on information, and are more

reliable. The inaccuracy can be reduced to a negligible level by using larger

number of bits (1s and 0s) to represent an analogue quantity in digital form. This

is referred to as increasing the resolution in digital representation. Using more

bits allows a larger range of values to be stored.

29

Understanding digital systems requires knowledge of the decimal, binary, octal,

and hexadecimal numbering systems. The coming slides (and modules) will

introduce some of these number systems and conversions among them.

30

The decimal system is a positional value system in which the value of a digit

depends on its position.

The decimal point separates the positive powers of 10 from the negative powers.

The number 2745.21410 is

(2 x 103 )+ ( 7 x 102 ) + ( 4 x 101 ) + ( 5 x 100 ) + (2 x 10-1 ) ( 1 x 10-2 ) + ( 4 x

10-3 )

31

When counting in the decimal system, we start with 0 in the unit position and

take each digit in progression until we reach 9. Then we add a 1 to the next higher

position and start over with 0 in the first position and so on.

With 2 decimal places we can count through 102 = 100 different numbers ( 0 to

99).

With 3 decimal places we can count through 103 = 1000 different numbers ( 0 to

999).

With N decimal places we can count through 10N different numbers : 0 to

(10N -1).

The largest number always be (10N -1).

32

It is difficult to design electronic circuit with 10 different voltage levels. Almost

every digital system uses the binary number system (base 2) because it is easy to

design circuits that operate with only two voltage levels.

The binary system is also a positional value system.

The most significant bit (MSB) is the left most bit with largest weight.

The least significant bit (LSB) is the right most bit with smallest weight.

The weights of each digit increase by a factor of 2 as the positions move from

right to left.

The number 1011.1012 = 11.62510

(1 x 23 ) + ( 0 x22 ) + ( 1 x 21 ) + ( 1 x 20 ) + (1 x2-1 ) + ( 0 x 2-2) + ( 1 x2-3 )

=8 + 0 +2 + 1 + 0.5 + 0 + 0.125

33

With 4 bits we can count through 24 = 16 different numbers (00002 to 11112 )

that means ( 0 to 15) in decimal number system.

With N bits we can count through 2N different numbers 0 to (2N -1 ) in decimal

number system

The largest number always be( 2N -1)

34

The world around us is analogue in nature. This graph shows how an analogue

signals that varies continuously with time can be converted into digital form

using the binary system.

35

Here the analogue temperature signal is shown in red. The dots in the picture

show the temperature values at regular intervals. To record the temperature in

digital form, the values at the intervals will be converted to their binary

equivalents.

To represent 50 in digital form, we need 6 bits, because 6-bits gives us 26 or 64

possible values. Using only 5 bits would give us 25 or that is 32 values, which is

less than 50. If we have to sample higher analogue temperature, more bits are

required.

36

In digital systems, the range of the current or voltage is more important than the

exact value.

Digital circuits represent two states, 1 and 0. We never get a perfect voltage to

represent them because of the operational limitations of the actual circuits. So,

the designers specify the voltage ranges to be considered as logic HIGH and logic

LOW.

There is a range of voltages in the middle that are considered invalid. They are

neither 1s nor 0s and must be avoided.

37

Some examples of electrical devices that have two states include - Light

bulb (off or on), Diode (conducting or not conducting), Relay (energized

or not energized), Transistor (cutoff or saturation) and Photocell

(illuminated or dark).

38

How do we represent binary quantities? The oscilloscope and logic analyzer are

used to produce timing diagrams.

Logic LOW is represented by 0 volt and logic HIGH by 4V.

At time t1 it changes to logic HIGH and at t2 it becomes logic LOW.

39

Digital circuits take and produce predefined voltage range, which correspond to

binary 1 or 0.

40

In both cases, an input logic LOW to this circuit produces an output logic HIGH

and vice versa. The circuit thus acts as an inverter.

In Case I, the output voltage of 4V is considered logic HIGH which is a slightly

less than the input voltage of 5V due to the operational limitations of the circuit.

Although the exact voltage levels differ, they both represent the same logic level.

41

Computers can communicate with other devices using either parallel or serial

communication.

Here is a depiction of parallel transmission, where the computer is connected to

the printer. We are trying to print the word “Hi”.

Both “H” and “i” have eight bits. All eight bits are sent simultaneously over eight

wires for parallel transmission.

42

This is an illustration of serial transmission.

The data are sent one bit at a time over a single wire for serial transmission.

The least significant bit of “H” is sent first and the most significant bit of “ï” is

sent last.

43

One must trade off between transmission speed and cost when choosing between

parallel and serial transmission.

44

Circuits can be described as non-memory or memory circuits.

When an input signal is applied to a Non memory circuit, the output will also

change depending on the input. When the input signal is removed, the output

returns to its original state.

When an input signal is applied to a Memory circuit, the output will change its

state according to the input. It will then remain in the new state even after the

input is removed. Computers need memory to load and run applications. There

are different types of Memory elements e.g. magnetic, optical etc.

45

This is an example of how pictures are represented and stored in a computer.

Binary numbers are used to represent the brightness of each pixel in an image.

These numbers are stored in memory. Each pixel is identified by a column

address and a row address.

To display an image on the screen, the binary numbers are converted to the

corresponding analogue voltage, which in turn controls the amount of light

shining through the LCD.

46

Digital technology can solve many of the needs of the world.

47

48