1 Basics of Computer and Problem Solving
1 Basics of Computer and Problem Solving
Python Programming
ing Problem Solving Approach
Reema Thareja
Hardware: A computer and all its physical parts are known as © OXFORD UNIVERSITY PRESS 2017. ALL RIGHTS
hardware.
RESERVED.
First Generation of Computers (1942 – 1955)
Hardware Technology: Manufactured using Large Scale and Very Large Scale integrated
circuits.
Software Technology: Programming was done in high level language.
Used for: Scientific, commercial, interactive and network applications
Examples: IBM PC, Apple II, TRS-80, VAX 9000, CRAY-1, CRAY-2, CRAY-X/MP
Highlights: Faster, smaller, cheaper, powerful, reliable, and easier to use than the
previous generation computers
15
16
IR stores the instructions currently being executed. © OXFORD UNIVERSITY PRESS 2017. ALL RIGHTS
RESERVED.
CPU Architecture
18
An input device is used to feed data and instructions into the computer.
Some of the input devices that are widely used by computer users to feed data or
instruction to the computer are keyboard, mouse, trackball, joystick, stylus, touch screen,
barcode reader, optical character recognition (OCR) device, optical mark recognition
(OMR), MICR, web and digital cameras, etc.
19
21
• Driver software
• Educational software
• Media players and media development software
• Productivity software
• Operating systems software
• Computer games
• Application software
• System software
25
26
27
example, MASM, TASM, NASM, YASM, VASM, etc. © OXFORD UNIVERSITY PRESS 2017. ALL RIGHTS
RESERVED.
Translator
Linker
Software development in the real world usually follows a modular
approach in which, a program is divided into various (smaller) modules
as it is easy to code, edit, debug, test, document, and maintain them.
Moreover, a module written for one program can also be used for
another program. When a module is compiled, an object file of that
module is generated.
Once the modules are coded and tested, the object files of all the
modules are combined together to form the final executable file. Linker,
also called a link editor or binder, is a program that combines the object
modules to form an executable program.
30
Loader
© OXFORD UNIVERSITY PRESS 2017. ALL RIGHTS
RESERVED.
A loader is a special type of program that is part of an operating system
Representation Of Data
Bit is a short form of binary digit. It is the smallest possible unit of data. In computerized data a bit can either be 0 or 1.
Nibble is a group of four binary digits.
Byte is a group of eight bits. A nibble is a half byte. Bits 0 through 3 are called the low order nibble, and bits 4 through 7
form the high order nibble
Word is group of two bytes is called a word. Bits 0 through 7 form the low order byte and bits 8 through 15 form the high
order byte.
31
During testing, all the modules are tested together to ensure that the
overall system works well as a whole product.
we start with designing the most basic or concrete modules and©then proceed
OXFORD UNIVERSITY towards
PRESS 2017. ALL RIGHTS
RESERVED.
designing higher level modules.
Control Structures Used in Algorithms
Sequence means that each step of the algorithm is executed in the specified order.
Decision statements are used when the outcome of the process depends on some
condition
Repetition, which involves executing one or more steps for a number of times, can be
implemented using constructs such as the while, do-while, and for loops.
Recursion is a technique of solving a problem by breaking it down into smaller and
smaller sub-problems until you get to a small enough problem that it can be easily
Examples:
solved. Usually, recursion involves a function calling itself until a specified condition is
met.
34
35
36
Example: Write a pseudocode for calculating the price of a product after adding the sales tax
to its original price.
37
Unit Tests: Unit testing is applied only on a single unit or module to ensure whether it
exhibits the expected behavior.
Integration Tests: These tests are a logical extension of unit tests. In this test, two
units that have already been tested are combined into a component and the interface
between them is tested.
System Tests: System testing checks the entire system.
39