Introduction to Software and Computer...

19
Introduction to Software and Computer Engineering Dr. Sam Siewert Embry-Riddle Aeronautical University, Prescott, AZ [email protected] Embry-Riddle Aeronautical University, Prescott Q: How can we see back in time and predict the future?

Transcript of Introduction to Software and Computer...

Page 1: Introduction to Software and Computer Engineeringmercury.pr.erau.edu/~siewerts/egr101/documents/SoftwareComputer... · Introduction to Software and Computer Engineering. ... digital

Introduction to Software and

Computer Engineering

Dr. Sam Siewert Embry-Riddle Aeronautical University, Prescott, AZ

[email protected] Embry-Riddle Aeronautical University, Prescott

Q: How can we see back in time and predict the future?

Page 2: Introduction to Software and Computer Engineeringmercury.pr.erau.edu/~siewerts/egr101/documents/SoftwareComputer... · Introduction to Software and Computer Engineering. ... digital

Answer: Computers and Software! • Extremely Far Infrared Light from Early

Formation of Universe can be “Seen” in Long-Wave Infrared – Spitzer Space Telescope

• Spectrum and Visualization of Electromagnetic Radiation we can feel heat, but can’t see

• Fast moving objects far away shifts light to far infrared (Doppler Shift)

• Light is billions of years old!

• Future can be predicted through simulations – Will an aircraft design be structurally

sound? (ANSYS) – Can we land a probe at a target location

on Mars by a specific date? (AGI STK or Satellite Toolkit)

– What will a product look like when fabricated? (Solidworks)

2 EGR101-Dr. Sam Siewert

http://www.spitzer.caltech.edu/

Interplanetary Trajectories in STK…

Page 3: Introduction to Software and Computer Engineeringmercury.pr.erau.edu/~siewerts/egr101/documents/SoftwareComputer... · Introduction to Software and Computer Engineering. ... digital

What is a Computer and Software? 🤔🤔

3 EGR101-Dr. Sampigethaya and Dr. Siewert

Computer - arithmetic and logical operations, moves data, processes input, produces output Software - intermediary between you (user) and the computer’s internal physical machines called hardware.

• Application programs: attracts the user to computer!

– End-user applications • Word, Outlook, Catia, SolidWorks, etc.

– Application development software

• programming languages (e.g., C, C++) Matlab, Python, Robot-C, Lego EV3 programming

• Operating system (OS): between the applications and hardware (e.g. Windows, OS-X, Linux)

• Compiler: converts your programs to machine code, one that the computer can understand

Compiler

*wikipedia

Page 4: Introduction to Software and Computer Engineeringmercury.pr.erau.edu/~siewerts/egr101/documents/SoftwareComputer... · Introduction to Software and Computer Engineering. ... digital

Evolution of Computers

4 EGR101-Dr. Sampigethaya, Dr. Siewert

Technology advancing at an astounding rate – 19th century and early 20th century: mechanical computers, Charles Babbage – 1936: Principle of modern general-purpose digital computer, Alan Turing – Mid 20th century: vacuum tube based computers – NASA: Computers for the Moon Shot, Margaret Hamilton – Compilers for Programming, Grace Hopper – Now is the digital age: transistors, integrated circuits,…..

1965: Moore’s law [Gordon Moore, Intel Corp.]

– Number of transistors in an integrated chip will double in 1 or 2 years – Has held true; but, possible saturation approaching before 2025

Drives cost, functionality, performance!

– Exponential improvement for over 40 years

Plot shows fastest computer over time (measured in FLOPS or Floating Point Operations Per Second)

Page 5: Introduction to Software and Computer Engineeringmercury.pr.erau.edu/~siewerts/egr101/documents/SoftwareComputer... · Introduction to Software and Computer Engineering. ... digital

Digital Computing: 70+ Years Back and Now

5 EGR101-Dr. Sampigethaya, Dr. Siewert

1946: Early general-purpose digital computer, the ENIAC (Electronic Numerical Integrator And Computer) was 8 ft. high, 80 ft. long, and filled a 1,500 sq. ft. room!

1946: ENIAC Cost: over $400,000 Clock Speed: 5000 Hz Memory: ~83 bytes FLOPS: 455 Power: ~150,000 W Mass: ~27 000 kg; Area: 167 m2 Volume: ~64.8 m3

Features: Solve numerical problems, e.g., artillery firing tables

