Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
44 views52 pages

1 Introduction

The document discusses the fundamentals of computers including how they work, their components like CPU, memory and buses, and a brief history. It describes the basic parts of a computer like input, output, storage and processing units. It also explains the differences between various types of memory and processors.

Uploaded by

Ramastar Mastar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views52 pages

1 Introduction

The document discusses the fundamentals of computers including how they work, their components like CPU, memory and buses, and a brief history. It describes the basic parts of a computer like input, output, storage and processing units. It also explains the differences between various types of memory and processors.

Uploaded by

Ramastar Mastar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 52

Fundamentals of Computers

Introduction – A Computer (Level 0)


Introduction – A Computer (Level 0)
❖A computer is an electronic device that takes data and instructions as an input from the user,
processes the data, and provides useful information as output

❖Input device is any peripheral (piece of computer hardware equipment) to provide data and control signals to
an information processing system such as a computer or other information appliance.

❖A Central Processing Unit (CPU) is responsible for all functions and processes

❖Memory devices are used to store data and instructions so that they are available for processing as and when
required.

❖The output unit consists of devices with the help of which we get the information from the computer
How does a Computer Work?
Stored Program (Von Neumann)
❑ These can be programmed to carry out many different tasks
❑ Applications are stored on them
❑ Programs and data are stored in a separate storage units called memories and are treated the same
Central Processing Unit (CPU)
❑ Traditionally, the term “CPU” refers to a processor, more specifically to its
processing unit and control unit (CU)

❑It distinguishes these core elements of a computer from external


components such as main memory and I/O circuitry

❑Most modern CPUs are microprocessors, meaning they are contained on a


single integrated circuit (IC) chip

❑An IC that contains a CPU may also contain memory, peripheral interfaces,
and other components of a computer; such integrated devices are
variously called microcontrollers
Control Unit (CU)
❑ CU handles all processor control signals

❑ It directs all input and output flow

❑ It fetches code for instructions and controlling how data moves around the system.

❑It is responsible for controlling the transfer of data and instructions among other units of a
computer

❑It obtains the instructions from the memory, interprets them, and directs the operation of the
computer.
Arithmetic and Logic Unit (ALU)
❑ ALU handles all the calculations the CPU may need, e.g. Addition, Subtraction, Multiplication,
Division

❑It performs Logical Operations, Bit Shifting Operations etc.


CPU Registers
CPU Registers
❖Accumulator: Stores the results of calculations made by ALU
❖Program Counter (PC): Keeps track of the memory location of the next instructions to be dealt
with. The PC then passes this next address to Memory Address Register (MAR).
❖Memory Address Register (MAR): It stores the memory locations of instructions that need to be
fetched from memory or stored into memory
❖Memory Data Register (MDR): It stores instructions fetched from memory or any data that is to
be transferred to, and stored in, memory
❖Current Instruction Register (CIR): It stores the most recently fetched instructions while it is
waiting to be coded and executed
❖Instruction Buffer Register (IBR): The instruction that is not to be executed immediately is
placed in the instruction buffer register IBR
Memory Organization
❑ Computer memory is of two basic types:
❑ Primary memory(RAM and ROM) – RAM is volatile and ROM is non-volatile
❑ Secondary memory(hard-drive, CD, etc.)

❑Primary memory –
❑ It is located close to the CPU on the computer motherboard
❑ enables the CPU to read data from primary memory very quickly indeed

❑Secondary memory –
❑ It is usually physically located within a separate storage device, such as a hard disk drive or solid state drive (SSD)
❑ The cost per gigabyte of secondary memory is much lower, but the read and write speeds are significantly slower.
Memory: Address and Values
Primary Memory
❖Random Access Memory (RAM) –
o It is also called as read write memory or the main memory or the primary memory.
o It is directly accessible by CPU
o The programs and data that the CPU requires during execution of a program are stored in this memory.
o It is a volatile memory as the data loses when the power is turned off.
o RAM is further classified into two types- SRAM (Static Random Access Memory) and DRAM (Dynamic
Random Access Memory).
Primary Memory
❖ Read Only Memory (ROM) –
o Stores crucial information essential to operate the system, like the program essential to boot the computer.
o It is not volatile.
o Always retains its data.
o Used in embedded systems or where the programming needs no change.
o Used in calculators and peripheral devices.
o ROM is further classified into 3 types- PROM, EPROM, and EEPROM
❖PROM (Programmable read-only memory) – It can be programmed by user. Once programmed, the
data and instructions in it cannot be changed
❖EPROM (Erasable Programmable read only memory) – It can be reprogrammed. To erase data from it,
expose it to ultra violet light. To reprogram it, erase all the previous data.
❖EEPROM (Electrically erasable programmable read only memory) – The data can be erased by
applying electric field, no need of ultra violet light. We can erase only portions of the chip
RAM vs. ROM
Features RAM ROM
RAM is a volatile memory which could store the data as long as the power ROM is a non-volatile memory which could retain the data even when
Data retention
is supplied. power is turned off.

