Download presentation

Presentation is loading. Please wait.

1
**Lecture 1 Introduction Richard Gesick**

Figures from Lewis, “C# Software Solutions”, Addison Wesley

2
**Agenda Hardware and Software Analog & Digital**

Binary and Data Representations Introduction to Computer Architecture

3
**Computer Processing Hardware Software The stuff you can touch**

Programs and data

5
Modern Computer

6
**Hardware and Software Hardware Software**

the physical, tangible parts of a computer keyboard, monitor, disks, wires, chips, etc. Software programs and data a program is a series of instructions A computer requires both hardware and software Each is essentially useless without the other

7
**Basic Computer Concepts**

Hardware Central Processing Unit Memory and Storage Devices Operating Systems Application Software Computer Networks and the Internet

8
**Hardware A typical computer consists of:**

CPU: executes the instructions of the program Hard disk: stores instructions and data so program can be loaded into memory and executed Memory unit: stores the program instructions and data while executing Keyboard and mouse: used for data input Monitor: used to display output from a program Other accessories / peripherals

10
**CPU and Main Memory Chip that executes program commands**

Intel Pentium 4 Sun ultraSPARC III Central Processing Unit Main Memory Primary storage area for programs and data that are in active use Synonymous with RAM

11
**Secondary Memory Devices**

Information is moved between main memory and secondary memory as needed Secondary memory devices provide long-term storage Central Processing Unit Main Memory Hard disks Floppy disks ZIP disks Writable CDs Writable DVDs Tapes Floppy Disk Hard Disk

12
**Input / Output Devices Monitor I/O devices facilitate Central**

Keyboard I/O devices facilitate user interaction Central Processing Unit Main Memory Floppy Disk Hard Disk Monitor screen Keyboard Mouse Joystick Bar code scanner Touch screen

13
**The Central Processing Unit**

A CPU is on a chip called a microprocessor It continuously follows the fetch-decode-execute cycle: fetch Retrieve an instruction from main memory decode Determine what the instruction is execute Carry out the instruction

14
**The Central Processing Unit**

The CPU contains: Performs calculations and makes decisions Arithmetic / Logic Unit Coordinates processing steps Control Unit Small storage areas Registers

15
**Central Processing Unit (CPU)**

Arithmetic Logic Unit: performs integer arithmetic and logical operations Floating-point Unit: performs floating-point operations Hardware registers: store data and memory addresses Instruction pointer: keeps track of current instruction to execute Examples: Intel Pentium 4, Sun Microsystems SPARC, IBM PowerPC

16
**Processor Instruction Set**

Move data from one location to another Perform a calculation Change the sequence of instructions to execute (the flow of control)

17
**CPU Speed Rated in MHz or GHz In one clock cycle, a CPU**

fetches an instruction from memory, decodes the instruction, or executes the instruction Pipelining allows overlap of operations to improve performance 2-Ghz CPU can execute 2 billion instructions per second

18
**Memory or Storage Devices**

Memory consists of cells that hold one bit. A bit's value can be 0 or 1 A byte is 8 binary digits (bits)

19
From Dell:

20
Memory has width (word size) Memory has capacity

21
Memory Main memory is volatile - stored information is lost if the electric power is removed Secondary memory devices are nonvolatile Main memory and disks are direct access devices - information can be reached directly The terms direct access and random access often are used interchangeably A magnetic tape is a sequential access device since its data is arranged in a linear order - you must get by the intervening data in order to access other information

22
**Software Categories Operating System Shell Applications**

Resource manager/coordinator Shell Interface between the OS and the user and applications Applications What the user sees

24
**Operating System Software**

boots when computer is turned on and runs continuously Controls the peripheral devices (disks, keyboard, mouse, etc.) Supports multitasking (multiple programs executing simultaneously) Allocates memory to each program Prevents one program from damaging another program Example: Microsoft Windows, Linux

25
**Application Software Written to perform specific tasks**

Runs "on top of" operating system Examples: word processor, spreadsheet, database management system, games, Internet browser, etc.

26
**Client/Server What is the OS here? What is the application?**

Where does data live? How to we coordinate the application among many users?

27
What is better?

28
**Analog information is continuous**

Digital information is discrete

29
**Sampling induces losses**

Humans can hear 20Hz-20kHz 44.1 kHz typical sample rate (CD) Sample rate >= double frequency Nyquist (1924)

31
**Why do we care? Computers are dumb**

They’re just dumb at a really fast rate 2.8gHz computer can perform 2.8 billion operations per second Computers only see in binary (0/1) Anything we see as meaningful is strings of 0s and 1s

32
**Digital Information Computers store all information digitally:**

numbers text graphics and images video audio program instructions In some way, all information is digitized - broken down into pieces and represented as numbers

33
**Representing Text Digitally**

For example, every character is stored as a number, including spaces, digits, and punctuation Corresponding upper and lower case letters are separate characters H i , H e a t h e r .

34
Binary Numbers Once information is digitized, it is represented and stored in memory using the binary number system A single binary digit (0 or 1) is called a bit Devices that store and move information are cheaper and more reliable if they have to represent only two states A single bit can represent two possible states, like a light bulb that is either on (1) or off (0) Permutations of bits are used to store values

35
**Data Representation Binary Numbers Hexadecimal Numbers**

