Sei sulla pagina 1di 50

Computer Systems

188 110 Computer Programming : Chapter 1.2 – Computer Systems 1


Computer Systems

Software

Data

Hardware People

188 110 Computer Programming : Chapter 1.2 – Computer Systems 2


(cont'd.)
 Hardware ~ Computer
 Physical parts of a computer, including digital
electronic circuitry.
 Devices for input, processing, and output.
 Interestingly, microcomputer is only 0.2% of all
computer produced.
 Most of them are embedded systems.
 Software ~ Program
 Introduced by John W. Tukey in 1958.
 A program that enables a computer to perform a
specific task, as opposed to the hardware.
 Consist of a list of instructions that explicitly
implement an algorithm.
188 110 Computer Programming : Chapter 1.2 – Computer Systems 3
(cont'd.)
 Data, which the system convert into information
 Data are everything what is/can be processed.
 Consist of propositions that reflect reality.
 Such propositions may comprise numbers, words,

images etc.
 Information describes a physical or abstract domain.
 Stored in binary format.
 People ~ Users
 Computer users

188 110 Computer Programming : Chapter 1.2 – Computer Systems 4


Hardware Components
 Processors
 Memory
 Storage devices
 Input/Output devices

188 110 Computer Programming : Chapter 1.2 – Computer Systems 5


(cont'd.)

188 110 Computer Programming : Chapter 1.2 – Computer Systems 6


The Processors
 The procedure that transforms raw data into
useful information is called processing. To
perform this transformation, the computer uses
two components: the processor and memory.
 The processor, in a personal computer, usually
consists of one or more microprocessors,
which are the electronic devices. The
microprocessor is plugged into a circuit board,
motherboard, containing the circuitry that
connects the processor to other hardware.

188 110 Computer Programming : Chapter 1.2 – Computer Systems 7


(cont'd.)

Expansion
Card CPU

Memory

Motherboard

188 110 Computer Programming : Chapter 1.2 – Computer Systems 8


Central Processing Unit
 The term central processing unit (CPU) refers to
a computer’s processing hardware, whether it
consists of a single chip or several circuit boards.

188 110 Computer Programming : Chapter 1.2 – Computer Systems 9


(cont'd.)
 The CPU is the brain of the computer, where
data is manipulated.
 In a microcomputer, the entire CPU is contained
on a tiny chip called microprocessor.
 The chip has at least two basic parts:
 The control unit
 The arithmetic and logic unit

188 110 Computer Programming : Chapter 1.2 – Computer Systems 10


(cont'd.)
Intel® Pentium® CPU Die
Fetch

Code Cache Decode

Bus Interface Control

Data Cache
FPU

ALU

188 110 Computer Programming : Chapter 1.2 – Computer Systems 11


The Control Unit
 All the computer resources are managed from the
control unit.
 The CPU’s instructions for carry out commands are built
into the control unit.
 The instructions, or instruction set, list all the
operations that the CPU can perform.
 Each instruction in the instruction set is expressed in
microcode - a series of basic directions that tell the
CPU how to execute more complex operations.
 Different CPUs have different instruction sets.
 Basic instruction such as moving data from input to
memory, moving data from memory to output.

188 110 Computer Programming : Chapter 1.2 – Computer Systems 12


The Arithmetic and Logic Unit (ALU)
 Because all computer data is stored as numbers, much
of the processing that takes place involves comparing
numbers or carrying out mathematical operations.
 The computer can perform only two types of operations:
 Arithmetic operations
 Logical operations
 When the control unit encounters an instruction that
involves arithmetic or logic, it passes that instruction to
the ALU.
 The ALU includes a group of registers that are used to
hold the data currently being processed.
 Register = high-speed memory built directly inside the
CPU.

188 110 Computer Programming : Chapter 1.2 – Computer Systems 13


Operations Performed by the ALU
 Arithmetic Operations  Logical Operations
+ add =, ≠ equal, not equal
- subtract > greater than
× multiply ≥ greater than or equal
/ divide < less than
^ raise by a power ≤ less than or equal
~ not

188 110 Computer Programming : Chapter 1.2 – Computer Systems 14


Registers
 The size of the registers, called word size,
indicates the amount of data which the computer
can work at any given time.
 The bigger the word size, the more quickly the
computer can process a set of data.
 When we refer to 32-bit processors, or 64-bit
processors, or even 64-bit computers, we usually
refer to the size of register inside the processor
chip.

188 110 Computer Programming : Chapter 1.2 – Computer Systems 15


CPUs used in Microcomputers
 Intel
CPU Register Data Bus Max. Memory
8086 16 bits 16 bits 1 MB
8088 16 bits 8 bits 1 MB
i386 32 bits 32 bits 4 GB
Pentium 32 bits 64 bits 4 GB
Pentium 4 32 bits 64 bits 4 GB
Core 2 64 bits 64 bits 1 TB
Itanium 9000 64 bits 64 bits 1 PB

188 110 Computer Programming : Chapter 1.2 – Computer Systems 16


(cont'd.)
 Advanced Micro Device (AMD)
 Head-to-head since Pentium®
 Sempron ~ Intel Celeron
 Athlon 64 ~ Intel Core
 Opteron ~ Intel Xeon
 VIA Technologies
 Small, cheap, low power consumption
 C3
 C7

188 110 Computer Programming : Chapter 1.2 – Computer Systems 17


(cont'd.)
MIPS R4400

PowerPC 970

UltraSPARC T1

Cell

188 110 Computer Programming : Chapter 1.2 – Computer Systems 18


Floating Point Units
 The ALU in CPU is designed to manipulate
whole numbers that are not too large or too
small. If it is forced to work with decimals, it can
really get bogged down.
 A math coprocessor is a special chip designed
to handle complicated mathematical operations.
 New CPUs have math coprocessor built in.
 The math coprocessor uses floating-point
arithmetic techniques that translates numbers
into the scientific notation, e.g.,
 0.0000586 → 5.86 x 10-5
 128610000000 → 1.2861 x 1011
188 110 Computer Programming : Chapter 1.2 – Computer Systems 19
Parallel Processing
 A computer with more than one processor
produces faster data processing.
 The dual-processor and quad-processor versions
of PCs are available today.
 Also, multi-core processors.
 Microsoft Window, Linux, Mac OS, and various
UNIX operating system can make use of
additional processors.
 In parallel processing, multiple processors are
used in a single system, enabling them to share
processing tasks.

188 110 Computer Programming : Chapter 1.2 – Computer Systems 20


(cont'd.)
 In a massively parallel processor (MPP) system,
many processors are used.
 Some MPP systems utilize
thousands of processors
simultaneously.

IBM Blue Gene/L

188 110 Computer Programming : Chapter 1.2 – Computer Systems 21


Memory
 Memory is the computer’s electronic scratch pad.
Program are loaded into and run from memory.
Data used by program is also loaded into
memory for fast access -- but only temporarily.
 Most common type of memory is called Random
Access Memory (RAM).
 The most common measurement unit for
describing a computer’s memory is the byte.
 Kilobytes (kB) = 1,024 bytes
 Megabytes (MB) = 1,024 x 1,024 bytes
 Gigabytes (GB) = 1,024 x 1,024 x 1,024 bytes

188 110 Computer Programming : Chapter 1.2 – Computer Systems 22


(cont'd.)
 The CPU has no capability to store large sets of
data or entire programs permanently. The CPU
has only small space of register.
 The CPU needs million of bytes of space where it
can hold programs and the data being
manipulated while they are being used. This area
is called memory.
 Memory is an electronic chip. The memory may
be soldered on a mainboard or on a small circuit
board attached to a mainboard.
 There are two types of built-in memory: Volatile
and Non-Volatile.
188 110 Computer Programming : Chapter 1.2 – Computer Systems 23
ROM
 ROM is non-volatile memory chips. Putting data
into this kinds of memory is called “burning-in the
data”, and need special tools.
 The data in these chips can only be read and
used -- it cannot be changed -- so the memory
is called Read-Only Memory (ROM).

188 110 Computer Programming : Chapter 1.2 – Computer Systems 24


RAM
 Memory which is its data can be changed is
called random access memory(RAM).
 When talking about computer memory, we usually
mean the volatile RAM.
 Physically, RAM consists of some chips on a
small circuit board.

188 110 Computer Programming : Chapter 1.2 – Computer Systems 25


(cont'd.)

RAM

188 110 Computer Programming : Chapter 1.2 – Computer Systems 26


Current RAM Technologies
 Synchronous Dynamic RAM (SDRAM)
 Synchronize memory bus clock with front side bus
(FSB) clock.
 Double Data-Rate Synchronous DRAM (DDR
SDRAM or just DDR)
 Operate both rising and falling edge of the clock.
 DDR2 doubles FSB clock.
 DDR3 quadruples FSB clock.

188 110 Computer Programming : Chapter 1.2 – Computer Systems 27


(cont'd.)
 Memory chips usually grouped together on small
circuit boards called
 Single In-Line Memory Modules (SIMMs)
 Dual In-Line Memory Modules (DIMMs)
 Small Outline DIMMs (SO-DIMMs)

188 110 Computer Programming : Chapter 1.2 – Computer Systems 28


The Bus
 The term bus refers to the electrical paths
between the components of a computer.
Actually, the bus is a group of parallel wires.
 The motherboard includes an address bus and a
data bus.
 The address bus leads from the CPU to memory
(RAM and ROM).
 The data bus connects the CPU to memory as well
as all the storage, input/output, and communication
devices.

188 110 Computer Programming : Chapter 1.2 – Computer Systems 29


(cont'd.)

188 110 Computer Programming : Chapter 1.2 – Computer Systems 30


Accessing Data in the Memory
 The CPU stored and retrieves each piece of data
using a memory address.
 Memory address is a number indicates a
location of data on the memory chips.
 Memory addresses start at zero and go up to one
less than the number of bytes of memory in the
computer.

188 110 Computer Programming : Chapter 1.2 – Computer Systems 31


(cont'd.)
 Requests for data are sent from the CPU to RAM along the
address bus. The request consists of a memory address.
The data comes back to the CPU via the data bus.

188 110 Computer Programming : Chapter 1.2 – Computer Systems 32


Cache Memory
 Cache memory is
similar to RAM,
except that it is
extremely fast
compared to normal
memory.
 The cache speeds
up processing by
storing frequently
used data or
instruction in its high-
speed memory.
188 110 Computer Programming : Chapter 1.2 – Computer Systems 33
Extending the Processor's Power to
Other Devices
 Ports
 Printer (parallel) ports
 Communication (serial) ports
 USB ports
 Expansion Slots and Boards
 Display cards
 Sound cards
 Network interface cards

188 110 Computer Programming : Chapter 1.2 – Computer Systems 34


Ports
 External devices - such as those used for input
and output - are connected to the system by
ports on the back of the computer.
 PCs feature a number of built-in ports, which are
ready to accept devices such as a printer,
mouse, keyboard, phone line, microphone,
speakers, and others.
 Most computers come with a serial port and a
parallel port.

188 110 Computer Programming : Chapter 1.2 – Computer Systems 35


(cont'd.)

RJ45 socket

Parallel port

PS/2 mouse

PS/2 keyboard

Serial port

USB port Audio jack

188 110 Computer Programming : Chapter 1.2 – Computer Systems 36


(cont'd.)

VGA D-SUB

DVI

HDMI
Firewire port

eSATA

188 110 Computer Programming : Chapter 1.2 – Computer Systems 37


Serial Ports
 Transmits one bit of data at a time

188 110 Computer Programming : Chapter 1.2 – Computer Systems 38


Parallel Ports
 Transmit one byte of data at a time

188 110 Computer Programming : Chapter 1.2 – Computer Systems 39


Universal Serial Bus (USB)

USB port

Parallel port  USB is a serial bus


standard to interface
Serial port devices.
 Designed to allow
many peripherals to
be connected using a
single port.
188 110 Computer Programming : Chapter 1.2 – Computer Systems 40
(cont'd.)
 Allowing devices to be connected and
disconnected without rebooting the computer.
 Provide power supply for low-consumption
devices.
 Allowing many devices to be used without
specific device drivers to be installed.
 Data rate
 Low speed: 1.5 Mbps (USB 1.1 & 2.0)
 Full speed: 12 Mbps (USB 1.1 & 2.0)
 Hi-speed: 480 Mbps (USB 2.0)
 Super-speed: 4.8 Gbps (USB 3.0)

188 110 Computer Programming : Chapter 1.2 – Computer Systems 41


(cont'd.)

188 110 Computer Programming : Chapter 1.2 – Computer Systems 42


Expansion Slots and Cards
 If the PC does not have a port for an external
device, you can install an expansion card into
one of the empty expansion slots.
 A card provides the correct port for the new
device, and connects the device to the CPU by
way of the computer's expansion buses.
 Peripheral Component Interconnect (PCI) bus
 Standard 32/64-bit I/O bus.
 Accelerated Graphics Port (AGP) bus.
 A faster bus for 3D video card.

188 110 Computer Programming : Chapter 1.2 – Computer Systems 43


(cont'd.)
 Modern PCs are now using PCI Express (PCI-E
or PCIe).
PCIe x16 slot

PCI slot

PCIe x1 slot

188 110 Computer Programming : Chapter 1.2 – Computer Systems 44


(cont'd.)
 Most common expansion cards

Sound card

Network Interface Card

Video card

188 110 Computer Programming : Chapter 1.2 – Computer Systems 45


Input and Output Devices
 Input devices accept data and instructions from
user

188 110 Computer Programming : Chapter 1.2 – Computer Systems 46


(cont'd.)
 Output devices return processed data back to the
user

188 110 Computer Programming : Chapter 1.2 – Computer Systems 47


(cont'd.)
 Some types of hardware can act as both input
and output devices, e.g., touchscreen.
 The most common types of devices that can
perform both input and output, however, are
communication devices, which connect one
computer to another -- a process known as
networking.
Modem

Network Interface Card

188 110 Computer Programming : Chapter 1.2 – Computer Systems 48


Storage Devices
 Storage is a device to hold the data files and the
program files.
 The three distinctions between storage and
memory:
 More room in storage than in memory.
 Contents are retained in storage when the computer is
turned off, whereas the contents in memory disappear.
 Storage is much cheaper than memory.
 The most common storage medium is the
magnetic disk.
 Floppy disk ~ obsoleted by flash drive
 Hard disk
188 110 Computer Programming : Chapter 1.2 – Computer Systems 49
(cont'd.)

188 110 Computer Programming : Chapter 1.2 – Computer Systems 50

Potrebbero piacerti anche