Working type Data stored in RAM can be retrieved and altered. Data stored in ROM can only be read.

Used to store the data that has to be currently processed by CPU


Use It stores the instructions required during bootstrap of the computer.
temporarily.

Speed It is a high-speed memory. It is much slower than the RAM

The CPU can not access the data stored on it unless the data is stored in
CPU Interaction The CPU can access the data stored on it.
RAM.

Size and Capacity Large size with higher capacity. Small size with less capacity

Used as/in CPU Cache, Primary memory. Firmware, Micro-controllers

Accessibility The data stored is easily accessible The data stored is not as easily accessible as in RAM

Cost Costlier cheaper than RAM.


Secondary Storage
❑Permanent Storage: Primary Memory (RAM) is volatile, i.e. it loses all information when the
electricity is turned off, so in order to secure the data permanently in the device, Secondary
storage devices are needed.
❑ Types of fixed storage:
o SSD (solid-state disk) units
o Hard disk drives (HDD)

❑ Portability: Storage medium, like the CDs, flash drives can be used to transfer the data from
one device to another
❑ Types of Removable Storage:
o Optical discs (CDs, DVDs, Blu-ray discs)
o Memory cards
o Floppy disks
o Magnetic tapes
Cache Memory
❑It is a very high-speed memory

❑The cache is a smaller and faster memory which stores copies of the data from frequently used
main memory locations

❑Cache memory is costlier than main memory or disk memory but economical than CPU registers

❑It holds frequently requested data and instructions so that they are immediately available to the
CPU when needed.
Cache Memory
❖Types of Cache –

❑ Primary Cache –
A primary cache is always located on the processor chip. This cache is small and its access time is comparable to that of
processor registers.

❑ Secondary Cache –
Secondary cache is placed between the primary cache and the rest of the memory. It is referred to as the level 2 (L2) cache.
Often, the Level 2 cache is also housed on the processor chip.
Memory Hierarchy Design
CPU vs. GPU
CPU vs. GPU
❑CPU is designed to handle a wide-range of tasks quickly (as measured by CPU clock speed), but
are limited in the concurrency of tasks that can be running

❑A GPU is designed to quickly render high-resolution images and video concurrently.

❑Because GPUs can perform parallel operations on multiple sets of data, they are also commonly
used for non-graphical tasks such as machine learning and scientific computation

❑Designed with thousands of processor cores running simultaneously, GPUs enable massive
parallelism where each core is focused on making efficient calculations.
Input Devices
❖ They are used for accepting the data on which the operations are to be performed
Output Devices
❖ The data, processed by the CPU, is made available to the end user by the output devices
Buses
❖ Data is transmitted from one part of a computer to another, connecting all major internal
components to the CPU and memory, by the means of Buses

❖ Data Bus: It carries data among the memory unit, the I/O devices, and the processor

❖ Address Bus: It carries the address of data (not the actual data) between memory and processor.

❖ Control Bus: It carries control commands from the CPU (and status signals from other devices) in order to control and
coordinate all the activities within the computer.
History of Computers
History of Computers
❖The use of computing techniques is over 5000 years old
❖Computing history starts with the development of a device called the abacus by the Chinese around 3000
BC

❖The first accounting machine, Pascaline, built by Blaise Pascal, in 1642


❖The origin of the modern computer is analytical engine, designed by Charles Babbage, ‘father of modern
computer’, in 1834
❖It was considered as the first programmable digital mechanical computer
❖In 1854, George Boole developed Boolean algebra, based on variables having 2 states, T or F
Generation of Computers
❖Different computing devices developed over the years can be categorized into several
generations

❖Each generation is the result of a technological development

❖As we proceed from one generation to the next, the computers have become smaller in size and
cheaper with more efficient computing capability.
First-Generation Computers (1940 – 1956)
❖Characteristics
❖ Vacuum tube technology – used to build the circuitry for the computers, filament are used to generate electrons
❖ Punched cards for data input
❖ Punched cards and paper tape for output
❖ Machine Language for writing programs
❖ Magnetic tapes and drums for external storage
❖ The size was very large, cover the space of an entire room
❖ To avoid malfunctioning from overheating, the rooms have to be air-conditioned

