You are on page 1of 6

INTRODUCTION TO BASIC PROGRAMMING LANGUAGE

BASIC – Beginners All-purpose Symbolic Instruction Code. Originally designed


as an interactive mainframe timesharing language by JOHN KEMENEY and
THOMAS KURTZ.
Anybody can write a program. A background in mathematics or science is not
required. Patience, practice, and an interest in the subject matter should
suffice, along with the required software and hardware.
Understanding programs can appear daunting at first, but their reliance on
logical operations allow for easy learning of commands which you will
commonly see in many programs. A program itself is merely a series of
commands in the order in which they are to be executed. That is to say, that
the first line is the beginning of the program!
All programs a user uses from day to day, including browsers (Internet
Explorer, Firefox, etc.) and operating systems (Windows, Linux and Mac OS,
etc) are separate sets of lines of code, which aim to fulfill tasks. The amount of
code is dependent on how simple the task generally, and different types of code
may be used for the advantages they give. BASIC is considered an excellent
starting point for moving onto other languages, and can be useful for simple
programs.

PROGRAMMING LANGUAGES – Formal constructed languages designed to


communicate instructions to a machine.
Programming languages allow people to give instructions to a computer with
commands that both the computer and the programmer can understand.
Different programming languages use different commands and different rules
for entering those commands; similar to the way people speak different words
to each other with the same meaning. One person may say "hello", while
another says "hola", which appear different but express the same thought.
Computer programming languages can be similar to each other in the same
way that human languages, such as French and Spanish, can be.
Programming languages that are similar are usually referred to as related
languages. Once a person learns a programming language, it is easier to then
learn other programming languages, especially those related to the first one, as
many similarities in structure are shared between languages, especially those
with a common ancestor.
The language taught here, BASIC, is easier to learn than others as its
commands are similar to English and it has a simple set of rules for entering
them.
KINDS OF PROGRAMMING LANGUAGES
1. Machine code language
Machine code, also known as machine language, is the elemental
language of computers. It is read by the computer's central processing
unit (CPU), is composed of digital binary numbers and looks like a very
long sequence of zeros and ones. Ultimately, the source code of every
human-readable programming language must be translated to machine
language by a compiler or an interpreter, because binary code is the only
language that computer hardware can understand.

- Has the least abstraction


- Processor executes the instructions immediately, this doesn’t need any
translator or interpreter of code just for the computer to understand.
- Unlike in the assembly level and high level, wherein they need
translator or interpreter in order for the instructions to be understand
by the machine/computer.
- Machine code is specific to a processor/family of processors (not
portable).

2. Assembly level language


An assembly language is a type of low-level programming language that
is intended to communicate directly with a computer’s hardware. Unlike
machine language, which consists of binary and hexadecimal
characters, assembly languages are designed to be readable by humans.

Low-level programming languages such as assembly language are a


necessary bridge between the underlying hardware of a computer and
the higher-level programming languages.

- Another low level language but more abstracted than machine code
language.
- This one use simple mnemonics.

3. High level language.


A high-level language is any programming language that enables
development of a program in a much more user-friendly programming
context and is generally independent of the computer's hardware
architecture.
A high-level language has a higher level of abstraction from the
computer, and focuses more on the programming logic rather than the
underlying hardware components such as memory addressing and
register utilization.

High-level languages are designed to be used by the human operator or


the programmer. They are referred to as "closer to humans." In other
words, their programming style and context is easier to learn and
implement than low-level languages, and the entire code generally
focuses on the specific program to be created.

A high-level language does not require addressing hardware constraints


when developing a program. However, every single program written in a
high-level language must be interpreted into machine language before
being executed by the computer.

-most likely ordinary languages, so are far easier to use (still strict syntax)
-They are portable, meaning they can be executed on many computers.
- you don’t need to write hardware specific code, like low level.
- however some high-level languages are more abstract than others

COMPUTER PROGRAMMING
Computer programming is the process of performing
particular computations (or more generally, accomplishing
specific computing results), usually by designing and
building executable computer programs. Programming involves tasks such as
analysis, generating algorithms, profiling algorithms' accuracy
and resource consumption, and the implementation of algorithms (usually in a
particular programming language, commonly referred to as coding).
The source code of a program is written in one or more languages that are
intelligible to programmers, rather than machine code, which is directly
executed by the central processing unit. To produce machine code, the source
code must either be compiled or transpiled. Compiling takes the source code
from a low-level programming language and converts it into machine code.
Transpiling on the other hand, takes the source-code from a high-level
programming language and converts it into bytecode. This is interpreted into
machine code. The purpose of programming is to find a sequence
of instructions that will automate the performance of a task (which can be as
complex as an operating system) on a computer, often for solving a given
problem. Proficient programming thus usually requires expertise in several
different subjects, including knowledge of the application domain, specialized
algorithms, and formal logic.

COMPUTER PROGRAM
A computer program, also known as an application, is a system of one or
more coded commands that you use to complete an action on your device.
When these instructions work together to perform more complex tasks, such as
running a computer, these instructions are known as software. You can these
instructions to perform various tasks, such as storing sensitive files or
speaking with others via video. You can create instructions for a program by
using a coding language, which converts commands into a form of code that a
computer can understand.

PROCESS OF PROGRAMMING
 Understand the problem statement.
 Write the algorithm
 Write the code
 Solve the Compile Time Errors.
 Test Run and Debug RunTime/Logical errors

ELEMENTS OF PROGRAMMING
 Syntax
 Variable
 Function
 Arithmetic and logical operators
 Loop

PROCEDURE – is a finite sequence of well-defined instructions, each of


which can be carried out a finite amount of time.
ALGORITHM – is a step by step procedure to solve a given problem.
FLOWCART – is a type of diagram that represents an algorithm or
process.
PSEUDO CODE – is a compact and informal high level description of a
program.

What is a Flowchart?
Flowchart is a graphical representation of an algorithm. Programmers often
use it as a program-planning tool to solve a problem. It makes use of symbols
which are connected among them to indicate the flow of information and
processing.
The process of drawing a flowchart for an algorithm is known as
“flowcharting”.
Basic Symbols used in Flowchart Designs
1. Terminal: The oval symbol indicates Start, Stop and Halt in a program’s
logic flow. A pause/halt is generally used in a program logic under some
error conditions. Terminal is the first and last symbols in the flowchart.

 Input/Output: A parallelogram denotes any function of input/output type.


Program instructions that take input from input devices and display
output on output devices are indicated with parallelogram in a flowchart.

 Processing: A box represents arithmetic instructions. All arithmetic


processes such as adding, subtracting, multiplication and division are
indicated by action or process symbol.

 Decision Diamond symbol represents a decision point. Decision based


operations such as yes/no question or true/false are indicated by diamond
in flowchart.

 Connectors: Whenever flowchart becomes complex or it spreads over more


than one page, it is useful to use connectors to avoid any confusions. It is
represented by a circle.

 Flow lines: Flow lines indicate the exact sequence in which instructions
are executed. Arrows represent the direction of flow of control and
relationship among different symbols of flowchart.
 Initialization symbol
Hexagon shape is used to represent the initialization symbol
variables inside the initialization symbol holds the value of the first
number in the given.

You might also like