Professional Documents
Culture Documents
Computer Program
What is a Computer Program?
• A computer program, or just a program, is a sequence of instructions,
written to perform a specified task with a computer. A computer requires
programs to function, typically executing the program's instructions in a
central processor. Computer programs are written by computer
programmer.
• Programmer are professional in computing that write programs using
different computer programming languages
Programming languages are categorized into
• Machine Language: Machine language consists of binary code (0s and 1s) that directly instructs
the computer's CPU. Each instruction corresponds to a specific operation that the CPU can
perform.
• Assembly Language: Assembly language uses mnemonic codes to represent machine
instructions. These mnemonic codes are then translated into machine language instructions by an
assembler. Assembly language provides a more human-readable format compared to machine
language.
• High level language: is computer (programming) languages that are easier to learn; uses English
like statements. Examples are C ++, Visual Basic, Pascal, Fortran, Python and C# etc. Program
written in high level language need to be translated into machine readable code using Language
translators
Types of language Translators(Interpreter
and Compiler)
• An interpreter is a computer program that directly executes, i.e. performs, instructions
written in a programming or scripting language, without previously compiling them into a machine
language program.
• An interpreter translates high-level instructions into an intermediate form, which it then executes.
• A compiler translates high-level instructions directly into machine language. An interpreter is
a computer program that directly executes, i.e. performs, instructions written in a programming
or scripting language, without previously compiling them into a machine language program.
• An interpreter translates high-level instructions into an intermediate form, which it then executes.
In contrast, a compiler translates high-level instructions directly into machine language.
• Compiled programs generally run faster than interpreted programs.
Motivation for Computer Program
Data(I/
Connect Terminator O)
Sort or
Merg Document
e Col
Display late
Example 1: Draw a flowchart to calculate the sum and average of any two numbers.
Start
INPUT A,B
SUM= A+B
AVG=SUM/2
STOP
Introduction to using personal computers
hardware and software.
• Hardware and software are two terms you've probably heard of at some
point or another. We use both on a daily basis, whether it's with your
smartphone or personal computer. Let's take a deeper look at what these
two things are and why they're important.
• Hardware is any element of a computer that's physical. This includes
things like monitors, keyboards, and also the insides of devices,
like microchips and hard drives.
Software
• Software is anything that tells hardware what to do and how to do it,
including computer programs and apps on your phone. Video games,
photo editors, and web browsers are just a few examples.
Hardware and Software
• Hardware and software are different from each other, but they also need
one another in order to function. Let's look at an example of this using a
smartphone. In this case, the hardware would be the physical phone itself,
and the software would be its operating system and apps.
• If we were to take away the software, we would just have a dead phone in
our hands. It wouldn't be able to make calls, text, or go online because
it's not receiving any instructions.
• On the other hand, let's say we have no hardware, meaning there's no
actual phone. If all we have are the programs, we just have a bunch of
instructions but nothing to give these instructions to.
• Hardware needs software to tell it what to do, but software also needs
hardware in order to act out its directions. When you combine the two,
you can do all sorts of things, whether you're using a smartphone,
computer, or any other type of device.