Presentation is loading. Please wait.

Presentation is loading. Please wait.

Slide 0-1 Copyright © 2003 Pearson Education, Inc. Figure: Overzicht Informatica College 1 - September 5 (Docent: Frank Seinstra) Computer Science an overview.

Similar presentations


Presentation on theme: "Slide 0-1 Copyright © 2003 Pearson Education, Inc. Figure: Overzicht Informatica College 1 - September 5 (Docent: Frank Seinstra) Computer Science an overview."— Presentation transcript:

1 Slide 0-1 Copyright © 2003 Pearson Education, Inc. Figure: Overzicht Informatica College 1 - September 5 (Docent: Frank Seinstra) Computer Science an overview EDITION 7 / 8 J. Glenn Brookshear

2 Slide 0-2 Copyright © 2003 Pearson Education, Inc. Overzicht Informatica: Huishoudelijke Mededelingen (1) Web: –http://www.science.uva.nl/~fjseins/ –click op ‘Teaching’ UvA Blackboard: –http://blackboard.ic.uva.nl/

3 Slide 0-3 Copyright © 2003 Pearson Education, Inc. Overzicht Informatica: Huishoudelijke Mededelingen (2) College woensdag 7 september a.s.: –vervalt! College maandag 19 september: –vervanging Jan-Mark Geusebroek (o.a. AI, etc.) Let op (!) : –college-zalen steeds verschillend

4 Slide 0-4 Copyright © 2003 Pearson Education, Inc. Overzicht Informatica: Huishoudelijke Mededelingen (3) Vrijblijvend: schrijf-opdracht (max. 1.5 pnt): “informatica in medische praktijk / onderzoek” Voorbeelden: –Surveillance-camera’s in ziekenhuis Wat is typisch voor medische sector? Automatische herkenningstechnieken? –NOS Journaal, 2 September j.l. Patientgegevens toegankelijk voor hackers… –Tsunami December 2004 Computergestuurde technieken RIT?

5 Slide 0-5 Copyright © 2003 Pearson Education, Inc. Introduction: Computer Science - What is it? (1) A combination of many things... –includes a.o.: (1) hardware design, (2) programming, (3) human computer interaction, (4) artificial intelligence, etc... –in other words: mathematics, engineering, psychology, linguistics, biology, business administration, ethics, sociology, … Certainly not: –‘science’ of computer applications –‘science’ of programming in language ‘X’

6 Slide 0-6 Copyright © 2003 Pearson Education, Inc. Introduction: Computer Science - What is it? (2) Science of algorithms: –algorithm (informally): set of steps that defines how a task is performed compare: ‘recipe’ –machine-compatible representation = ‘program’

7 Slide 0-7 Copyright © 2003 Pearson Education, Inc. Algorithmen zijn overal: Denk aan de reeks stappen die je uitvoert als je een CD in een CD speler afspeelt

8 Slide 0-8 Copyright © 2003 Pearson Education, Inc. The central role of algorithms in computer science

9 Slide 0-9 Copyright © 2003 Pearson Education, Inc. Introduction: Computer Science - What is it? (3) Science of ‘abstraction’: –obtaining external properties of an entity, by hiding its internal details.

10 Slide 0-10 Copyright © 2003 Pearson Education, Inc. Introduction: Computer Science - What is it? (4) Abstraction... on abstraction... on...

11 Slide 0-11 Copyright © 2003 Pearson Education, Inc. Central issues identical in the past... - Abacus (ca. 50 BC) - Difference Engine (Babbage, ca. 1822) - ENIAC (Univ. of Pennsylvania, 1945)

12 Slide 0-12 Copyright © 2003 Pearson Education, Inc. … today... - Distributed ASCI Supercomputer 2 (Vrije Universiteit, Amsterdam, 2002) (contains 72 1-Ghz Dual Pentium-IIIs) - Earth Simulator (ES Center, Yokohama, Japan, 2001) (contains Ghz NEC CPUs)

13 Slide 0-13 Copyright © 2003 Pearson Education, Inc. … and in the future! World Wide Computing

14 Slide 0-14 Copyright © 2003 Pearson Education, Inc. C H A P T E R 1 Data Storage & Representation

15 Slide 0-15 Copyright © 2003 Pearson Education, Inc. Bits and Their Storage Information represented as patterns of bits (binary digits) A bit is either 0 or 1 (true or false) Meaning of bit(-stream)s varies numeric values, characters, images, sounds… Requires a device that can be in one of two states (& remain in that state as long as needed) Flip-flop circuits

