0% found this document useful (0 votes)
9 views

Introduction To Computer Part 1

Part 1

Uploaded by

ajabkasi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Introduction To Computer Part 1

Part 1

Uploaded by

ajabkasi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 56

Introduction to computer

Dr. Ajab Khan Kasi


Number System
Number System
Number System

Start binary number with last digit. Therefore the binary equivalent of 217 is
11011001
Number System
Number System
 Conversion of Octal number into Decimal equivalent
 Let octal number be (235)8

Hence (235)8 = (157)10


Number System
Parts of Computer System
A complete computer system consists of three parts
» Hardware
» Software
» Data
Hardware
Hard ware is any part of the computer you can touch. A computer’s
hardware consists of interconnected electronic devices that you can
use to control
the computer’s operation, input, and output.
Software
Software is a set of instructions that makes the computer perform
tasks. In other words, software tells the computer what to do. (The
term program refers to any piece of software.)
Some programs exist primarily for the computer's use to help it
perform tasks and manage its own resources.
Other types of programs exist for the user, enabling him or her to
perform tasks such as creating documents. Thousands of different
software programs arc available for use on personal computers.
Parts of Computer System
Data
Data consist of individual facts or pieces of information
that by themselves may not make much sense to a
person.
A computer’s primary job is to process these
tiny pieces of data in various ways, converting them into
useful information.
For example, if you saw the average highway mileages of
six
different cars, all the different pieces of data might not
mean much to you.
However; if someone created a chart from the data that
visually compared and ranked the vehicles’ mileages, you
could probably make sense of it at a glance. This is one
example of data being processed into useful information.
Essential Computer Hardware
A computer’s hardware devices fall into one of four categories
1. Processor
2. Memory
3. Input and output
4. Storage
Processing Devices
The procedure that transforms raw data into useful information is called process. To
perform this transformation, the computer uses two components: the processor and
memory.
The processor is like the brain of the computer; it organizes and carries out
instructions that come from either the user or the software.
In a personal computer; the processor usually consists of one or more specialized
chips, called microprocessors. To process data or complete an instruction from a user
or a program, the computer passes electricity through the circuits. The microprocessor
is plugged into the computer’s motherboard. The mother board is a rigid rectangular
card containing the circuitry that connects the processor to the other hardware.
Essential Computer Hardware
In most personal computers, many internal components such as video cards,
sound cards, disk controllers, and other devices are housed on their own
smaller circuit boards, which attach to the mother board.

In many newer computers, these devices are built directly into the
motherboard. Some newer microprocessors are large and complex enough to
require their own dedicated circuit boards, which plug into a special slot in the
motherboard. You can think of the motherboard as the master circuit board in
a computer.

A personal computer’s processor is usually a single chip or a set of chips


contained on a circuit board. In some powerful computers, the processor
consists of many chips and the circuit boards on which they are mounted.
People often refer to computer systems by the type of CPU they contain.
A "Pentium 4” system, for example, uses a Pentium 4 microprocessor as its
CPU.
Memory devices
In a computer, memory is one or more sets of chips
that store data and/or program instructions, either
temporarily or permanently.
Memory is a critical processing component in any
computer.
Personal computers use several different types of
memory, but the two most important are called
random access memory (RAM) and read-only
memory (ROM).
These two types of memory work in very
different ways and perform distinct functions.
For your Information

Bit, Byte, Nibble, Word


Bit : Smallest unit (1)
Byte: 8 bits
Nibble: 4 bits
Word: depends on system
It can be 4, or 8 or 16 bits, etc

4/8/2022 13
The Basic Semiconductor Memory Array
Each storage element in a memory can retain either a I or a 0 and is called a cell.

4/8/2022 14
Memory Address and Capacity
The capacity of a memory is the total number of data units that can be stored.

capacity is 64 bytes
capacity is 64 bits. capacity is 8 bytes

4/8/2022 15
Basic Memory Operations

 The write operation puts data into a specified address in the memory, and