❖Examples
❖ ENIAC “Electronic Numeric Integrated And Calculator”
❖ EDVAC “Electronic Discrete Variable Automatic Compute”
❖ UNIVAC “Universal Automatic Computer”
❖ IBM-701
Second-Generation Computers (1956 – 1963)
❖Characteristics
❖ Vacuum tube was replaced by transistors
❖ Size and cost of the computers started reducing
❖ Assembly language started being used in place of machine language
❖ High level languages were also introduced, like COBOL, FORTRAN
❖ Concept of stored program emerged, i.e. instructions were stored in the memory of the computer
❖ Punched cards for data input, Magnetic tapes for output

❖Examples
❖ IBM 1620
❖ PDP 8
❖ CDC 1604
Third-Generation Computers (1964 – 1971)
❖Characteristics
❖ Use of Integrated circuits (IC), specially SSI
❖ Substantial reduction in size, cost and power consumption of the machines
❖ increase in computation speed
❖ Use of magnetic tapes and drums for external storage

❖Examples
❖ IBM370
❖ CDC7600
Fourth-Generation Computers (1971 – 1980)
❖Characteristics
❖ Use of Large Scale & Very Large Scale Integration (LSI and VLSI)
❖ Introduction of microprocessor
❖ Magnetic core memories are replaced by semiconductor memories
❖ LAN and WAN were introduced
❖ Introduction of Personal Computers
❖ Inception of OS, like MS-DOS, MS WINDOWS
❖ High level languages
❖ GUI introduced

❖Examples
❖ Intel 4004 (4-bit), first microprocessor of this generation (1971)
Fifth-Generation Computers (1981 – till date)
❖Characteristics

❖ Introduction of Ultra Large Scale Integration technology


❖ Optical disks, known as, CD-ROM, used as portable mass storage medium
❖ PCs become portable, more reliable and more powerful
❖ More user-friendly interfaces with multimedia features
❖ Computing devices based on AI, image processing, voice recognition system, Neural networks, NLP,
Robotics etc.
❖ Introduction of parallel processing, quantum computation
Intel Processor Models and Generations
▪ 4-bit (4004, 4040,..), 8-bit (8080, 8085,..) (4th generation)
▪ 16-bit (8086, 8088,..), 32-bit(80386DX, 80386SX, 80486DX, 80486SX, ..) (5th generation)
▪ Pentium 1, 2, 3, 4, Celeron [starts with 32-bit processors]
▪Pentium Core, Dual Core (a core is a small CPU built into a big CPU)
▪Core Duo
▪Core 2 Duo
▪Core i3, i5, i7
❑ Dual core processors are those that contain 2 cores in a single silicon chip while Core 2 Duo is the name given by Intel to its
second batch of dual core processors
❑Processor generations starts after the release of the Core i series
❑IntelRCoreTM i5 – 8250U CPU Product Line Suffixes (U – Mobile Power Efficient)

Brand Brand modifier Generation indicator SKU Numeric Digits


Typical Configuration of Laptop
Classification of Software
❑Two Categories

❑ Application Software
o Used to solve a particular problem
o Editor, financial accounting, weather forecasting etc..

❑ System Software
o Helps in running other programs
o e.g. Compiler, Operating System etc..
Computer Languages
Computer Languages contd..
Computer Languages contd..
Computer Languages contd..
Operating System (OS)
❑ OS acts as an interface between the user of a computer and the computer hardware

❑ It is a program that controls the execution of application programs

❑ OS is concerned with the allocation of resources and services, such as memory, processors,
devices, and information. It is also called as resource manager

❑ Operating system is the one program running at all times on the computer (usually called the
kernel)
❑Examples: Windows (GUI based, PC), GNU/Linux, macOS (Macintosh) - used for Apple’s personal
computers and work stations (MacBook, iMac), Android, iOS
OS as an user interface
Types of Operating Systems
❑ Batch operating system
❖Major task of the OS of early computer were simply to transfer control automatically
from one job to next
❖The OS was always resident in memory
❖To speed up processing, operators batched together jobs with similar needs and ran
them through the computer as a group
❖CPU often remained idle due to huge gap in operational speeds of mechanical I/O
devices and those of electronic devices
❖Improvement in technology and introduction of disks resulted in faster I/O
❖Introduction of disks allowed OS to keep all jobs on a disk, so that it can perform job
scheduling to efficiently use resources
Types of Operating Systems
❑ Multi-programmed Systems

