IntroToComputer
IntroToComputer
IntroToComputer
Introduction
• Computer is an electronic device that takes raw data as an input from the user and
processes it under the control of a set of instructions (called program), produces a
result (output), and saves it for future use.
3
Computer History
1950's
◦ Large devices, accessible to few people
1960's
◦ Commercial usage emerges
◦ Operated by experts
1970's
◦ Computers cheaper, smaller
1990's
◦ Computers fast, small, inexpensive
◦ Owned and used by many people
4
Basics of Computer
5
A Typical Computer System
Monitor Speaker
(output) (output)
System unit
(processor, memory…)
Printer
(output)
Storage devices
(CD-RW, Floppy,
Hard disk, zip,…)
Scanner
(input) Keyboard Mouse
(input) (input)
6
Elements of a Computer
• Hardware
• Software
• Input unit
• Processing unit
• Control unit
• Memory unit
• Output unit
Input unit
• Responsible for taking data\information from user to perform operation.
• Mouse
• Keyboard
• Touch screen
• Microphone
• Scanner
Processing unit
• Performs arithmetic operations like calculations on data in order to convert them into useful
information.
• The Control Unit collects the data entered using the input unit
• Cache Memory
• Temporary memory
• Secondary Memory
• It has a limited capacity and data is lost when power is switched off. That is why it is
also called Temporary memory.
• The data and instruction required to be processed resides in the main memory.
• Two types
• The contents of secondary memories are first transferred to the main memory, and then the
CPU can access it.
• Hard Disk
• CD\DVD
Output unit
• Responsible for providing the user with results produced by operations performed
on the provided data
• Monitor \ screen
• Printer
• Speaker
• Plotters
Primary Memory/ Primary Storage
• Primary Memory or Primary storage devices hold data temporarily
• Cache
Random Access Memory (RAM)
• The programs and data that the CPU requires during the execution of a program are stored in this
memory.
• Every time the computer needs to work on an application or program, the RAM is used to complete that
operation.
Read Only Memory (ROM)
• Stores crucial information essential to operate the system, like the program essential to boot the
computer.
• It is not volatile.
• Cache memory is an extremely fast memory type that acts as a buffer between RAM and the CPU.
• Cache memory is used to reduce the average time to access data from the Main memory.
• The cache is a smaller and faster memory which stores copies of the data from frequently used main
memory locations.
Register Memory
• A register temporarily holds frequently used data, instructions, and memory address that are to be used
by CPU.
• The speed of a CPU depends on the number and size (no. of bits) of registers that are built into the CPU.
Register Memory Types
• Accumulator:
• Stores the results of ALU.
• Without the accumulator, the results would be stored in memory and read again for other operations.
• Accumulator allows the ALU results to be stored in a register so it can be quickly accessed again
• Two types
• System Software
• Application Software
System Software
• The system software is a collection of programs designed to operate, control, and extend the processing capabilities of the
computer itself.
• These software products comprise of programs written in low-level languages (language close to and understandable to
computer), which interact with the hardware at a very basic level.
• System software serves as the interface between the hardware and the end users.
• Device Driver
• Compilers
• Assemblers, etc.
Operating System (OS)
• An Operating System (OS) is an interface between a computer user and computer hardware.
• An operating system is a software which performs all the basic tasks like file management, memory
management, process management, handling input and output, and controlling peripheral devices such as disk
drives and printers.
• Microsoft Windows
• Macintosh / Mac OS
• Linux
• Android OS
Why we need an Operating System?
• Multitasking:
Operating System manages memory and allows multiple programs to run in their own space and even
communicate with each other through shared memory.
Tasks Performed by an OS
• Processor Management:
• This deals with the management of the Central Processing Unit (CPU).The operating system
takes care of the allotment of CPU time to different processes. When a process finishes its
CPU processing after executing for the allotted time period, this is called scheduling.
• Context Switching:
• In most multitasking OSs, multiple running processes on the system may need a change of
state in execution. Even if there are multiple processes being executed at any one point in
time, only one task is executed in the foreground, while the others are put in the background.
Tasks Performed by an OS
• Device Management:
• The Operating System communicates with the hardware and the attached devices and maintains
a balance between them and the CPU.
• Memory management:
• In a computer, both the CPU and the I/O devices interact with the memory. When a program
needs to be executed it is loaded onto the main memory till the execution is completed.
Thereafter that memory space is freed and is available for other programs.
• File Management:
• The operating system manages the files, folders, and directory systems on a computer. Any data
on a computer is stored in the form of files and the operating system keeps the information
about all of them using the File Allocation Table (FAT).
Device Drivers
System software that controls and monitors functioning of a specific device on computer is
called device driver. Each device like printer, scanner, microphone, speaker, etc. that needs to be
attached externally to the system has a specific driver associated with it. When you attach a new
device, you need to install its driver so that the OS knows how it needs to be managed.
Application software
• Application software is software that helps an end user complete tasks.
• Application software lies above the system software and is different from system software in
that it’s designed for the end use and is specific in its functionality.
• This type of software is sometimes referred to as non-essential software because it’s installed
and operated based on the user’s needs.
• MS Word
• MS Excel
• VLC Player
• Adobe Photoshop
Programming Languages
1. Machine language
2. Low-level languages
3. High-level languages
31
1. Machine level languages
34
3. High level languages
• Java 35
Binary Units
36
Evolution of Programming Languages
• Early computers programmed in machine languages
• Codes translated
into machine
language by a
program called
the "assembler"
37
Evolution of Programming Languages
38
Processing a High-Level Language Program
1. Source program created with an editor
2. Source code translated into machine
language by compiler
results in a .obj file (object code)
40