Docsity

Computer Processing - Lecture Slides | CSE 1301, Study notes of Computer Science

Toggle sidebar
bg1
CSE 1301
Lecture 1
Introduction
Figures from Lewis, “C# Software Solutions”, Addison Wesley
Briana B. Morrison
CSE 1301 1-2
Agenda
• Hardware and Software
• Analog & Digital
• Binary and Data Representations
• Introduction to Computer Architecture
CSE 1301 1-3
Computer Processing
• Hardware
– The stuff you can touch
• Software
– Programs and data
CSE 1301 1-4
CSE 1301 1-5
Modern Computer
CSE 1301 1-6
Hardware and Software
• Hardware
– 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
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Computer Processing - Lecture Slides | CSE 1301 and more Study notes Computer Science in PDF only on Docsity!

CSE 1301

Lecture 1

Introduction

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

Briana B. Morrison

CSE 1301 1-

Agenda

• Hardware and Software

• Analog & Digital

• Binary and Data Representations

• Introduction to Computer Architecture

CSE 1301 1-

Computer Processing

• Hardware

– The stuff you can touch

• Software

– Programs and data

CSE 1301 1-

Modern Computer

Hardware and Software

• Hardware

– 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

CSE 1301 1-

Basic Computer Concepts

• Hardware

– Central Processing Unit

– Memory and Storage Devices

• Operating Systems

• Application Software

• Computer Networks and the Internet

CSE 1301 1-

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

CSE 1301 1-9 CSE 1301 1-

CPU and Main Memory

Central

Processing

Unit

Main

Memory

Chip that executes

program commands

Intel Pentium 4

Sun ultraSPARC III

Primary storage area

for programs and data

that are in active use

Synonymous with

RAM

Secondary Memory Devices

Central

Processing

Unit

Main

Memory

Floppy Disk

Hard Disk

Secondary memory

devices provide

long-term storage

Information is moved

between main memory

and secondary memory

as needed

Hard disks

Floppy disks

ZIP disks

Writable CDs

Writable DVDs

Tapes

Input / Output Devices

Central

Processing

Unit

Main

Memory

Floppy Disk

Hard Disk

Monitor

Keyboard

I/O devices facilitate

user interaction

Monitor screen

Keyboard

Mouse

Joystick

Bar code scanner

Touch screen

CSE 1301 1-

From Dell:

CSE 1301 1-

Memory has width

(word size)

Memory has

capacity

CSE 1301 1-

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

CSE 1301 1-

Software Categories

• Operating System

– Resource manager/coordinator

• Shell

– Interface between the OS and the user and

applications

• Applications

– What the user sees

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

CSE 1301 1-

Application Software

• Written to perform specific tasks

• Runs "on top of" operating system

• Examples: word processor,

spreadsheet, database management

system, games, Internet browser, etc.

Client/Server

• What is the OS here?

• What is the

application?

• Where does data

live?

• How to we coordinate

the application among

many users?

What is better?

CSE 1301 1-

• Analog information is continuous

• Digital information is discrete

• Sampling induces losses

• Humans can hear

20Hz-20kHz

• 44.1 kHz typical sample

rate (CD)

• Sample rate >=

double frequency

- Nyquist (1924)

CSE 1301 1-

Binary Equivalents of Decimal Numbers

Decimal Binary Equivalent

CSE 1301 1-

Powers of 2

Decimal Decimal

Notice

with each

additional

bit, it

doubles

the

possible

number of

values.

CSE 1301 1-39 CSE 1301 1-

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:

Converting from Binary to

Decimal

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

CSE 1301 1-

1. Find the largest power of 2 that is smaller

than or equal to the decimal number

2. Subtract that number from the decimal

number

3. Insert 1 in binary number for position

equivalent to that power of 2

4. Repeat 1 - 3, until you reach 0

Converting From Decimal to Binary

CSE 1301 1-

Example: convert 359 to binary

1. Largest power of 2 that is smaller than

359 is 256 (

so 359 = 2

3. Largest power of 2 that is smaller than

103 is 64 (

so 359 = 2

(continued on next slide)

CSE 1301 1-

Example: convert 359 to binary

5. Largest power of 2 that is smaller than

39 is 32 (

so 359 = 2

7. Largest power of 2 that is smaller than 7

is 4 (

so 359 = 2

(continued on next slide)

CSE 1301 1-

Example: convert 359 to binary

9. Largest power of 2 that is smaller than

3 is 2 (

so 359 = 2

11. Largest power of 2 that is smaller than

or equal to 1 is 1 (

12. 1 - 1 = 0, so we are finished

Our results

Finally, insert missing powers of 2 with coefficient 0.

Thus, 359 =

8*

7*

6*

5*

4*

3*

2*

1

0

Removing powers of 2, we get:

Or

Hexadecimal Numbers

• Base-16 number system

• Uses digits 0 - 9 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