the read operation copies data out of a specified address in the memory.
 The addressing operation, which is part of both the write and the read
operations, selects the specified memory address.
 Data units go into the memory during a write operation and come out of
the memory during a read operation on a set of lines called the data bus

4/8/2022 16
2-dimensional memory

4/8/2022 17
3-dimensional memory

4/8/2022 18
Write operation

4/8/2022 19
Read operation

4/8/2022 20
RAMs and ROMs

RAM (random-access memory) is a type of memory in which all addresses


are accessible in an equal amount of time and can be selected in any order
for a read or write operation. All RAMs have both read and write capability.

Because RAMs lose stored data when the power is turned off, they are
volatile memories.

ROM (read-only memory) is a type of memory in which data are stored


permanently or semi permanently. Data can be read from a ROM, but there
is no write operation as in the RAM. The ROM, like the RAM, is a random-
access memory but the term RAM traditionally means a random-access
read/write memory.

Because ROMs retain stored data even if power is turned off, they are
nonvolatile memories.

4/8/2022 21
RAMs
RAMs are read/write memories in which data
can be written into or read from any selected
address in any sequence.

When a data unit is written into a given


address in the RAM, the data previously stored
at that address is replaced by the new data.

When a data is read from a given address in


the RAM, the data unit remains stored and is
not erased by the read operation.
4/8/2022 22
RAM Family

Static RAMs generally use latches as storage


elements and can therefore store data indefinitely
as long as dc power is applied.

Dynamic RAMs use capacitors as storage


elements and cannot retain data very long without
the capacitors being recharged by a process called
refreshing.

4/8/2022 23
RAM Family

4/8/2022 24
Transistor as a Switch

4/8/2022 25
Static RAM Unit cell

4/8/2022 26
Basic Synchronous SRAM with Burst Feature
Activity

4/8/2022 27
Cache Memory
 Cache memory is a relatively small, high-speed memory that stores
the most recently used instructions or data from the larger but
slower main memory.
 Cache memory is basically a cost -effective method of improving
system performance without making all of the memory faster.
 The concept of cache memory is based on the idea that computer
programs tend to get instructions or data from one area of main
memory before moving to another area.
 Basically, the cache controller "guesses" which area of the slow
dynamic memory the CPU will need next and moves it to the
cache memory so that it is ready when needed.
 If the cache controller guesses right, the data are immediately
available to the microprocessor. (hit)
 If the cache controller guesses wrong, the CPU must go to the
main memory and wait much longer for the correct instructions or
data. (miss)

 Fortunately, the cache controller is right most of the time.


4/8/2022 28
Cache Analogy

A home refrigerator can be thought of as a


"cache" for certain food items while the
supermarket is the main memory where all
foods are kept.
Each time you want something to eat or drink,
you can go to the refrigerator (cache) first to
see if the item you want is there.
If it is, you save a lot of time. (hit)
If it is not there, then you have to spend extra
time to get it from the supermarket (main
memory). (miss)
4/8/2022 29
L 1 and L2 Caches

 A first-level cache (Ll cache) is usually integrated into


the processor chip and has a very limited storage
capacity. L I cache is also known as primary cache.
 A second-level cache (L2 cache) is a separate memory
chip or set of chips external to the processor and
usually has a larger storage capacity than an Ll cache.
L2 cache is also known as secondary cache.
 Some systems may have higher-level caches (L3. L4,
etc.), but Ll and L2 are the most common.
 Also, some systems use a disk cache to enhance the
performance of the hard disk because DRAM, although
much slower than SRAM, is much faster than the hard
disk drive.

4/8/2022 30
L 1 and L2 Caches

4/8/2022 31
Dynamic RAM (DRAM) Memory Cells

 Dynamic memory cells store a data bit in a small


capacitor rather than in a latch.
 The advantage of this type of cell is that it is very
simple, thus allowing very large memory arrays
to be constructed on a chip at a lower cost per
bit.
 The disadvantage is that the storage capacitor