Expressed in base 2 system (two values are 0 and 1) Hexadecimal Numbers Base-16 system used as shorthand for binary numbers Representing Characters with the Character Set

36
Converting & Bases Binary Oct Dec Hex

37
**Binary Equivalents of Decimal Numbers**

Decimal Binary Equivalent

38
**Powers of 2 Decimal Decimal 20 1 28 256 21 2 29 512 22 4 210 1024**

Notice with each additional bit, it doubles the possible number of values.

40
**Decimal (base 10) numbers**

A decimal number can be represented as the sum of powers of 10 (the base) with coefficients in the base 10 alphabet (0 - 9) For example: 2485 = 2485 = 2 * * * * 1 2485 = 2 * * * * 100

41
**Converting from Binary to Decimal**

= ?

42
**Converting From Decimal to Binary**

Just as a decimal number can be represented as a sum of powers of 10 (the base) with coefficients in the base 10 alphabet (0 to 9), A decimal number also can be represented as the sum of powers of 2 (the base of the binary system) with coefficients in the base 2 alphabet (0 and 1) So we need an algorithm to do that

43
**Converting From Decimal to Binary**

Find the largest power of 2 that is smaller than or equal to the decimal number Subtract that number from the decimal number Insert 1 in binary number for position equivalent to that power of 2 Repeat 1 - 3, until you reach 0

44
**Example: convert 359 to binary**

Largest power of 2 that is smaller than 359 is 256 (28) = 103 so 359 = 28* Largest power of 2 that is smaller than 103 is 64 (26) = 39 so 359 = 28*1 + 26*1 + 39 (continued on next slide)

45
**Example: convert 359 to binary**

Largest power of 2 that is smaller than 39 is 32 (25) = 7 so 359 = 28*1 + 26*1 + 25*1 + 7 Largest power of 2 that is smaller than 7 is 4 (22) 7 - 4 = 3 so 359 = 28*1 + 26*1 + 25*1 + 22*1 + 3 (continued on next slide)

46
**Example: convert 359 to binary**

Largest power of 2 that is smaller than 3 is 2 (21) 3 - 2 = 1 so 359 = 28*1 + 26*1 + 25*1 + 22*1 + 21*1 + 1 Largest power of 2 that is smaller than or equal to 1 is 1 (20) 1 - 1 = 0, so we are finished

47
**Our results Finally, insert missing powers of 2 with coefficient 0.**

Thus, 359 = 28*1 + 27*0 + 26*1 + 25*1 + 24*0 + 23*0 + 22*1 + 21*1 + 20*1 Removing powers of 2, we get: Or

48
**Hexadecimal Numbers Base-16 number system**

Uses digits and letters A - F One hexadecimal digit can express values from 0 to 15 For example: C represents 12 Thus, one hexadecimal digit can represent 4 bits

49
**Hexadecimal - Binary Equivalents**

Hex Binary Hex Binary A B C D E F

50
**Examples Binary number: 0001 1010 1111 1001 Hex equivalent: 1 A F 9**

Hex equivalent: B B E

51
**Practice with Number Systems**

1002 = ? = ? = ?10 3A1B16 = ?2

52
**Practice with Number Systems**

1002 = 416 = = 42310 3A1B16 =

53
**The Unicode Character Set**

Each character stored as 16-bits Maximum number of characters that can be represented: 65,536 (216) (w_char ) ASCII character set (used by many programming languages) stores each character as 7 bits (maximum number of characters is 128). For compatibility, first 128 characters of Unicode set represent the ASCII characters

54
**ASCII American Standard Code for Information Interchange**

Char Dec Oct Hex | Char Dec Oct Hex | Char Dec Oct Hex | Char Dec Oct Hex (nul) x00 | (sp) x x40 | ` x60 (soh) x01 | ! x21 | A x41 | a x61 (stx) x02 | " x22 | B x42 | b x62 (etx) x03 | # x23 | C x43 | c x63 (eot) x04 | $ x24 | D x44 | d x64 (enq) x05 | % x25 | E x45 | e x65 (ack) x06 | & x26 | F x46 | f x66 (bel) x07 | ' x27 | G x47 | g x67 (bs) x08 | ( x28 | H x48 | h x68 (ht) x09 | ) x29 | I x49 | i x69 (nl) x0a | * x2a | J x4a | j x6a (vt) x0b | x2b | K x4b | k x6b (np) x0c | , x2c | L x4c | l x6c (cr) x0d | x2d | M x4d | m x6d (so) x0e | x2e | N x4e | n x6e (si) x0f | / x2f | O x4f | o x6f (dle) x10 | x30 | P x50 | p x70 (dc1) x11 | x31 | Q x51 | q x71 (dc2) x12 | x32 | R x52 | r x72 (dc3) x13 | x33 | S x53 | s x73 (dc4) x14 | x34 | T x54 | t x74 (nak) x15 | x35 | U x55 | u x75 From:

Similar presentations

Presentation is loading. Please wait....

OK

© 2006 Pearson Education Chapter 1: Computer Systems.

© 2006 Pearson Education Chapter 1: Computer Systems.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on personality development for mba students Ppt on video teleconferencing images Ppt on water resources download Product mix ppt on nestle chocolate Ppt on ideal gas law examples Ppt on technical topics related to electrical engineering Ppt online shopping project in vb Ppt on cross site scripting error Ppt on chapter 3 atoms and molecules ppt Ppt on earth and space book