❖All the jobs that enter into the system are kept in a job pool (usually on disks)
❖The OS chooses (Job Scheduling) a subset of the all the jobs kept in the job pool
and brings them to memory for execution
❖Having several jobs in the memory at the same time requires some form of
memory management
❖If several jobs are ready to be run at the same time, the system must choose
among them (CPU scheduling)
❖When a job needs to wait for some task, such as an I/O operation to complete,
another job is selected for execution
Types of Operating Systems
❑ Time-Sharing Systems
❖Time-sharing system allows many users to share the computer simultaneously

❖As the system switches rapidly from one user to another, each user gets an impression that the
entire computer is dedicated to her use

❖As interactive I/O usually runs at “people’s speed”, rather than keeping the CPU sit idle during
an interactive I/O, the OS switches CPU to another user

❖Turnaround time was reduced to minutes or seconds, i.e. Time between submission of job
and the return of its results
❖Example: Unix
Types of Operating Systems
❑ Multiprocessor Systems
❖ Multiprocessor systems (parallel systems or tightly-coupled systems) have more than one processor sharing bus, clock, sometimes
memory and peripherals
Advantages
◦ Increased Throughput
◦ More processors enables more work done in less time
◦ N processors doesn’t necessarily provide speed up of N, due to
◦ Time taken in coordinating different processors
◦ Contention for shared resources
◦ Economy of Scale
◦ Saves money by sharing
◦ Peripherals
◦ Mass storage
◦ Power supply
◦ Increased Reliability
◦ Even if one processor fails
◦ remaining processors picks up the share of work of the failed processor
◦ The system doesn’t halt rather slows down
◦ This phenomena is called graceful degradation and the system is termed fault tolerant
Types of Operating Systems
❑ Network operating system
❖ These systems run on a server and provide the capability to manage data, users, groups, security, applications,
and other networking functions

❖ These types of operating systems allow shared access of files, printers, security, applications, and other
networking functions over a small private network

❖ One more important aspect of Network Operating Systems is that all the users are well aware of the underlying
configuration, of all other users within the network, their individual connections, etc.

❖ These computers are popularly known as tightly coupled systems


The Bootstrap Program

❑ When a computer is powered up or rebooted – it needs to have an initial program to run. This process
is called the boot process

❑Each time computer turns on Power On Self Test (POST) happens

❑The initial program or bootstrap program is stored in ROM (EEPROM)

❑ It initializes all aspects of the computer


– CPU registers
– Device controllers
– Memory contents
❑The bootstrap program must know how to load the OS and start executing them
The Bootstrap Program
❑The POST first checks the BIOS and then tests the CMOS RAM. If there is no problem with this
then POST continues to check the CPU, and other hardware devices

❑The BIOS chip tells it to look in a fixed place, usually on the lowest-numbered hard disk (the boot
disk) for a special program called a boot loader (under Linux the boot loader is called Grub or
LILO)

❑If some errors found then an error message is displayed on the screen or a number of beeps are
heard. These beeps are known as POST beep codes

❑If the POST is successful and no issues are found, the bootstrap loader will load the operating
system for the computer into memory
Multiprogramming vs. Multitasking vs.
multiprocessing
❑In a multi-programmed system, the ultimate goal is to keep the CPU busy as long as there are
processes ready to execute

❑This way, multiple programs can be executed on a single processor by executing a part of a
program at one time, a part of another program after this, then a part of another program and
so on, hence executing multiple programs

❑ Hence, the CPU never remains idle


Multiprogramming vs. Multitasking vs.
multiprocessing
❑The main advantage of multiprocessor system is to get more work done in a shorter period of time
❑With the help of multiprocessing, many processes can be executed simultaneously
❑It also provides increased reliability in the sense that if one processor fails, the work does not halt, it
only slows down
❑A System can be both multi programmed by having multiple programs running at the same time and
multiprocessing by having more than one physical processor
❑Multiprocessing is basically executing multiple processes at the same time on multiple processors,
whereas multi programming is keeping several programs in main memory and executing them
concurrently using a single CPU only
❑Multiprocessing occurs by means of parallel processing whereas Multi programming occurs by
switching from one process to other (phenomenon called as context switching).
Multiprogramming vs. Multitasking vs.
multiprocessing
❑Multi tasking refers to execution of multiple tasks (say processes, programs, threads etc.) at a
time.
❑Multitasking is a logical extension of multi programming
❑Multi programming works solely on the concept of context switching whereas multitasking is
based on time sharing alongside the concept of context switching
❑Here also basically a context switch is occurring but it is occurring so fast that the user is able to
interact with each program separately while it is running
❑This way, the user is given the illusion that multiple processes/ tasks are executing
simultaneously
❑But actually only one process/ task is executing at a particular instant of time

You might also like