cannot hold its charge over an extended period
of time and will lose the stored data bit unless its
charge is refreshed periodically.

 To refresh requires additional memory circuitry


and complicates the operation of the DRAM.
4/8/2022 32
DRAM unit Cells

4/8/2022 33
DRAM unit Cells

4/8/2022 34
ROM
A ROM contains permanently or semi
permanently stored data, which can be read from
the memory but either cannot be changed at all
or cannot be changed without specialized
equipment.
 A ROM stores data that are used repeatedly in
system
 application&, such as tables. conversions, or
programmed instructions for system initialization
and operation.
 ROMs retain stored data when the power is off
and are therefore nonvolatile memories.
4/8/2022 35
ROM Family

 The mask ROM is the type in which the data are permanently stored in the
memory during the manufacturing process.
 The PROM, or programmable ROM, is the type in which the data are electrically
stored by the user with the aid of specialized equipment.
 Both the mask ROM and the PROM can be of either MOS or bipolar technology.
 The EPROM, or erasable PROM. is strictly a MOS device.
 The UV EPROM is electrically programmable by the user, but the stored data must
be erased by exposure to ultraviolet light over a period of several minutes.
 The electrically erasable PROM (EEPROM or E 2 PROM) can be erased in a few
milliseconds.

4/8/2022 36
Storage Hard Disc/Disk
A hard disk is also known as a hard drive
or fixed disk. It is said to be rigid
magnetic disc that stores data. It is
located within a drive unit. Hard disk is a
non-volatile storage device that contains
platters (magnetic disks) rotating at high
speeds. Non-volatile means the data
retains when the computer shuts down.

Its main components include a read/write


actuator arm, head actuator, read/write
head, spindle, and platter. A circuit board
(also called as the interface board or disk
controller) is present on the back of a
hard drive. It lets the hard drive to
communicate with the computer.
Hard Disc/Disk
 Function of Hard disk

The hard disk is a secondary storage device, which is designed to


store data permanently. The secondary storage devices include a large
storage capacity as compared to the primary storage devices. The
data stored in a hard disk is retained when our computer system
shuts down. The data stored in the hard disk can be of many types
such as the operating system, installed software, documents, and
other files of computer.

Hard disk was introduced in the year 1956 by IBM. The first personal
computer contains a hard drive of less than 1 megabyte, while
modern computers contain a hard drive of 1 terabyte.

The size of hard drives is measured in gigabytes and terabytes.


Usually, 500GB hard disks are common in modern computers. As an
instance, a song of length four-minute is approx. 4MB in size, and in 1
gigabyte, there are 1,000 megabytes, it means that a 500GB hard
drive can store approx. 250,000 songs.
Hard Disc/Disk
Advantages of the hard disk
One of the significant advantages of a Hard Disk drive is that its cost
is low.
Another advantage of a Hard Disk is that it is readily available in the
market.
Hard Disk is faster than optical disks.
The capacity for storing the data in HDDs is large.

Disadvantages of the hard disk


The speed of reading and writing in HDD is slower than the RAM.
HDDs are noisy.
HDDs consume more power.

The hard disks are robust and can be used for a long time. But hard
disks can be crashed, and the main reason is head crash. If the hard
drive is crashed, we may lose all our documents, photos, etc., stored
in it.
Hard Disc/Disk
A hard drive has only a few basic parts. There are one or more shiny
silver platters where information is stored magnetically, there's an
arm mechanism that moves a tiny electro magnet called a read-write
head back and forth over the platters to record or store information,
and there's an electronic circuit to control everything and act as a
link between the hard drive and the rest of your computer.

The platters are the most important parts of a hard drive. As the
name suggests, they are disks made from a hard material such as glass,
ceramic, or aluminum, which is coated with a thin layer of metal that
can be magnetized or demagnetized. A small hard drive typically has
only one platter, but each side of it has a magnetic coating. Bigger
drives have a series of platters stacked on a central spindle, with a
small gap in between them. The platters rotate at up to 10,000
revolutions per minute (rpm) so the read-write heads can access any
part of them.

