Sei sulla pagina 1di 41

Data Presentation

Engr. Hammad Shahab

DATA PRESENTATION
& DIGITAL ELECTRONICS

Engr.Hammad Shahab

DATA PRENENTATION

People use computer to work


with many kind of data including
numbers,
texts
music
photos
videos.
Engr.Hammad Shahab

HOW DOES A COMPUTER REPRESENT DATA


DIGITALLY
Most computers are digital devices.
A digital device works with binary no. 1 and
zero,
As a lighted bulb has two discrete states
ZERO and ONE which mean ON and OFF so
it is a digital device
an analog device works with the continuous
data,
Engr.Hammad Shahab

How does a computer represent numbers

COMPUTER REPRESENT DATA DIGITALLY IN


BINARY NO. SYSTEM.
The binary numeral system or
base-2 number system
represents numeric
values using two symbols, usually 0 and 1

Engr.Hammad Shahab

Decimal to binary no. system.

Engr.Hammad Shahab

Types of codes which are used

Text codes
Code which represent the letters of
alphabet punctuation marks and
other symbols
Most popular code system is
ASSCII etc.

Engr.Hammad Shahab

This fig illustrate


how a computer
can use 0 s and 1 s
to represent
the letters and
symbols in the text
HI!

How Does a computer convert music and


picture into codes.
Music and picture are not small and
discrete one.
To work with these the must be digitize.
The term digitalize mean to convert the
raw ,analog data into digital format
represented by 0 and 1
A photograph or drawing can be
digitalized by treating it as as a series of
color code and each code is assigned a
binary no .
Engr.Hammad Shahab

Storage type
Inside the system unit~~~~
Hard drive
CD\DVD drive
Storage Types~~~~~~~~~~~
Magnetic Storage
Floppy and Hard Drive
use magnet to access data
Optical Storage
CD and DVD drives
use laser beam to access data
Engr.Hammad Shahab

Storage type

Magnetic Storage
Disk drives, Hard Disk Drives, high capacity floppy disk drives
and tape drives and magnetic tape are coated with a
magnetically sensitive material
This special coating enables them to store data
Optical Storage
Optical storage devices use lasers to read data and write data
to the reflective surface of an optical disk.
CD-ROM drive is type of optical storage
Engr.Hammad Shahab

10

How does magnetic storage works.


Magnetic storage
store data by magnetizing the
microscopic particles on the disk
or tape surface.
read / write head mechanisms in
the disk drive read and write the
magnetized particle that represent
data .
Fig. will explain how a computer
store on magnetic media.

Engr.Hammad Shahab

11

How does optical storage works


CD and DVD drives are Optical
Storage . It is possible to see the data
using the high power microscope.
Data store in form of pits and land
which show 0 and 1 respectively that
represent the data .
A low power Laser is used to read the
data.
The surface of an optical disk is coated
with clear plastic, making the disk
durable.

Engr.Hammad Shahab

12

Inside the system unit


The main box of the computer that houses the CPU, motherboard
memory and other devices
Inside the system unit components are
Motherboard
CPU
Power supply
CD\DVD drive
Floppy drive
Expansion cards
Expansion slots
Memory
Fan
Hard drive
Engr.Hammad Shahab

13

The mother board


The main circuit board inside the system unit is called the mother
board or system board
A circuit board is a thin board containing chips
Very small pieces of silicon or other semi-conducting material
Integrated circuits or other electronic components are connected
to it
External devices (monitors and printers )connect to the mother
board by plugging into a special connector called a port exposed
through a exterior of the system unit case
The port is either connected directly to the mother board or is
connected through an expansion card plugged in to an expansion
slots on the mother board

Engr.Hammad Shahab

14

CPU
The central processing unit ,Also referred as processor
A CPU for a microcomputer is referred to as a microprocessor
It consists of variety of components packaged together and
plugged directly into the mother board
Most PCs use CPUs manufactured by Intel or Advanced Micro
Devices (AMD)
Desktop PCs include Intel Pentium 4 and the AMD Athlon XP
Home PCs use a Celeron CPU
CPUs were developed through a cooperative effort by Apple,
Motorola, and IBM

Engr.Hammad Shahab

15

Word size
Amount of data measured in bits or bytes that a cpu can
manipulate at one time
The size of registers is called word size
Different CPUs may have different word sizes
A larger word size allows faster processing in a computer system
Newer CPUs are designed for 64-bit (words) it means data moves
around within the CPU and from the CPU to memory in 64-bit (8
byte)

Engr.Hammad Shahab

16

Bus width and speed


A bus is an electronic path within a computer over which data
can travel

Bus width
The no of wires in the bus over which data can travel
The wider the bus has the more data can be transferred at one
time

Engr.Hammad Shahab

17

Cache Memory
Cache (pronounced cash) memory is extremely fast memory
that is built into a computers central processing unit (CPU), or
located next to it on a separate chip.
The CPU uses cache memory to store instructions that are
repeatedly required to run programs, improving overall system
speed

Engr.Hammad Shahab

18

Advantage
The advantage of cache memory is that the CPU does not have to
use the motherboards system bus for data transfer. Whenever data
must be passed through the system bus, the data transfer speed
slows to the motherboards capability.
The CPU can process data much faster by avoiding the
bottleneck created by the system bus.

Engr.Hammad Shahab

19

Cache memory is random access memory (RAM) that a computer