2017: NVIDIA Tegra K1 (Shield), K1, X1, X2 Cost: $199 (Amazon.com) Clock Speed: 2,300,000,000 Hz (quad-core) Memory: 2,000,000,000 bytes FLOPS: 290,000,000,000 Power: ~2 …10 W Shield Mass: ~ 0.356 kg; Area: ~ 0.0035 m2 Volume: 70 x 50 x 4.7mm ~ 0.0000165 m3

Features: 3840x2160 display, sensors, connectivity, graphics, self-driving car platform, 192 co-processors • To match today’s Tablet performance you would need over 10 million ENIACs!!

Page 6: Introduction to Software and Computer Engineeringmercury.pr.erau.edu/~siewerts/egr101/documents/SoftwareComputer... · Introduction to Software and Computer Engineering. ... digital

Linux in the Palm of Your Hand …

6 EGR101-Dr. Sampigethaya

Page 7: Introduction to Software and Computer Engineeringmercury.pr.erau.edu/~siewerts/egr101/documents/SoftwareComputer... · Introduction to Software and Computer Engineering. ... digital

Do We No Longer Have Computers Filling a Room?

7 EGR101-Dr. Sampigethaya

http://www.ushistory.org

http://www.cisco.com

http://www-03.ibm.com/systems/technicalcomputing/solutions/bluegene/

VM1 VM2 VM108

SUPERCOMPUTER

DATA CENTER (Distributed Computing)

Giga FLOPS

Peta FLOPS

Page 8: Introduction to Software and Computer Engineeringmercury.pr.erau.edu/~siewerts/egr101/documents/SoftwareComputer... · Introduction to Software and Computer Engineering. ... digital

Anatomy of a General-Purpose Computer

• Case or housing • Power supply • Motherboard

– Central Processing Unit (CPU) – Memory – Input/Output (I/O) ports – Networking – Video and audio chipsets

• Hard disk – Solid state also possible

• Peripherals – CD or DVD drive

8 EGR101-Dr. Sampigethaya

Page 9: Introduction to Software and Computer Engineeringmercury.pr.erau.edu/~siewerts/egr101/documents/SoftwareComputer... · Introduction to Software and Computer Engineering. ... digital

Building Blocks of the Computer

9

CPU is the brain” of the computer. It includes: • Arithmetic Logic Unit (ALU): does arithmetic and

logic functions • Control Unit (CU): controls actions inside the CPU • Registers: temporary locations to store data,

instructions, and memory addresses • Clock: synchronizes operations in the CPU

CPU

Transistors and logic gates (millions to billions of these)

But, how do these electronic circuits respond to input and perform calculations? 🤔🤔 Using binary logic and computation on bits!!

EGR101-Dr. Sampigethaya

Hardware

Page 10: Introduction to Software and Computer Engineeringmercury.pr.erau.edu/~siewerts/egr101/documents/SoftwareComputer... · Introduction to Software and Computer Engineering. ... digital

Binary, Decimal, Hex Numbers

• Each memory location has an address and stores information in the form of bits.

• What’s the information in the memory? – Program instructions – Data

What is the decimal (base-10) equivalent of the binary (base-2) number 1111? What is the hex (base-16) equivalent of the binary number 1111? F

1 x 23 + 1 x 22 + 1 x 21 +1 x 20 = 15

10 EGR101-Dr. Sampigethaya

Memory (8-bits or 1 byte)

Page 11: Introduction to Software and Computer Engineeringmercury.pr.erau.edu/~siewerts/egr101/documents/SoftwareComputer... · Introduction to Software and Computer Engineering. ... digital

Program = Data + Algorithms

11 EGR101-Dr. Sampigethaya

• Algorithm – A sequence of precise instructions that leads to a solution

• Program – An algorithm expressed in a language the computer can understand

• Eureka! So, software means a set of one or more programs!

Program Instructions

Page 12: Introduction to Software and Computer Engineeringmercury.pr.erau.edu/~siewerts/egr101/documents/SoftwareComputer... · Introduction to Software and Computer Engineering. ... digital

The Task of Programming Ada Lovelace – The first programmer (for Charles Babbage’s mechanical computer – the Difference Engine) What is programming? Some conventional definitions:

“Telling a very fast moron exactly what to do” “A plan for solving a problem on a computer” “Specifying the order of a program execution” “Specifying the structure and behavior of a program, and testing that the program performs its task correctly with acceptable performance”

Why is programming hard?

We want “the machine” to do complex things Computers only do exactly what they are instructed to do Code is not a Natural Language and does not “fill in details for us” – Yet!

