Lecture 1

Introduction

Computing for Engineers

C++ is a general-purpose, high-level programming language with low-level facilities. It is a statically typed free-form multi-paradigm language supporting procedural programming, data abstraction, object-oriented programming, generic programming and RTTI. Since the 1990s, C++ has been one of the most popular commercial programming languages.

Bjarne Stroustrup developed C++ (originally named C with Classes) in 1983 at Bell Labs as an enhancement to the C programming language. Enhancements started with the addition of classes, followed by, among other features, virtual functions, operator overloading, multiple inheritance, templates, and exception handling.

Source: Wikipedia

Computers

  • First computer was the enigma used for cracking Nazi codes in WWII
  • Back in the day = humungous / slow
  • Nowadays = fast / compact

Components of a computer

CPU – central processing unit, the brains of the computer (ie. Pentium, amd, powerpc). Doesn’t really, but think of it as containing the operating system.

  • Network
  • Main memory (ram – primary storage) – high speed electronic storage cells
  • Secondary storage (hard drives) – permanent file storage
  • Basic input / output (keyboard (standard input), monitor (standard output) in C++) – for interactive input and viewing results for your programs

How memory works

Typically memory has cells, a capacity between 256 million to 1024 million cells. Each cell can hold an integer from 0-255

  • Each of these numbers are represented in binary form (a combination of 0s and 1s)
  • A typical 8 bit number 10110011 (179)
  • This 8 bit cell is called a byte
  • These bytes are basically data used by programs, kind of like machine instructions telling the CPU what to do.

    In this course we will learn:

  • How are things stored in the memory?
  • How do we use C++ to read / write / modify things that make the computer work?
  • Basically we will write our own programs using C++

Bball City