Microprocessor can access more quickly than it can access
regular RAM.
As the microprocessor processes data, it looks first in the cache
memory and if it finds the data there (from a previous reading of
data), it does not have to do the more time-consuming reading of
data from larger memory

Engr.Hammad Shahab

20

Cache memory is sometimes described in levels of closeness and


accessibility to the microprocessor
Cache built into the CPU itself is referred to as Level 1 (L1)
cache. CPUs have 256 KB L1 cache
An L1 cache is on the same chip as the microprocessor Cache
that resides on a separate chip next to the CPU is called Level 2
(L2) cache
Most CPUs have 2MB of L2 cache
L2 is usually a separate static RAM (SRAM) chip. The main
RAM is usually a dynamic RAM (DRAM) chip.
Some CPUs have both L1 and L2 cache built-in and
designate the separate cache chip as Level 3 (L3) cache.

Engr.Hammad Shahab

21

In addition to cache memory, RAM itself as a cache of memory


for hard disk storage since all of RAM's contents come from
the hard disk initially when computer is turned on, the
operating system is loaded into RAM and new applications can
be started and data can be accessed
RAM can also contain a special area called a disk cache that
contains the data most recently read in from the hard disk

Engr.Hammad Shahab

22

Cache that is built into the CPU is faster than separate cache,
running at the speed of the microprocessor itself.
separate cache is still roughly twice as fast as Random Access
Memory (RAM).
Cache is more expensive than RAM, but it is well worth getting a
CPU and motherboard with built-in cache in order to maximize
system performance.

Engr.Hammad Shahab

23

Memory
Referred to the chip based storage
Memory is one or more sets of chips that store data,
program or instructions either temporarily or permanent

Difference between memory and storage


Memory is chip based storage
RAM chips located inside the computer
storage is disk based storage
computer hard drive, or removable storage media such as floppy
disk, CDs

Engr.Hammad Shahab

24

Memory refers computers main memory


that is RAM random access memory
Other types are
Cache memory and registers
ROM and flash memory

Engr.Hammad Shahab

25

Central processing unit (CPU)


Brain of computer
Organizes data
The architecture and components vary
from microprocessor to microprocessor

Engr.Hammad Shahab

26

Block diagram

Engr.Hammad Shahab

27

Components of CPU
The ALU (arithmetic logic unit )
The control unit
Registers

Engr.Hammad Shahab

28

Arithmetic logic unit


Performs arithmetic and logical operations
Arithmetic operations includes addition,
subtractions, multiplications and divisions
Logical operations includes comparisons
operations such as equal to not equal to
,greater than or not grater than etc
Engr.Hammad Shahab

29

Arithmetic operations
Add +
Subtract Multiply *
Divide /
Raised by a power ^

Engr.Hammad Shahab

30

Logical operations
Equal to, not equal to
Greater than ,not greater than
Less than ,not less than
Greater than or equal to ,not greater than or
equal to
Less than or equal to ,not less than or not equal
to

Engr.Hammad Shahab

31

Control unit
Coordinates and controls the computers
operations such as retrieving instructions and
passing them to the ALU for execution
tells the ALU what to do and making sure
every thing happens at the right time

Engr.Hammad Shahab

32

Registers
Group of high speed memory located within the CPU
into which data is transferred just before processing
ALU uses register to temporary store data
intermediary calculation and final result of processing
CPU uses different registers for different purposes
Instruction register IR
Accumulator register

Engr.Hammad Shahab

33

Prefetch unit
Requests instruction and data from cache or
RAM
Retrieve the necessary instructions and data
before the time
Helps to avoid delays in processing

Engr.Hammad Shahab

34

Decode unit
Take instruction from the Prefetch unit and translates
them into a form that control unit understand them
Internal cache
L1 and L2 cache is used to store frequently used
instructions and data
If necessary items are not in internal cache than they
must be retrieved from external cache or RAM

Engr.Hammad Shahab

35

Bus Interface unit


Place where instruction and data flows in
and out of the CPU
It connects the CPU

Engr.Hammad Shahab

36

Machine Cycles
Each time the CPU executes the instruction it takes
many steps
complete series of steps is called a machine cycle
Instruction set
Collection of basic machine language commands that
the CPU can understand
each instruction set is broken down in to many
smaller machine level instructions called microcode

Engr.Hammad Shahab

37

Machine cycle is broken down into two small cycles


instruction cycle
execution cycle
Instruction cycle completes in to two steps
1- fetching
2- decoding
Execution cycle completes in to two steps
1-Executing
2-Storing

Engr.Hammad Shahab

38

Fetch unit
The fetch unit is in charge of loading
instructions from memory.
First, it will look if the instruction required by
the CPU is in the L1 instruction cache. If it is
not, it goes to the L2 memory cache. If the
instruction is also not there, then it has to
directly load from the slow system RAM
memory

Engr.Hammad Shahab

39

Decode unit
After the fetch unit instruction required by the CPU to
be processed, it sends it to the decode unit.
The decode unit will then figure out what that
particular instruction does. It breaks down the
instruction into small parts called microcode.
After the decode unit translated the instruction and
grabbed all required data to execute the instruction, it
will pass all data and the step-by-step cookbook on
how to execute that instruction to the execute unit.

Engr.Hammad Shahab

40

The execute unit will finally execute the instruction.


On modern CPUs you will find more than one
execution unit working in parallel. This is done in
order to increase the processor performance.

Engr.Hammad Shahab

41

Potrebbero piacerti anche