16 Slide 0-16 Copyright © 2003 Pearson Education, Inc. The Boolean Operations AND, OR, and XOR Note: AND and OR exist in natural language!

17 Slide 0-17 Copyright © 2003 Pearson Education, Inc. AND and OR Gates

18 Slide 0-18 Copyright © 2003 Pearson Education, Inc. XOR and NOT Gates

19 Slide 0-19 Copyright © 2003 Pearson Education, Inc. A Simple Flip-flop Circuit As long as both inputs remain 0: output does not change Temporarily placing 1 on upper input => output = 1 Temporarily placing 1 on lower input => output = 0 So: output flip-flops between 2 values under external control

20 Slide 0-20 Copyright © 2003 Pearson Education, Inc. Setting the Output of a Flip-flop to 1

21 Slide 0-21 Copyright © 2003 Pearson Education, Inc. Setting the Output of a Flip-flop to 1 (cont’d)

22 Slide 0-22 Copyright © 2003 Pearson Education, Inc. Setting the Output of a Flip-flop to 1 (cont’d)

23 Slide 0-23 Copyright © 2003 Pearson Education, Inc. Opdracht: Bedenk hoe deze flip-flop de output-waarde 1 kan bewaren, en weer kan wissen:

24 Slide 0-24 Copyright © 2003 Pearson Education, Inc. Main Memory Large collection of circuits, each capable of storing a single bit Arranged in small cells, typically of 8 bits each (a.k.a.: byte)

25 Slide 0-25 Copyright © 2003 Pearson Education, Inc. Arrangement of Memory Cells Each cell has a unique address address = 2 = 0x02 value = Longer strings stored by using consecutive cells RAM (random access memory)

26 Slide 0-26 Copyright © 2003 Pearson Education, Inc. Representing Information as Bit Patterns Now that we know how to store single bits, we can consider how information can be encoded as bit patterns Different encoding systems exist for different types of information –numbers, text, images, sound, … Encoding systems more and more standardized –American National Standards Institute (ANSI) –International Organization for Standardization (ISO)

27 Slide 0-27 Copyright © 2003 Pearson Education, Inc. Representing Text Each symbol represented by a unique bit pattern Text represented by long stream of patterns Today’s standard coding system: –ASCII ( American Standard Code for Information Interchange ) –Bit patterns of length 7 ( generally extended by 1 bit ) –See ASCII-table in Appendix A.

28 Slide 0-28 Copyright © 2003 Pearson Education, Inc. Representing Numbers ASCII-encoding inefficient for numeric values Consider storing the value 25: –In ASCII: (16 bits) –Worse: largest 16-bit number would be 99 More efficient approach is to use binary system –uses digits 0 and 1, incl. factor 2 for all bit-positions Compare decimal system –uses digits 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9, incl. factor 10 for each decimal position

29 Slide 0-29 Copyright © 2003 Pearson Education, Inc. The Decimal and Binary Systems Many number-systems can be created this way!

30 Slide 0-30 Copyright © 2003 Pearson Education, Inc. Decoding the Binary Representation –1× × × × × ×2 0 = 37

31 Slide 0-31 Copyright © 2003 Pearson Education, Inc. Obtaining the binary representation of 13

32 Slide 0-32 Copyright © 2003 Pearson Education, Inc. The Binary System: Addition Knowing how numeric values are encoded, we can consider how to do calculations Binary addition: Example: ( = 85)

33 Slide 0-33 Copyright © 2003 Pearson Education, Inc. Fractions in the Binary System Radix point has same role as in decimal system

34 Slide 0-34 Copyright © 2003 Pearson Education, Inc. Storing Integers: Two’s Complement Notation In general: values of 32 bits Includes negative numbers Leftmost bit indicates the sign –sign bit Note: –Positive and negative numbers are identical from right to left up to & including first ‘1’; from there on are complements of one another

35 Slide 0-35 Copyright © 2003 Pearson Education, Inc. Addition in two’s complement notation Note: no circuitry for subtraction needed! Note: overflow errors: = 1001 ( = -7 )

36 Slide 0-36 Copyright © 2003 Pearson Education, Inc. The Hexadecimal Coding System Bit-streams often very long For simplicity of notation: –Hexadecimal system Reduces 4 bits to 1 symbol Especially important in assembly language programming (next chapter)