There are two read-write heads for each platter, one to read the top
surface and one to read the bottom, so a hard drive that has five
platters (say) would need ten separate read-write heads. The read-
write heads are mounted on an electrically controlled arm that
moves from the center of the drive to the outer edge and back again.
To reduce wear and tear, they don't actually touch the platter: there's
a layer of fluid or air between the head and the platter surface.
Hard Disc/Disk
1. Actuator that moves the read-write arm. In older
hard drives, the actuators were stepper motors. In
most modern hard drives, voice coils are used
instead. As their name suggests, these are simple
electromagnets, working rather like the moving
coils that make sounds in loudspeakers. They
position the read-write arm more quickly,
precisely, and reliably than stepper motors and
are less sensitive to problems such as
temperature variations.
2. Read-write arm swings read-write head back and
forth across platter.
3. Central spindle allows platter to rotate at high
speed.
4. Magnetic platter stores information in binary form.
5. Plug connections link hard drive to circuit board in
personal computer.
6. Read-write head is a tiny magnet on the end of
the read-write arm.
7. Circuit board on underside controls the flow of
data to and from the platter.
8. Flexible connector carries data from circuit board
to read-write head and platter.
9. Small spindle allows read-write arm to swing
across platter.
Hard Disc/Disk
Reading and Writing Data
The data is stored in a very orderly pattern on each platter. Bits of
data are arranged in concentric, circular paths called tracks.
Each track is broken up into smaller areas called sectors.
Part of the hard drive stores a map of sectors that have already been
used up and others that are still free. (In Windows, this map is called
the File Allocation Table or FAT.)
When the computer wants to store new information, it takes a look
at the map to find some free sectors. Then it instructs the read-write
head to move across the platter to exactly the right location and
store the data there.
To read information, the same process runs in reverse.
There is an interface (a connecting piece of equipment) called a
controller. This is a small circuit that operates the actuators, selects
specific tracks for reading and writing, and converts parallel streams
of data going from the computer into serial streams of data being
written to the disk (and vice versa). Controllers are either built into
the disk drive's own circuit board or part of the computer's main
board (motherboard).
Hard Disc/Disk
Disadvantages of Hard Disk
With so much information stored in such a tiny amount of
space, a hard drive is a remarkable piece of engineering.
That brings benefits (such as being able to store 500 CDs on
your HDD)—but drawbacks too.
One of them is that hard drives can go wrong if they get dirt
or dust inside them.
A tiny piece of dust can make the read-write head bounce up
and down, crashing into the platter and damaging its
magnetic material. This is known as a disk crash (or head
crash) and cause the loss of all the information on a hard
drive.
A disk crash usually occurs without any warning.
That's why you should always keep backup copies of your
important documents and files, either on another hard drive,
on a compact disc (CD) or DVD, or on a flash memory stick.
Flash memory
Flash works using an entirely different kind of transistor that stays switched on
(or switched off) even when the power is turned off.
A normal transistor has three connections (wires that control it) called the
source, drain, and gate. Think of a transistor as a pipe through which electricity
can flow as though it's water. One end of the pipe (where the water flows in) is
called the source—think of that as a tap . The other end of the pipe is called the
drain—where the water drains out and flows away.
In between the source and drain, blocking the pipe, there's a gate. When the gate
is closed, the pipe is shut off, no electricity can flow and the transistor is off.
In this state, the transistor stores a zero. When the gate is opened, electricity
flows, the transistor is on, and it stores a one.
But when the power is turned off, the transistor switches off too. When you
switch the power back on, the transistor is still off, and since you can't know
whether it was on or off before the power was removed, you can see why we
say it "forgets" any information it stores.
A flash transistor is different because it has a second gate above the first one.
When the gate opens, some charge leaks up the first gate and stays there, in
between the first gate and the second one, recording a number one. Even if the
power is turned off, the charge is still there between the two gates.
That's how the transistor stores its information whether the power is on or off.
The information can be erased by making the "trapped charge" drain back down
again.
Flash memory
That's a very glossed over, highly simplified explanation of
something that's extremely complex. If you want more detail, it
helps if you read our article about transistors first, especially the
bit at the bottom about MOSFETs—and then read on.

