CSC 221: Introduction to Programming. Fall 2018

Similar documents
CSC 221: Computer Programming I. Fall 2004

CSC 221: Introduction to Programming. Fall 2011

CSC 221: Introduction to Programming. Fall 2013

Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall

Computers in Engineering COMP 208. A Brief History. Mechanical Calculators. A Historic Perspective Michael A. Hawker

Computers in Engineering COMP 208

Fundamentals of Python: First Programs. Chapter 1: Introduction Modifications by Mr. Dave Clausen

Engr. Abdul-Rahman Mahmood MS, PMP, MCP, QMR(ISO9001:2000)

EVOLUTION OF COMPUTERS. In the early years, before the computer was invented, there are several inventions of counting machines.

CS101 Lecture 29: Brief History of Computing

THE GENERATIONS OF COMPUTER

Chronological History of the Pre-Computer Developments

Describe the layers of a computer system

Evolution of the Computer

You Will Need Floppy Disks for your labs!

Unit 4: Emerging Technologies. A History of Personal Computing by Mrs. Ogletree

Chapter 1. The Big Picture

Maninder Kaur.

CSC 533: Programming Languages. Spring 2015

MICROPROCESSOR SYSTEM DESIGN

Welcome to COS151! 1.1

Computer Systems. Computer Systems. Wolfgang Schreiner Research Institute for Symbolic Computation (RISC-Linz) Johannes Kepler University

Computer Basics. Computer Technology

Great Inventions written by Bob Barton

The trusted, student-friendly online reference tool. Name: Date:

CSCI170 Lecture 1: Analysis of Programming Languages. John Magee 1 September 2011 Some material copyright Jones and Bartlett

CS140 Lecture 09a: Brief History of Computing

Fundamental concepts of Information Technology

The History of Computers

The Generations of Computers

Welcome to COSC Introduction to Computer Science

Mechanization. A little bit of history. Mechanization. The old dream of mechanical computing. Jordi Cortadella Department of Computer Science

Part (01) Introduction to Computer

Computer Systems. Hardware, Software and Layers of Abstraction

Introduction to Computer Science. What is Computer Science?

A little bit of history. Jordi Cortadella Department of Computer Science

SSRVM Content Creation Template

CSC 533: Organization of Programming Languages. Spring 2005

Language Translation, History. CS152. Chris Pollett. Sep. 3, 2008.

Early Calculating Tools

History and Mission of IA

What You Will Learn Today

Babbage s computer 1830s Boolean logic 1850s. Hollerith s electric tabulator Analog computer 1927 EDVAC 1946 ENIAC

Computer History CSCE 101

CS 1 Notes 1 - Early Computing and 2 - Electronic Computing

Introduction. A. Bellaachia Page: 1

HISTORY OF CALCULATION. Evolution of Computation

William Stallings Computer Organization and Architecture 8 th Edition. Chapter 2 Computer Evolution and Performance

A (BRIEF) HISTORY OF COMPUTING. By Dane Paschal

Computer System architectures

CSC101 Furman University Professor Batchelor

An Introduction to Computer Science CS 8: Introduction to Computer Science, Winter 2018 Lecture #2

Chapter 1 Basic Computer Organization

An Introduction to Computer Science CS 8: Introduction to Computer Science Lecture #2

Fundamentals of Digital Computers The mechanical computer age began with the advent of the abacus in 500 B.C by Babylonians. The abacus, which was

COURSE OVERVIEW. Introduction to Computer Engineering 2015 Spring by Euiseong Seo

(History of Computers) Lecture # 03 By: M.Nadeem Akhtar. Lecturer. URL:

ENIAC - background. ENIAC - details. Structure of von Nuemann machine. von Neumann/Turing Computer Architecture

CHAPTER 1 Introduction

COMS 1003 Fall Introduction to Computer Programming in C. History & Computer Organization. September 15 th

Computer Organization CS 206T

COMP 102: Computers and Computing Lecture 1: Introduction!

COMPUTER HISTORY Compiled by Charles Kim Howard University

Computer & Microprocessor Architecture HCA103

CHAPTER 1: Computers and Systems

HST250 (section 740) Exam #1 Wednesday, February 10, 2010

Overview of a computer

Figure 1-1. A multilevel machine.

Part 1: Computer and Information Literacy

Chapter 1. Hardware. Introduction to Computers and Programming. Chapter 1.2

CHAPTER 1 Introduction

