0% found this document useful (0 votes)
7 views21 pages

Introduction To Programming Language

Introduction to All types of programming
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views21 pages

Introduction To Programming Language

Introduction to All types of programming
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

CIS 115 Lecture 1

 Hardware: Electronic and Mechanical Parts


 Software: Instructions and Computer
Programs
 Input : Keyboard, Mouse, etc.,
 Primary component of a System unit:
 Random Access Memory (RAM)
 Central Processing Unit (CPU)
 Output: Monitor, Printer, etc.,
 Secondary Storage: Disk Drive
 Instructions for the hardware.
 Actions to be performed
 A set of instructions is called a program.
 Driving force behind the computer
 Without a program – What is a computer?
▪ Collection of Useless Hardware
 2 purposes:
 Tell the computer what to do
 Tell other people what we want the computer to
do.
 The central processing unit (CPU)
 The “brain” of a computer
 Retrieves instructions from memory and
executes them.
 Stores data and program instructions for CPU to
execute
 A program and its data must be brought to memory
before they can be executed
 Stores intermediate and final results of
processing.
 Volatile: Contents are erased when computer is
turned off or reset.
 A memory unit is an ordered sequence of bytes,
each holds eight bits. A byte is the minimum
storage unit.
 Hard Drives, CDs/DVDs, Flash Drives, etc.
 Non-Volatile or Permanent Storage
 Programs and data are permanently stored
on storage devices and are moved to memory
when the computer actually uses them.
 Digital devices have two stable states, which
are referred to as zero and one by convention
 The binary number system has two digits, 0
and 1. A single digit (0 or 1) is called a bit, short
for binary digit. A byte is made up of 8 bits.
 Binary Language: Data and instructions
(numbers, characters, strings, etc.) are
encoded as binary numbers - a series of bits
(one or more bytes made up of zeros and ones)
 Encoding and decoding of data into binary is
performed automatically by the system
based on the encoding scheme
 Encoding schemes
 Numeric Data: Encoded as binary numbers
 Non-Numeric Data: Encoded as binary numbers
using representative code
▪ ASCII – 1 byte per character
▪ Unicode – 2 bytes per character
 Decimal
 Base 10, ten digits (0-9)
 The position (place) values are integral powers of 10:
100(ones), 101(tens), 102(hundreds), 103(thousands)…
 n decimal digits - 10n unique values
 Binary
 Base 2, two digits (0-1)
 The position (place) values are integral powers of 2:
20(1), 21(2), 22(4), 23(8), 24(16), 25(32), 26(64)…
 n binary digits - 2n unique values
 Computers can not use human languages,
and programming in the binary language of
computers is a very difficult, tedious process
 Therefore, most programs are written using a
programming language and are converted to
the binary language used by the computer
 Three major categories of prog languages:
 Machine Language
 Assembly Language
 High level Language
 Natural language of a particular computer
 Primitive instructions built into every
computer
 The instructions are in the form of binary
code
 Any other types of languages must be
translated down to this level
 English-like Abbreviations used for
operations (Load R1, R8)
 Assembly languages were developed to make
programming easier
 The computer cannot understand assembly
language - a program called assembler is
used to convert assembly language programs
into machine code
 English-like and easy to learn and program
 Common mathematical notation
 Total Cost = Price + Tax;
 area = 5 * 5 * 3.1415;
 Java, C, C++, FORTRAN, VISUAL BASIC,
PASCAL
A program written in a high-level language is called a
source program (or source code). Since a computer cannot
understand a source program. Program called a compiler is
used to translate the source program into a machine
language program called an object program. The object
program is often then linked with other supporting library
code before the object can be executed on the machine.

Source File Compiler Object File Linker Excutable File

16
 Variable
 backbone of any program
 storage location and an associated symbolic
name which contains some known or unknown
quantity or information, a value
 Control Structures
 A control structure is a block of programming
that analyzes variables and chooses a direction
in which to go based on given parameters.
 Data Structures
 is a particular way of storing and
organizing data in a computer so that it can be
used efficiently.
 Syntax
 is the set of rules that define the combinations of
symbols that are considered to be correctly
structured programs in that language.
 Tools
 IDE
▪ check the syntax of your code
▪ organize your files and give you a nice way to view them
▪ they tend to have code completion

You might also like