The world is more complex than we would like to believe (simulation) “Programming is understanding” (Automate only what you understand) Programming is part practical, part theory

If you are just practical, you produce non-scalable unmaintainable hacks If you are just theoretical, this is more like math (Church’s Lambda calculus)

EGR101-Dr. Sampigethaya, Dr. Siewert 12

*wikipedia

Apple Siri

HAL 9000

Page 13: Introduction to Software and Computer Engineeringmercury.pr.erau.edu/~siewerts/egr101/documents/SoftwareComputer... · Introduction to Software and Computer Engineering. ... digital

Bott

om-u

p

Top-

dow

n

fix_schedule() build_body() finalize_design() get_parts() assemble() …. Specs DATA Metric DATA Design DATA Manufacture DATA Vendor DATA

Data

Behavior

OBJECT

Data

Behavior

OBJECT

Program using class objects to build a car

Two Major Programming Paradigms

Structured /Procedural Programming (e.g., C)

Object-Oriented Programming (e.g., C++)

Problem to solve: How to build a car?

EGR101-Dr. Sampigethaya 13

Page 14: Introduction to Software and Computer Engineeringmercury.pr.erau.edu/~siewerts/egr101/documents/SoftwareComputer... · Introduction to Software and Computer Engineering. ... digital

14 EGR101-Dr. Siewert, Sampigethaya

Assembly/Machine Language Based Program vs High-Level Language-Based Program (LCM, GCD)

ARM Assembly Language Program High-Level “C” Language Program

One machine code instruction per ASM mnemonic 🤔🤔 One to many ASM lines per line of C code 🤔🤔

Which one is harder to write and read? 🤔🤔

Page 15: Introduction to Software and Computer Engineeringmercury.pr.erau.edu/~siewerts/egr101/documents/SoftwareComputer... · Introduction to Software and Computer Engineering. ... digital

Small Form Factor Useful Only for a Smart Phone? 🤔🤔

15 EGR101-Dr. Sampigethaya

Intelligent vehicles and embedded control systems

IP picture frame Web-enabled toaster

Internet phones

Internet refrigerator Net-enabled

thermostat

Net-enabled medical devices

Internet-of-Things (IoT)

*Beaglebone Black

Microcontroller or System-on-Chip (SoC) (e.g., Arduino, Beaglebone Black)

Many other “things”

Page 16: Introduction to Software and Computer Engineeringmercury.pr.erau.edu/~siewerts/egr101/documents/SoftwareComputer... · Introduction to Software and Computer Engineering. ... digital

16

The Connected Vehicle

EGR101-Dr. Sampigethaya, Dr. Siewert

*General Motors (e.g. Android Auto and CAN bus embedded computing systems) Vehicular Cloud Services

1. Intelligent Driving Services

2. Online Diagnosis for Vehicle Safety

3. Interaction with Mobile Devices for Remote Control, Safety and

Entertainment

*Audi

Inside the car frame Outside the car frame

Autonomous Car with NHTSA Level 3 Automation

Page 17: Introduction to Software and Computer Engineeringmercury.pr.erau.edu/~siewerts/egr101/documents/SoftwareComputer... · Introduction to Software and Computer Engineering. ... digital

ERAU CESE Department Courses

Shown in a Stack (Hardware, Firmware, Software)

17 EGR101-Dr. Sampigethaya

Assembly and C (Machine Language) e.g., CEC320, CEC322

Compiler e.g., CEC470, CS332

Application Programs e.g., CS125, CS213, CS225, CS302

Operating Systems e.g., CEC450, CS420, CS317

Software

Electrical/Electronic Circuits e.g., EE 224, 302, 335

Digital Design e.g., CEC220

Computer Architecture e.g., CEC470

Hardware

Firmware (Software that

boots machine after Power-on)

Page 18: Introduction to Software and Computer Engineeringmercury.pr.erau.edu/~siewerts/egr101/documents/SoftwareComputer... · Introduction to Software and Computer Engineering. ... digital

Interesting Places I’ve Worked

Sam Siewert

Software and Computer Engineers Don’t Just Live in Cubicles

JPL

Houston Mission Control

Super Computing Facilities

Hollywood – Animation / CG

Space Systems Integration and Clean Rooms

A Cubicle now and then …

Page 19: Introduction to Software and Computer Engineeringmercury.pr.erau.edu/~siewerts/egr101/documents/SoftwareComputer... · Introduction to Software and Computer Engineering. ... digital

What will you Do?

Sam Siewert