Chapter 2. Perkembangan Komputer

CS Operating Systems (OS) Introduction. Lecture 2 Sept 12, 2018


Chapter 0: Introduction. Copyright 2015 Pearson Education, Inc.

A Short History of Computing 09/03/13

4. History of computers and applications

1: History, Generation & Classification. Shobhanjana Kalita, Dept. of CSE, Tezpur University

History of Computing. Slides from NYU and Georgia Tech

2. Computer Evolution and Performance

Algorithm: Program: Programming: Software: Hardware:

COMPUTER - GENERATIONS

HISTORY OF COMPUTERS HISTORY OF COMPUTERS. Mesleki İngilizce - Technical English. Punch Card. Digital Data. II Prof. Dr. Nizamettin AYDIN.

v.m.g.rajasekaran ramani sri sarada sakthi mat. Hr. sec. school

HIGHER SECONDARY FIRST YEAR 2 MARK & 5 MARK NOTES CHAPTER 1 1. INTRODUCTION TO COMPUTER

Chapter 1: Introduction to Computers

Lyman Briggs Lecture Series. Group Question. Discussion Questions. Definition of Computer. Definition of Modern Computer. Definition of a Computer

Computer Science 4500 Operating Systems. Welcome! In This Module. Module 1 Introduction, Overview and History

Learning Objectives. In this chapter you will learn about:

Chapter 1: Introduction to Computers. In this chapter you will learn about:

History of Modern Computing Lesson 1

Chapter 1: Introduction

Introduction To Computers. About the Course

Babbage Analytical Machine

Lecture 09. Ada to Software Engineering. Mr. Mubashir Ali Lecturer (Dept. of Computer Science)

Chapter One. Computers in Context

Agenda EE 224: INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN. Lecture 1: Introduction. Go over the syllabus 3/31/2010

An Incomplete History of Computation

Trends in Computer System Capabilities

ABrief Introductiontothe Historyof Computing- 2

Transcription:

CSC 221: Introduction to Programming Fall 2018 History of programming developments in hardware machine language à assembly language high-level languages block-based vs. scripting languages intro to Python 1 Early programmable devices the use of algorithms to solve problems can be traced back millenia ~2000 BC Egyptian multiplication ~1600 BC Babylonian mathematical algorithms on clay tablets ~300 BC Euclid's algorithm for GCD 1805 the first programmable device was Jacquard's loom n the loom wove tapestries with elaborate, programmable patterns n a pattern was represented by metal punch-cards, fed into the loom n using the loom, it became possible to mass-produce tapestries, and even reprogram it to produce different patterns simply by changing the cards mid 1800's Babbage designed his "analytical engine" n its design expanded upon mechanical calculators, but was programmable via punchcards (similar to Jacquard's loom) n Babbage's vision described the general layout of modern computers n he never completed a functional machine his design was beyond the technology of the day 2 1

The first "computers" 1930's several engineers independently built "computers" using electromagnetic relays n an electromagnetic relay is physical switch, which can be opened/closed via electrical current (widely used in telephone networks at the time) n Zuse (Nazi Germany), Atanasoff (Iowa State), Stibitz (Bell Labs) q Stibitz's MARK I stored 72 numbers, required 1/10 sec to add, 6 sec to multiply still, 100 times faster than previous technology mid 1940's vacuum tubes replaced relays a vacuum tube is a light bulb containing a partial vacuum to speed electron flow vacuum tubes could control the flow of electricity faster than relays since they had no moving parts invented by Lee de Forest in 1906 1940's hybrid computers using vacuum tubes and relays were built COLOSSUS (1943) n first "electronic computer", built by the British govt. (based on designs by Alan Turing) n used to decode Nazi communications during the war ENIAC (1946) n first publicly-acknowledged "electronic computer", built by Eckert & Mauchly (UPenn) n contained 18,000 vacuum tubes and 1,500 relays 3 Stored program computers COLOSSUS and ENIAC were not general purpose computers could enter input using dials & knobs, paper tape but to perform a different computation, needed to reconfigure von Neumann popularized the idea of a "stored program" computer n Memory stores both data and programs n Central Processing Unit (CPU) executes by loading program instructions from memory and executing them in sequence n Input/Output devices allow for interaction with the user virtually all modern machines follow this von Neumann Architecture (note: same basic design as Babbage) programming was still difficult and tedious n each machine had its own machine language, 0's & 1's corresponding to the settings of physical components n programs developed for one machine could not be run on other types of machines 4 2

