Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

Working Principle

•CPU (Central Processing Unit)

•Storage Unit

•ALU(Arithmetic Logic Unit)

•Control Unit
System Bus

• Address bus - carries


memory addresses from
the processor to other
components such as
primary storage
and input/output devices.

• Data bus - carries the data


between the processor and
other components.

• Control bus - carries


control signals from the
processor to other
component BUS
Memory
Types of RAM
• DRAM: DRAM stands for Dynamic RAM, and it is the most common type of
RAM used in computers. The oldest type is known as single data rate (SDR)
DRAM, but newer computers use faster dual data rate (DDR) DRAM. DDR
comes in several versions including DDR2 , DDR3, and DDR4, which offer
better performance and are more energy efficient than DDR. However different
versions are incompatible, so it is not possible to mix DDR2 with DDR3 DRAM
in a computer system. DRAM consists of a transistor and a capacitor in each
cell.

• SRAM: SRAM stands for Static RAM, and it is a particular type of RAM which
is faster than DRAM, but more expensive and bulker, having six transistors in
each cell. For those reasons SRAM is generally only used as a data cache
within a CPU itself or as RAM in very high-end server systems. A small SRAM
cache of the most imminently-needed data can result in significant speed
improvements in a system.
Types of ROM
• PROM stands for Programmable Read-Only Memory, and it is different from true ROM in
that while a ROM is programmed (i.e. has data written to it) during the manufacturing
process, a PROM is manufactured in an empty state and then programmed later using a
PROM programmer or burner.

• EPROM stands for Erasable Programmable Read-Only Memory, and as the name suggests,
data stored in an EPROM can be erased and the EPROM reprogrammed. Erasing an
EPROM involves removing it from the computer and exposing it to ultraviolet light before re-
burning it.

• EEPROM stands for Electrically Erasable Programmable Read-Only Memory, and the
distinction between EPROM and EEPROM is that the latter can be erased and written to by
the computer system it is installed in. In that sense EEPROM is not strictly read-only.
However in many cases the write process is slow, so it is normally only done to update
program code such as firmware or BIOS code on an occasional basis
Secondary Memory

• Hard disk drives


• Solid state drives (SSDs)
• Optical (CD or DVD) drives
• Tape drives Tape Drive
Software
Software, instructions that tell a computer what to do. Software
comprises the entire set of programs, procedures, and routines
associated with the operation of a computer system. The term was
coined to differentiate these instructions from hardware—i.e., the
physical components of a computer system. A set of instructions
that directs a computer’s hardware to perform a task is called a
program, or software program.
Computer software is divided into two main categories:
1. Systems software
2. Applications software
 System software manages computer resources and makes
computers easy to use. Examples are Operating Systems, Antivirus
softwares, Disk utility programs, Networking softwares, etc.
An applications software enables a computer to be used to do a
particular task.
Operating Systems
The most important systems program is the operating
system.
It is a group of programs that coordinates the operation of all
the hardware and software components of the computer
system.
It is responsible for starting application programs running and
finding the resources that they need.

Examples of operating systems are: Windows 10/8/7,


Windows XP, Linux, Unix, Mac OS X, Android, iOS, etc.
Computer Languages
All the existing Computer programming languages can be broadly
categorized into three groups:
 Low Level Language (Machine Language) – Consists of patterns of
1’s and 0’s. No conversion required. Readily understood and
executed by the CPU. But very difficult to program. Moreover,
machine language of one CPU architecture (x86) is not understood
by another CPU architecture (ARM).
Computer language evolution
 Mid Level Language (Assembly Language or Symbolic Language) –
Consists of mnemonics (symbolic names for bit patterns). Easier to
program. Must be converted into machine language for the CPU to
understand and execute the program.
 High level Language – Consists of human language like words and
symbols. Much easier to program. Must be converted into
machine language for the CPU to understand and execute the
program. Examples are Fortran, C, C++, Java, Python, Matlab, etc.
Computer Languages

Computer language evolution


Computer Languages

Computer language evolution

(**General-purpose, Scientific, Database, Scripting,


Note:
Structured/Functional/Procedural, OOP**)

The only language understood by a


computer is machine language.
Steps to Solve a Problem by Computer Programming
Generally four steps are followed to solve a real-world computational
problem by using a computer programming language:
 Step – 1: Problem Definition – General statement of the problem
or the purpose of what is/are to be done with available inputs and
desired outputs.
 Step – 2: Algorithm Development with appropriate Data
Structure – Exploring the process/methodology to solve the
problem and resolvingComputer
the process/methodology
language evolution
into groups of
single step sequential/logical instructions (called ‘pseudocode’)
executable by the CPU using appropriate data structure.
 Step – 3: Coding– Developing the “source code” of the solution
using a suitable computer programming language.
 Step – 4: Compiling, Linking, Testing and Debugging the Code –
Converting the source code into “machine/object code” and test
run the code, check the output and errors and debug (correct)
errors in the code. Then recompile, retest and debug if necessary.
Software Modules Required for Programming
Four software modules are required to constitute a complete programming
environment.

Module – 1: Text Editor – A plain text editor is required to develop the source
code. Examples – Notepad, Wordpad, Notepad++, WinEdit, TextEdit, vi, vim,
emacs, etc.
Module – 2: Compiler or Interpreter – A compiler/interpreter is required to
convert the source code into machine code. Examples - gcc, g++, tcc, vcc, etc.
Module – 3: Linker – A linkerComputer
programlanguage
links theevolution
API routines from the OS or other
3rd party library codes to the programmer’s object code. Example – ld.
Module – 4: Debugger – A debugger checks for syntactical/logical errors in the
code. Example – gdb.

There are some software packages which provide all the four required software
modules within a single user interface. These softwares are called IDE (Integrated
Development Environment). Examples - Codeblocks, Dev-C++, Turbo C, MS Visual
Studio, Xcode, Eclipse, etc.
Programming Paradigm
A programming paradigm is a style, or “way,” of programming. It does not refer to
a specific language, but rather it refers to the way you program.

Computer language evolution


Algorithm
In programming, algorithm is a set of well defined instructions in sequence to
solve the problem.

• Input and output should be defined precisely.


• Each steps in algorithm should be clear and unambiguous.
• Algorithm should be most effective among many different ways to solve a problem.
• An algorithm shouldn’t have computer code. Instead, the algorithm should be written
in such a way that, it can be used in similar
Computer programming
language languages.
evolution

Write an algorithm to add two numbers entered by user:


Step 1: Start Step 2: Declare variables num1, num2 and sum. Step 3: Read values num1
and num2. Step 4: Add num1 and num2 and assign the result to sum.
sum←num1+num2 Step 5: Display sum Step 6: Stop
Flowchart
A flowchart is a type of diagram that represents an algorithm, workflow or
process. The flowchart shows the steps as boxes of various kinds, and their
order by connecting the boxes with arrows. … Flowcharts are used in analyzing,
designing, documenting or managing a process or program in various fields.

Flowcharts use special shapes


Computer language evolution
to represent different types of
actions or steps in a process.
These are known as flowchart
symbols.

You might also like