The transistors in flash memory are like MOSFETs only they have
two gates on top instead of one. This is what a flash transistor
looks like inside.You can see it's an n-p-n sandwich with two
gates on top, one called a control gate and one called a floating
gate. The two gates are separated by oxide layers through which
current cannot normally pass:
In this state, the transistor is switched off—and effectively storing
a zero. How do we switch it on? Both the source and the drain
regions are rich in electrons (because they're made of n-type
silicon), but electrons cannot flow from source to drain because
of the electron deficient, p-type material between them. But if we
apply a positive voltage to the transistor's two contacts, called the
bitline and the wordline, electrons get pulled in a rush from
source to drain. A few also manage to wriggle through the oxide
layer by a process called tunneling and get stuck on the floating
gate.
The presence of electrons on the floating gate is how a flash
transistor stores a one. The electrons will stay there indefinitely,
even when the positive voltages are removed and whether there
is power supplied to the circuit or not. The electrons can be
flushed out by putting a negative voltage on the wordline—which
repels the electrons back the way they came, clearing the floating
gate and making the transistor store a zero again.
SSD
All problems of hard disk such as —weight, power consumption, access
times, and reliability—can be solved by using solid-state drives (SSDs),
which typically use flash memory chips instead of spinning magnetic
platters.
Computer makers have been moving away from hard drives, and toward
SSDs, for at least the last decade, largely driven by the trend away from
desktop computers and toward mobile devices. Apple iPods are a good
example of how times have changed.The original "Classic" iPods,
launched in 2001, are little more than hard drives, sound cards, and
batteries (you can see what an iPod hard drive looks like in the photos
above); the hard drive, in particular, was an obvious excuse for failure if
you took them jogging or tossed them around in your bag. With the iPod
Touch, which launched in 2007, Apple switched decisively to SSD
technology, making music players thinner and lighter in your pocket, less
prone to mechanical failure, and giving far better battery life.You're more
likely to wear out the buttons or crack the screen on a modern iPod or
iPhone than do any damage to the memory chips inside.

No contest? SSDs win hands down? Not so fast! If you're looking to buy
as much storage as you can for as little cash, and you're less fussy about
things like power consumption and speed, traditional hard drives are still
the best value for money. As of 2020, SSDs are still quite a bit more
expensive per gigabyte than traditional hard drives, though there are big
variations in price among the different types of SSDs and the difference
between SSDs and hard drives is closing year by year. Don't expect old-
style hard drives to disappear until that price difference closes
substantially
MICROPROCESSORS

 The microprocessor is a digital integrated circuit that can be programmed


with a series of instructions to perform various operations on data
 A microprocessor is the CPU of a computer.
 It can do arithmetic and logic operations, move data from one place to
another, and make decisions based on certain instructions.
 Alll microprocessprs have four basic units
 arithmetic logic unit (ALU),
 instruction decoder,
 register array,
 the control unit

4/8/2022 47
 Arithmetic Logic Unit:
The ALU is the key processing element of the microprocessor. It is directed by the control
unit to perform arithmetic operations (addition, subtraction. multiplication, and division)
and logic operations (NOT, AND, OR, and exclusive-OR), as well as many other types of
operations. Data for the ALU are obtained from the register array.
 Instruction Decoder:
The instruction decoder takes each binary instruction in the order in which it appears in
memory and decodes it.
 Register Array:
The register array is a collection of registers that are contained within the microprocessor.
During the execution of a program, data and memory addresses are temporarily stored in
registers that make up this array.
Some registers are classed as general-purpose, they can be used for any purpose dictated
by the program.
Other registers have specific capabilities and functions and cannot be used as general-
purpose registers.
 Control Unit :