Machine language example what does this program do? how easy to write? how easy to debug? still, better than rewiring the machine every time you wanted to do something different! 01111111010001010100110001000110000000010000001000000001000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000100000 00000000010000000000000000000000000000000010000000000000000000000000000000 00000000000000000000000000000000000000000000000000000001010000100000000000 00000000000000000000000000000000011010000000000000000000000000000000000000 00000001010000000000000001000000000000000000100000000001011100111001101101 00001110011011101000111001001110100011000010110001000000000001011100111010 00110010101111000011101000000000000101110011100100110111101100100011000010 11101000110000100000000001011100111001101111001011011010111010001100001011 00010000000000010111001110011011101000111001001110100011000010110001000000 00000101110011100100110010101101100011000010010111001110100011001010111100 00111010000000000001011100110001101101111011011010110110101100101011011100 11101000000000000000000000000000000000010011101111000111011111110010000000 10011000000000000000000000000100100000001001001100000000000000001010100000 00000000000000000001001001000010010101000000000000001000000000000000000000 00000000000000001000000000000000000000000101000000001000000000000000010001 00100000001000000000000000100000001010100000000000000000000000010010010000 10010101000000000000001000000000000000000000000000000000000010000000000000 00000000000101100000001000000000000000100001000000000000000000000100000000 10000000000000000000000001000000111000111111000000000100010000001111010000 00000000000000000000000000000000000000000000000010010000110010101101100011 01100011011110111011101101111011100100110110001100100001000010000000000000 00000000000000000000000000000000000000000000000000100000000000000000000000 00000000000000000000000000000000000000000000001000000000011111111111100010 00000000000000000000000000000010000000000000000000000000000000000000000000 00000000000000000000000000100000000001111111111110001000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000 00000001100000000000000000000001100000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000 00100000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000110000000000000000000000100000000000000000 00000000000110100000000000000000000000000000000000000000000000000000000000 00000000010000000000000000000000000000000000000000000000000000001000100000 00000000000000000000000000000000000000000000000000000000000000010000000000 00000000000000000000000000000000000000000001000110000000000000000000000000 00000000000000000000000000000000000000000001000000000000000000000000000000 00000000000000000000000101100000000000000000000000000000000000000000000000 00000000000000000000000100000000000000000000000000000000000000000000000000 00011010010000000000000000000000000000000000000000000000000000000001001000 00010010000000000000000000000010000000000000000000000000011011100000000000 00000000000000000000000000000000000000000000000000000000010000000000000000 00000000000000000000011010000110010101101100011011000110111100101110011000 11011100000111000000000000011001110110001101100011001100100101111101100011 01101111011011010111000001101001011011000110010101100100001011100000000001 01111101010001010111110111000101110100011011110110010000000000010111110101 11110110110001110011010111110101111100110111011011110111001101110100011100 10011001010110000101101101010100000100011001010010001101110110111101110011 01110100011100100110010101100001011011010101111101010010001101110110111101 11001101110100011100100110010101100001011011010000000001011111010111110110 11000111001101011111010111110011011101101111011100110111010001110010011001 01011000010110110101010000010000110110001100000000011001010110111001100100 01101100010111110101111101000110010100100011011101101111011100110111010001 11001001100101011000010110110100000000011011010110000101101001011011100000 00000110001101101111011101010111010000000000000000000000000000000000000000 00000000000000000000000000000000000 5 Making programming (slightly) easier mid 1950's transistors began to replace tubes a transistor is a piece of silicon whose conductivity can be turned on and off using an electric current they performed the same switching function of vacuum tubes, but were smaller, faster, more reliable, and cheaper to mass produce computers became commercial as the cost dropped the computer industry grew as businesses could afford to buy and use computers Eckert-Mauchly (1951) DEC (1957) IBM became market force in 1960's with commercial expansion, it was essential to make computers easier to use assembly languages replaced machine languages to make the programmer's job easier assembly languages replaced binary codes with mnemonic names and decimal numbers still low-level and machine specific, but easier to write and understand required a special program called an assembler to translate the assembly language code into machine language to be executed 6 3

