COSC 1301 Introduction

basketontarioElectronics - Devices

Nov 2, 2013 (4 years and 7 months ago)


COSC 1301


Plan for Today:

Review course policies and coverage

Homework, Projects and Exams

Class Communication

Computers and the Internet: In Our Lives

Brief Introduction to Chapter 1: Computers then and now

Homework and Projects

Written assignments to turn in during class

News articles on class material: turn in hard copy of article, and be
prepared to summarize it in class on due date

Electronically submitted assignments

via Dropbox

via Blackboard

Python Programs

We will use Python 3

Optional reference: Python Programming for the Absolute Beginner (3

edition) by Dawson

Webpages (using HTML and CSS)


Two in
class midterm exams (24% each)

Cover material from lecture, textbook, homework and projects

Final exam (25%)

During final exam period

date and time assigned by university


Class discussion on piazza:
iazza is a class communication tool

student and instructor edited Q&A

If you have a question of general interest between class meetings, post it on

then everyone gets to see the answer.

Do not post homework/project solutions

No off
topic posts or disrespectful posts

Email: marye at (much preferred to phone calls)

Office hours: Mondays 10
11, Wednesdays 2
3 or by appointment
(please email me)

JBWS 278

Ancient History


Ancient History: Computers:


The IBM 360:

1960s and 1970s

Approximately 2 MB (1/500 GB) of memory

Computers: Then and Now

Circa 1970: 1/500 GB

16 GB

Moore’s Law

Not actually a law

Observation by George Moore, Intel co
founder, that:

# of transistors on integrated circuit seems to double every two years

Corresponding exponential increase in processing speed and memory

Moore’s Law

Computing Power: Now

Many times more transistors produced each year than number of grains of rice consumed.

Plus: A transistor is cheaper than a grain of rice!

Your “Computers”

What was your first computer?

Mine: Apple

What “computers” do you use regularly now?

Computer Programming: Then…

One card per program instruction.

Each character in the program statement encoded per column

the first character, Z, is encoded as 001000000001



Programs on

Punch Cards

Computer Programming: Then…

HELLO CSECT The name of this program is 'HELLO'

* Register 15 points here on entry from OPSYS or caller.

USING *,12 Tell assembler which register we are using for
. base

STM 14,12,12(13) Save registers 14,15, and 0 thru 12 in caller's Save area

LR 12,15 Set up base register with program's entry point address

LA 15,SAVE Now Point at our own save area

ST 15,8(13) Set forward chain

ST 13,4(15) Set back chain

LR 13,15 Set R13 to address of new save area

end of housekeeping (similar for most programs)

WTO 'Hello World' Write To Operator (Operating System macro)


L 13,4(13) restore address to caller
provided save area

LM 14,12,12(13) Restore registers as on entry

SR 15,15 Set register 15 to 0 so that the return code (R15) is Zero

BR 14 Return to caller


SAVE DS 18F Define 18

to save calling program registers

END HELLO This is the end of the program

Assembly Language Program: Prints the message “HELLO WORLD” to the console

Computer Programming: Now

We’ll write the “Hello World” program in Python:



print(“Hello World”)


Why Not English?

Why can’t we just write our programs in English?

English is ambiguous

What does “Feed the cat John” mean?

And: “We saw her duck”

Google “English structure”:

hierarchical structure of the government in Great Britain

structure of sentences in the English language


Where are the Computers?




This Class


What can Computers do?

Beat former champs at Jeopardy!


Dr. Watson

'A machine like that is like 500,000 of me sitting at Google and


Herbert Chase, M.D., Columbia University

Wired magazine:

What’s Next?

Autonomous traffic management