37 Slide 0-37 Copyright © 2003 Pearson Education, Inc. Opdracht - Chapter 1: Problem 6 How many cells can be in a computer’s main memory if each cell’s address can be represented by 3 hexadecimal digits? Three digits: –3 positions, each of which can be one of 16 values ( from the range: 0, 1, …, 9, A, B, C, D, E, F ) –smallest: 000 = 0× × ×16 0 = 0 –largest: FFF = 15× × ×16 0 = 4095 –So, total number of unique addresses = 16 3 = 4096

38 Slide 0-38 Copyright © 2003 Pearson Education, Inc. Opdracht - Chapter 1: Problem 23 Here's a message in ASCII. What does it say? Each block of 8 bits represents one character: –See ASCII table in Appendix A –Example: = ‘W’ –Message says: ‘What does it s1y?’ –Note: = ‘1’, while = ‘a’…

39 Slide 0-39 Copyright © 2003 Pearson Education, Inc. Opdracht - Chapter 1: Problem 28 a. Write the number 14 by representing the 1 and 4 in ASCII. b. Write the number 14 in binary representation. a. See ASCII Table in Appendix A: –14 = b. In binary system each ‘1’ represents a power of 2: –14 = = 1× × × ×2 0 => binary: 1110

40 Slide 0-40 Copyright © 2003 Pearson Education, Inc. Storing Fractions: Floating-point Notation In contrast to integers, fractions require storage of the radix point –Floating-point notation Example: = = -2.75

41 Slide 0-41 Copyright © 2003 Pearson Education, Inc. Truncation Errors: Coding the value 2 5/8

42 Slide 0-42 Copyright © 2003 Pearson Education, Inc. Truncation Errors (cont’d) Significance of truncation errors reduced by using larger mantissa & exponent fields (32bits) Problem of nonterminating expansion (e.g. 1/3) –worse in binary than in decimal system (e.g. 1/10) Interesting: –2 1/2 + 1/8 + 1/8 = 2 1/2 –1/8 + 1/ /2 = 2 3/4 When adding numbers, order may be important –rule: add smaller values first!

43 Slide 0-43 Copyright © 2003 Pearson Education, Inc. Opdracht: Wat klopt hier niet?

44 Slide 0-44 Copyright © 2003 Pearson Education, Inc. Mass Storage Main memory is volatile and limited in size Additional memory devices for mass storage: –a.o.: magnetic disks, optical disks, magnetic tapes Advantages over main memory: –less volatile, large capacity, capability of removal, generally much cheaper Disadvantages over main memory –mechanical motion for data access/retrieval (slow!) –in general: lesser degree of random access

45 Slide 0-45 Copyright © 2003 Pearson Education, Inc. A Magnetic Disk Storage System Each track contains same number of sectors Location of tracks and sectors not permanent (formatting) Examples: hard disks, floppy disks, Zip disks,...

46 Slide 0-46 Copyright © 2003 Pearson Education, Inc. CD/DVD Storage Format Data stored by creating variations in the reflective surface Data retrieved by means of a laser beam Data stored uniformly (so CD rotation speed varies) Random access much slower than for magnetic disks

47 Slide 0-47 Copyright © 2003 Pearson Education, Inc. Old, but still commonly used: Magnetic Tape Offers little or no random access (slooooooooooooooow!) Good choice for off-line data storage (archives)

48 Slide 0-48 Copyright © 2003 Pearson Education, Inc. Conclusion Main memory, magnetic disks, compact disks, and magnetic tape exhibit decreasing degrees of random access to individual bytes of data!

49 Slide 0-49 Copyright © 2003 Pearson Education, Inc. Chapter 1: Conclusions Information stored as streams of bits Bit streams stored in main memory or on mass storage devices - each with different degree of random access (and thus: speed) Meaning of bit streams application dependent Standardized representations exist for (a.o): – text, numeric values, images, sounds, … For numeric values: overflow and truncation errors may make life difficult sometimes...

50 Slide 0-50 Copyright © 2003 Pearson Education, Inc. Tot slot Lees ook Hoofdstuk 0 Leuk om te lezen: ‘Social Issues’ Denk na over de schrijf-opdracht!


Download ppt "Slide 0-1 Copyright © 2003 Pearson Education, Inc. Figure: Overzicht Informatica College 1 - September 5 (Docent: Frank Seinstra) Computer Science an overview."

Similar presentations


Ads by Google