CSE1301 Computer Programming: Lecture 1 Computer Systems Overview.

26
CSE1301 Computer Programming: Lecture 1 Computer Systems Overview
  • date post

    21-Dec-2015
  • Category

    Documents

  • view

    217
  • download

    0

Transcript of CSE1301 Computer Programming: Lecture 1 Computer Systems Overview.

Page 1: CSE1301 Computer Programming: Lecture 1 Computer Systems Overview.

CSE1301 Computer Programming:

Lecture 1Computer Systems Overview

Page 2: CSE1301 Computer Programming: Lecture 1 Computer Systems Overview.

AlgorithmAlgorithm: A set of instructions describing how to

do a task (or process).

eureka!

ProgrammingProgramming: C: C

Page 3: CSE1301 Computer Programming: Lecture 1 Computer Systems Overview.

Topics

• Hardware components

• Memory and Mass Storage

• I/O Devices

• Computer Networks, modems

Page 4: CSE1301 Computer Programming: Lecture 1 Computer Systems Overview.

Hardware Components of a Typical Computer

• Central Processing Unit (CPU) - performs the basic operations.

• Memory - holds algorithms and data. • Input/Output (I/O) Devices - feed algorithm, data into

memory; pass on results of the computer's activities.

Input/OutputDevices

Central Processing

UnitMemory

Page 5: CSE1301 Computer Programming: Lecture 1 Computer Systems Overview.

Features of Computers

• Speed: 100-650 mips.

• Reliability.

• Memory– can store ~109 information items– can retrieve information in 75 nanoseconds

(1 nanosec. = 109 sescs.).

• Cost: very low compared to human labour.

Page 6: CSE1301 Computer Programming: Lecture 1 Computer Systems Overview.

Transistor

• Gate: a group of transistors; – low -> 0, high -> 1 (digital quantities)

• Gates are the basic building blocks of computers.

Base

Collector

Emitter

Page 7: CSE1301 Computer Programming: Lecture 1 Computer Systems Overview.

Types of Gates

AND Gate OR Gate NOT Gate

Page 8: CSE1301 Computer Programming: Lecture 1 Computer Systems Overview.

Boolean Algebra

A B

0 0

0 1

1 0

1 1

AND Gate

A AND B

0

0

0

1

0

1

1

1

A OR B

OR Gate

Page 9: CSE1301 Computer Programming: Lecture 1 Computer Systems Overview.

Boolean Algebra

A

0

1

NOT A

1

0

NOT Gate

Page 10: CSE1301 Computer Programming: Lecture 1 Computer Systems Overview.

What is a "Chip"?

• Size: ~ 3 x 3mm.

• A chip consists of more than 100,000 transistors.

Page 11: CSE1301 Computer Programming: Lecture 1 Computer Systems Overview.

Memories

• Computers have to remember data.

• Registers: – store frequently used data; short term storage.

• Main memory: – stores less frequently used data; longer term

storage.

Page 12: CSE1301 Computer Programming: Lecture 1 Computer Systems Overview.

What is a "bit"?

• Derived from BInary digiT

• 0 or 1

• a BYTE = 8 bits

• a kilobyte = 210 bytes = 1024 bytes

• a megabyte = 1024 KB = 1,048,576 bytes

• a gigabyte = 1024 MB = 230 bytes

Page 13: CSE1301 Computer Programming: Lecture 1 Computer Systems Overview.

Main Memory

• Word = a fixed size chunk of bits which stores data – (e.g. 8, 16, 32 or 64 bits).

• Cells (word size): most of the memory. – (Slower, cheaper technology than registers)

• 106 cells < typical memory < 107 cells. – (e.g. 32 MB RAM: 32 megabytes of Random Access

Memory)

• Each cell has a unique address.

Page 14: CSE1301 Computer Programming: Lecture 1 Computer Systems Overview.

Mass Storage

The computer stores information for longer periods of time in FILES on mass storage.

• Cartridge. • Hard drive. • Floppy disk. • Tape . • Cassette.

• CD-ROM (Compact Disk Read-Only memory). • Flopticals.

Page 15: CSE1301 Computer Programming: Lecture 1 Computer Systems Overview.

Input/Output Devices

• I/O Devices (Peripherals) are used to communicate with the outside world.

• Input Devices: – keyboard, mouse, microphone, optical reader for

written text, sensors (camera, infra-red), punch-cards, "mark sense" cards.

• Output Devices: – video screen, text window, line printer, laser writers,

effectors which operate machinery, audio speaker.

Page 16: CSE1301 Computer Programming: Lecture 1 Computer Systems Overview.

Other devices?

• Other computers - i.e. networking.

• Secondary storage – (devices for cheap storage of vast amounts of

information).– eg. magnetic disk and tape

Page 17: CSE1301 Computer Programming: Lecture 1 Computer Systems Overview.

Uses of Computer Networks

• Electronic mail (e-mail). – e-mail address: [email protected]– actually stored as: 130.194.64.162

• Electronic news – read monash.csse.cse1301

• Access to remote machines – ftp: (File Transfer Protocol)– World Wide Web (www)

Page 18: CSE1301 Computer Programming: Lecture 1 Computer Systems Overview.

Uses of Computer Networks

• Shared databases.

• Share input/output devices.

• File servers.

Page 19: CSE1301 Computer Programming: Lecture 1 Computer Systems Overview.

CSE1301 Computer Network

• Network of IBM-compatible PCs. 32-bit machines (also 16-bit buses, software)

• Central file servers.

• Connected to other computers at Monash.

• On the Internet.

Page 20: CSE1301 Computer Programming: Lecture 1 Computer Systems Overview.

How do computers communicate?

• Computer networks transmit data in packets.

• The packets are sent via links from computer to computer.

• Each intermediate computer receives and retransmits the message.

Page 21: CSE1301 Computer Programming: Lecture 1 Computer Systems Overview.

Types of Computer Networks

• Local Area Networks (LAN) – Located close to each other.– Example: the PCs in the lab.

• Long Haul Networks – Separated by hundreds or thousands of miles.– Physical wires, telephone lines, satellites, etc.

Page 22: CSE1301 Computer Programming: Lecture 1 Computer Systems Overview.

Modes of communication

• Parallel communication: – all the bits are tranferred at the same time – each bit on a separate line

• Serial communication: – one bit at a time.

01

Page 23: CSE1301 Computer Programming: Lecture 1 Computer Systems Overview.

Modems (MOdulator-DEModulator)

Monash Computer

ModemHome

Ccomputer

ModemDigitalData

DigitalData

Audio signalphone lines

Page 24: CSE1301 Computer Programming: Lecture 1 Computer Systems Overview.

Modems (MOdulator-DEModulator)

• Digital data BUT phone lines send audio signals.

• speed of serial transmission: – bits per second (bps)

• common measure: – baud rate

Page 25: CSE1301 Computer Programming: Lecture 1 Computer Systems Overview.

Summary

• Computer = CPU + I/O devices + memory • Transistors, gates, chips -> hardware. • Main memory vs Mass Storage • Computer communications: I/O devices,

networks, modems• Jargon and achronyms: demystification begun...

Page 26: CSE1301 Computer Programming: Lecture 1 Computer Systems Overview.

Further Reading

Brookshear:

• 4/e (1994): 1.1, 1.2, 2.6, 3.8

• 5/e (1997): 1.1 - 1.3, 2.6, 3.5

• 6/e (2000): 1.1 - 1.3, 2.5, 3.5