The control unit is "in charge" of the processing of instructions once they
are decoded. It provides the timing and control signals for getting data into and out of the
microprocessor and for synchronizing the execution of instructions.

4/8/2022 48
Flow chart
A flowchart is simply a graphical representation of steps. It
shows steps in sequential order and is widely used in presenting
the flow of algorithms, workflow or processes. Typically, a
flowchart shows the steps as boxes of various kinds, and their
order by connecting them with arrows.
What is a Flowchart?
 A flowchart is a graphical representations of steps. It was
originated from computer science as a tool for representing
algorithms and programming logic but had extended to use in
all other kinds of processes. Nowadays, flowcharts play an
extremely important role in displaying information and
assisting reasoning. They help us visualize complex processes,
or make explicit the structure of problems and tasks. A
flowchart can also be used to define a process or project to
be implemented.
Flow Chart
 Flowchart Symbols
 Different flowchart shapes have different conventional meanings. The meanings of
some of the more common shapes are as follows:
 Terminator

 The terminator symbol represents the starting or ending point of the system.
 Process

 A box indicates some particular operation.


 Document

 This represents a printout, such as a document or a report.


 Decision

 A diamond represents a decision or branching point. Lines coming out from the
diamond indicates different possible situations, leading to different sub-processes.
Flow Chart
 Data

 It represents information entering or leaving the system. An input might be an


order from a customer. Output can be a product to be delivered.
 On-Page Reference

 This symbol would contain a letter inside. It indicates that the flow continues on a
matching symbol containing the same letter somewhere else on the same page.
 Off-Page Reference

 This symbol would contain a letter inside. It indicates that the flow continues on a
matching symbol containing the same letter somewhere else on a different page.
 Delay or Bottleneck

 Identifies a delay or a bottleneck.


 Flow
 Lines represent the flow of the sequence and direction of a process.
Flow Chart
 When to Draw Flowchart?
 Flowchart has a variety of benefits:
 It helps to clarify complex processes.
 It identifies steps that do not add value to the internal
or external customer, including delays; needless storage
and transportation; unnecessary work, duplication, and
added expense; breakdowns in communication.
 It helps team members gain a shared understanding of
the process and use this knowledge to collect data,
identify problems, focus discussions, and identify
resources.
 It serves as a basis for designing new processes.
Flow Chart
 Flowchart Example – Simple
Algorithms
 A flowchart can also be used in visualizing
algorithms, regardless of its complexity. Here
is an example that shows how flowchart can
be used in showing a simple summation
process.
Flow Chart
 Flowchart
Example –
Medical Service
 This is a hospital
flowchart example
that shows how
clinical cases shall
be processed. This
flowchart uses
decision shapes
intensively in
representing
alternative flows.
Algorithm
 An algorithm is a step by step method of solving a problem. It is commonly used
for data processing, calculation and other related computer and mathematical
operations. An algorithm is also used to manipulate data in various ways, such as
inserting a new data item, searching for a particular item or sorting an item.

The word algorithm itself is derived from the


9th-century Persian mathematician
Muḥammad ibn Mūsā al-Khwārizmī, Latinized
Algoritmi.
High and low level languages
Difference between High Level and Low level HIGH LEVEL LOW LEVEL
languages S.NO
LANGUAGE LANGUAGE
It is
It is a machine
Both High level language and low level 1.
programmer
friendly
language are the programming languages’s types. friendly
language.
language.
It is easy to It is tough to
The main difference between high level 3
understand. understand.
language and low level language is that,
It is complex
It is simple to
4. to debug
Programmers can easily understand or interpret or debug.
comparatively.
compile the high level language in comparison of It is complex
It is simple to
machine. 5.
maintain.
to maintain
On the other hand, Machine can easily understand comparatively.
the low level language in comparison of human 6.
It can run on It is machine-
beings. any platform. dependent.
It needs
compiler or It needs
Examples of high level languages 7. interpreter assembler for
are C, C++, Java, Python, etc for translation.
translation.

You might also like