module-1
module-1
Register Use
MAR Memory Address Register Holds the memory location of data
that needs to be accessed
MDR Memory Data Register Holds data that is being transferred
to or from memory
AC Accumulator Where intermediate arithmetic and
logic results are stored
PC Program Counter Contains the address of the next
instruction to be executed
CIR Current Instruction Contains the current instruction
Register during processing
Memory
Memory is used to store program instructions and data. A memory unit is a collection of
storage cells together with associated circuits needed to transfer information in and out of
the storage.
Input Devices
i) Keyboard is the most common and very popular input device which helps to input
data to the computer. The design of the keyboard is like that of a traditional
typewriter, although there are some additional keys provided for performing some
additional functions
ii) Mouse is the most popular pointing device. It is a cursor control device having a
small palm size box with a round ball at its base, which senses the movement of the
mouse and sends corresponding signals to the CPU, when the mouse buttons are
pressed.
iii) Joystick is also a pointing device which is used to move the cursor position on a
monitor screen. It is a stick having a spherical ball at its both lower and upper ends.
The lower spherical ball moves in a socket. The joystick can be moved in all four
directions.
iv) Scanner is an input device, which works like a photocopy machine. It is used when
some information is available on paper and it is to be transferred to the hard disk of
the computer for further manipulation. Scanner captures images from the source
which are then converted into a digital form that can be stored on the disk. These
images can be edited, if required.
v) Microphone is an input device to input sound that is then stored in a digital form.
The microphone is used for various applications such as adding sound to a
multimedia presentation or for mixing music.
Output Devices
i) Monitor is the most common output device used with computers, which displays
video images and text. A monitor is made up of circuitry, a screen, a power supply,
buttons to adjust screen settings, and casing that holds all of these components.
ii) Printers are another common output device found in homes and offices. In
computing terms, they take electronic data stored on a computer and generates a
hardcopy of it. There are different types of printer, with Ink jet and Laser printers
being two of the most common types.
iii) Computer Speakers are hardware devices that transform the signal from the
computers sound card in to audio. Speakers create sound using internal amplifiers
that vibrate at different frequencies according to data from the computer. This
produces sound. Speakers are essential if you want a louder sound, surround sound,
fuller bass or just higher quality audio.
iv) Headphones also known as earphones, allow you to listen to audio without
disrupting other people in the vanity. They connect via computer line out or to the
speakers.
v) Projector, as its name suggests, this output device projects computer images onto a
wall or a screen. Projectors are typically used for presentations, watching movies or
as a teaching aid, as they enable an entire roomful of people to see images
generated by a single computer.
II. Memory
Memory is the brain of a computer which stores data and information and also for
retrieving it.
i) Primary memory, also known as main memory is the area in a computer which
stores data and information for fast access. It is a volatile memory, meaning the
data is stored temporarily and is liable to change or lose in case of power failure.
The two main types of primary storage are Random Access Memory (RAM) and
Read Only Memory (ROM).
System Software:
System Software is the type of software which is the interface between application
software and system. Low level languages are used to write the system software.
System Software maintains the system resources and gives the path for application
software to run. An important thing is that without system software, system can not
run. It is a general purpose software.
Application Software:
Application Software is the type of software that runs as per user request. It runs on
the platform which is provided by system software. High level languages are used to
write the application software. Its a specific purpose software.
The main difference between System Software and Application Software is that
without system software, system can not run on the other hand without application
software, system always runs.
Application software
System Software programming is programming is simpler as
7. complex than application software. comparison to system software.
Low-level language
The low-level language is a programming language that provides no
abstraction from the hardware, and it is represented in 0 or 1 forms, which
are the machine instructions. The languages that come under this
category are the Machine level language and Assembly language.
Machine-level language : The machine-level language is a language that
consists of a set of instructions that are in the binary form 0 or 1. Creating a
program in a machine-level language is a very difficult task as it is not easy for
the programmers to write the program in machine instructions. It is error-
prone as it is not easy to understand, and its maintenance is also very high. A
machine-level language is not portable as each computer has its machine
instructions
Assembly Language : The assembly language contains some human-readable
commands such as mov, add, sub, etc. The problems which we were facing in
machine-level language are reduced to some extent by using an extended
form of machine-level language known as assembly language. Since assembly
language instructions are written in English words like mov, add, sub, so it is
easier to write and understand. As we know that computers can only
understand the machine-level instructions, so we require a translator that
converts the assembly code into machine code. The translator used for
translating the code is known as an assembler. The assembly code is not
faster than machine code.
High-Level Language
The high-level language is a programming language that allows a programmer to
write the programs which are independent of a particular type of computer. The
high-level languages are considered as high-level because they are closer to human
languages than machine-level languages. Advantages of a high-level language
The high-level language is easy to read, write, and maintain as it is written in
English like words.
The high-level languages are designed to overcome the limitation of low-level
language, i.e., portability. The high-level language is portable; i.e., these
languages are machine-independent
It requires the assembler to convert It requires the compiler to convert the high-
the assembly code into machine level language instructions into machine
code. code.
The machine code cannot run on all The high-level code can run all the
machines, so it is not a portable platforms, so it is a portable language.
language.
Debugging and maintenance are not Debugging and maintenance are easier in a
easier in a low-level language. high-level language.
Flowchart:
A flowchart is a graphical representation of an algorithm. 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”.
Algorithm Flowchart
Algorithm is complex to
2. understand. Flowchart is easy to understand.
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.
5. 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.
6. 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.
Expected problematic questions
1. Write an algorithm that converts the input Celsius degree into its equivalent
Fahrenheit degree. F = (9/5) *C+32
2. Write an algorithm to find the largest among 3 numbers
3. Write an algorithm to find whether the given year is leap year or not
4. Draw the flowchart to find the roots of a quadratic equation
5. write an algorithm to find the sum of the series (1/2) + (2/3) + (3/4)+…….+ 100/101
6. write an algorithm to find the sum of the series 12+22+32+42+……….+1002
7. Draw the flowchart to find the factorial of a number
8. Write an algorithm to find the sum of the series 1*2+2*3+3*4+……..+100*101
9. Write an algorithm to find nCr.