Assembly language example still not obvious what it does but, clearly easier to work with what was needed were programming languages closer to the way people think gcc2_compiled.:.global _Q_qtod.section ".rodata".align 8.LLC0:.asciz "Hello world!".section ".text".align 4.global main.type main,#function.proc 04 main:!#prologue# 0 save %sp,-112,%sp!#prologue# 1 sethi %hi(cout),%o1 or %o1,%lo(cout),%o0 sethi %hi(.llc0),%o2 or %o2,%lo(.llc0),%o1 call ls 7ostreamPCc,0 nop mov %o0,%l0 mov %l0,%o0 sethi %hi(endl FR7ostream),%o2 or %o2,%lo(endl FR7ostream),%o1 call ls 7ostreamPFR7ostream_R7ostream,0 nop mov 0,%i0 b.ll230 nop.ll230: ret restore.llfe1:.size main,.llfe1-main.ident "GCC: (GNU) 2.7.2" 7 High-level languages the first high-level languages were developed in the late 1950's n FORTRAN (1957, Backus at IBM) n LISP (1959, McCarthy at MIT) n BASIC (1959, Kemeny at Dartmouth) n COBOL (1960, Murray-Hopper at DOD) a high level language can be translated to machine code by a compiler (similar to an assembler) or executed directly by an interpreter mid 1960's - integrated circuits (IC) were produced Noyce and Kilby independently developed techniques for packaging transistors and circuitry on a silicon chip allowed for mass-producing useful circuitry, eventually entire processors on a single chip (e.g., Intel 4004 in 1971) n n an operating system is a collection of programs that manage peripheral devices and other resources enabled time-sharing as computers became affordable to small businesses, specialized programming languages were developed Pascal (1971, Wirth), C (1972, Ritchie) 8 4

Personal Computing late 1970's - Very Large Scale Integration (VLSI) manufacturing advances allowed for hundreds of thousands of transistors w/ circuitry on a chip resulted in mass-produced microprocessors and other useful IC's since computers could be constructed by simply connecting powerful IC's and peripheral devices, they were easier to make and more affordable 1975 - Bill Gates & Paul Allen founded Microsoft Gates wrote a BASIC interpreter for the first PC (Altair) 1977 - Steve Wozniak & Steve Jobs founded Apple went from Jobs' garage to $120 million in sales by 1980 1980 - IBM introduced PC Microsoft licensed the DOS operating system to IBM 1984 - Apple countered with Macintosh introduced the modern GUI-based OS (originally developed at Xerox) 1985 - Microsoft countered with Windows 1980's - object-oriented programming began n represented a new approach to program design which views a program as a collection of interacting software objects that model real-world entities n Smalltalk (Kay, 1980), C++ (Stroustrup, 1985), Java (Sun, 1995) 9 Over the last 20+ years object-oriented programming has dominated large-scale software development blocks-based languages have proven effective for learning programming basics Alice (1994), Scratch (2007) scripting languages have grown in number and popularity typically simpler, interpreted & interactive, often customized for specific niches well-suited for solving smaller problems, or gluing together other software Python (general purpose, 1989) R (data modeling & visualization, 1993) PHP (back-end Web development, 1995) JavaScript (front-end Web dev., 1995) Go (Google development, 2009) Swift (ios development, 2014) 10 5

Programming is programming all programming languages build on basic concepts/commands variables operations conditionals loops data types data structures Scratch vs. Python è count = 0 count += 1 new_num = count*2 + 1 if new_num > 5: print("greater") if new_num > 5: print("greater") else: print("not greater") for _ in range(10): print(random.randint(1, 6)) while count >= 0: print(count) count -= 1 11 Python Python is an industry-strength, modern scripting language invented by Guido van Rossum in 1989 has evolved over the years to integrate modern features v 2.0 (2000), v 3.0 (2008) simple, flexible, free, widely-used, widely-supported, upwardly-mobile Python can be freely downloaded from www.python.org the download includes an Integrated DeveLopment Environment (IDLE) for creating, editing, and interpreting Python programs 12 6

Python interpreter the >>> prompt signifies that the interpreter is waiting for input you can enter an expression to be evaluated or a statement to be executed note that IDLE colors text for clarity: prompts are reddish user input is black (but strings, text in quotes, are green) answers/results are blue 13 If you want to know more check out the following (purely optional) links Inventors: The History of Computers Computer Museum History Center Transistorized! from PBS.org Apple Computer Reading List The History of Microsoft Internet Pioneers: Tim Berners-Lee Internet Pioneers: Marc Andreessen Wikipedia entry on Programming Languages Webopedia entry on Programming Languages Python Official Website 14 7