You are on page 1of 11

Introduction to Programming

Deitel & Deitel : Chapter 1


Computers
• What is a computer?
– “an electronic device which is capable of receiving
information (data) in a particular form and of
performing a sequence of operations in accordance
with a predetermined but variable set of procedural
instructions (program) to produce a result in the form
of information or signals” Google definition
– “A computer generally means a programmable
machine.” http://www.webopedia.com/
– “A computer is an electronic device that manipulates
information, or data. It has the ability
to store, retrieve, and process data.” http://www.gcflearnfree.org/
Moore’s Law
• Every year technological capacity cost about
half of what it did a year ago. This is due to
the rapid growth in technology especially in
the Information Technology field. Memory
devices become quicker and have more
storage capacity, processor speeds increase as
well as an increase in processor units per chip
Hardware & Software
• Computer Hardware – The tangible
components that make up a computer is
known as hardware e.g. screen, keyboard,
mouse, USB ports, network card, hard drive,
RAM etc
• Computer Software – The intangible part of a
computer, that is, the instructions that are
executed “inside” it to control the various
hardware components.
Hardware Logical Units
• Input Unit – This “receiving” unit obtains
information from input devices such as
keyboards, touch screens, mouse devices etc
• Output Unit – This “shipping” unit outputs
processed information on output devices such
as screens, printers, audio, transmissions over
networks etc
Hardware Logical Units
• Memory Unit – This “warehouse” unit stores
information on a rapid-access but volatile
primary memory (e.g. RAM) so that
information is available for processing or
output
• Arithmetic Logic Unit (ALU) – This
“manufacturing” unit performs calculations
such as addition, subtraction, division,
comparison etc
Hardware Logical Units
• Central Processing Unit – This
“administrative” unit coordinates and
supervises the operation of the other units
such as when information should be read into
memory and when it should send information
from memory to an output device etc
• Secondary Storage Unit – This “warehousing”
unit is slow access, non-volatile and high
capacity memory (e.g. hard drive)
Computer Data Hierarchy
• Bit – The smallest data item (0 or 1)
• Byte – 8 bits together giving one byte (e.g. 10101010
or 11100100)
• Character – Digits, letters and symbols (e.g. Z, f, 8, #) it
consists of two bytes
• Field – Group of characters or bytes (e.g. Zuma or 2015
or P@ssW0rd)
• Record - Group of related fields (e.g. username and
password)
• File – Group of related records (e.g. mp3 file)
• Database – Electronic collection of data (e.g. student
database, campus courses database)
Computer Programming
• What is computer programming?
• “Computer programming is done as essentially
a set of written instructions that the computer
follows.” http://www.wikihow.com/

• “The process of developing and implementing


various sets of instructions to enable a
computer to do a certain task.” http://www.businessdictionary.com/
Programming Core
• Sequence – There is a definite order in which
commands must be executed on a computer to
achieve a desired outcome.
• Decision – Sometimes two values need to be
compared to determine their relationship and
which resulting processing steps to follow
thereafter.
• Repetition - Many times commands must be
repeated a number of times which can be done
with a program loop instead of repeating the
commands multiple times.
Programming Language Levels
• Machine Language – Computer can directly
understand this code but its very cumbersome for
humans (essentially 0’s and 1’s).
• Assembly Language – English-like abbreviations
that represent elementary operations (e.g.
MOVWF temp), but it must be translated to
machine language by an assembler.
• High-Level Language – Near everyday English like
instructions to accomplish substantial tasks e.g.
printf(“Welcome!”) , but they must be compiled
to machine language by a compiler.

You might also like