0% found this document useful (0 votes)
3 views42 pages

Ch2 Part 1

The document provides an introduction to computer structure, detailing the components of a computer system, including the central processing unit (CPU), memory, and input/output units. It explains the Von Neumann architecture, which organizes computers into four main parts: ALU, control unit, memory, and I/O units. Additionally, it covers various types of memory, coding systems like ASCII and Unicode, and the functioning of different input and output devices.

Uploaded by

jimimjimin13
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)
3 views42 pages

Ch2 Part 1

The document provides an introduction to computer structure, detailing the components of a computer system, including the central processing unit (CPU), memory, and input/output units. It explains the Von Neumann architecture, which organizes computers into four main parts: ALU, control unit, memory, and I/O units. Additionally, it covers various types of memory, coding systems like ASCII and Unicode, and the functioning of different input and output devices.

Uploaded by

jimimjimin13
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/ 42

Introduction to Computer Science (I1100)

Lecture 2: Computer Structure


Lebanese University
Faculty of Sciences 1 - Department of Computer Science
Dr. Abed EL Safadi
How the computer works
Employee Vs Computer
The employee moves to the center of his office (central processing
unit)
He is given files to process (Input information)
He will have to make us the files treated (Output information)
To do his job, he has a calculator (Calculation unit).
To remember what is asked, he notes on the draft instructions
(Program) that he is asked (Memorization of the instructions to be
executed).
He needs some information such as the price of the products, the
addresses of the customers who exist on classified directories, archives
... (Auxiliary memories).
2
How the computer works
In the example, there are two things:

• The Office Worker


• The Instructions to be executed by the employer (what is asked of him)

Thus, the Computer System is composed of two parts:

• The material which consists of the central unit and the input / output
devices.
• Software that is programs (set of instructions that the machine must
execute).

3
Von Newman Architecture

Program
Input data Output data
Computer

John Von Newman proposed that programs and data together should
be stored in the memory of a computer

The program is a sequence of instructions that tells the computer what


to do with data
4
Von Newman Architecture
The Von Neumann architecture divides
the computer into four distinct parts :

1. ALU (Arithmetic/Logic Unit):


performs mathematical operations
and logic operations requested by
program.
2. Control Unit: interprets the
instructions in memory and causes
them to be executed.
3. Memory: stores both data and a
program
4. Input/output Units (I/O): allow
the computer to communicate and
interact with the outside world like
a screen, a keyboard, etc.
5
Von Newman Architecture
Processor (CPU): CPU is the abbreviation
for central processing unit commonly
called processor, the CPU is the brain of
the computer.
CPU has two components: the arithmetic
logic unit (ALU) and the control unit (CU)

The CPU also contains very fast and small


memories called registers. A register may
hold an instruction, a storage address, any
kind of data, or temporary results.
6
Von Newman Architecture

Control Unit
The control unit determines the order in which the instructions
of a program should be executed and controls the retrieval of the
proper operands.
Order of the operations performed by the control :
• extraction of the instruction to be executed,
• analysis of this instruction and bind with the A.L.U.,
• search for data to be processed in the main memory,
• initiation of treatment in the A.L.U
• storing results in the main memory or in auxiliary memory
7
Von Newman Architecture
Main memory (RAM) :

The main memory is called Random Access Memory


(RAM) is the area in a computer that stores programs
and data for quick access by the processor (CPU).
Therefore, every program you execute must be copied
from a storage device into main memory.

The Buses

In computer architecture, a computer bus is a


communication system that transfers data between
components inside a computer. A bus consists of a set of
wires that carry binary signals.
Let k be the size of the address bus (i.e. the bus is made
of k wires), the capacity of the main memory can be
expressed either: in number of memory words: the
capacity = 2k memory words 8
Input/output Units
Input units bring information into the computer that will be coded and later on
processed by the CPU. Examples of input units: keyboard, mouse, scanner, webcam,
microphone, cameras, …

Output units are devices that bring information out of a computer after being
processed. Examples of output units: monitor, printers, plotters, projectors,…

9
Input/output examples
Keyboard: A computer keyboard is the
main input device for computers. It is composed
of keys set that sends commands to the computer.

Computer screen: A computer screen or monitor is an output device that


displays information in pictorial form.

There are usually two families of screens:

• The cathode ray tubes (CRT)


• The liquid crystal displays (LCD)

10
Cathode Ray Tubes

The first computer monitors used cathode ray tubes (CRTs). These
monitors are voluminous, heavy with high power consumption.

11
Liquid Crystal Displays (LCD)

The liquid crystal displays (LCD) monitors replaced the CRTs.


The monitors are found in laptops, smartphones, digital cameras,
and desktops.
They are low in power consumption, have a lighter weight and
smaller physical size but has higher price versus a CRT.

12
Liquid Crystal Displays (LCD)
The performance of a monitor is measured by :

Luminance (candelas per square meter cd/m2) : it is the quantity of light in an


image (which varies from one pixel to another) or emitted by a light source

Resolution (number of distinct pixels in each dimension that can be displayed)


it us quoted as width × height, example: 1024 × 768),

13
Liquid Crystal Displays (LCD)
Resolution

14
Liquid Crystal Displays (LCD)
Monitor size

standard screen 19 inch wide screen 22 inch


standard screen 1 inch = 2.54 cm
wide screen

15
Printer
Printer is an output device that allows a user to print items on paper
such as letters, computer programs, and pictures.

There are many types of printers :

16
Dot matrix printer
Uses a print head made of pins that moves up-and-down motion
on the page and prints by impact. Every pin produces a dot and
every character is made of multiple dots

standard screen
wide screen

17
Dot matrix printer
Advantages :
• Low purchase cost,
• Cheap to operate,
• Low repair cost
• Ability to print on continuous paper.

Disadvantages :
Noisy, with low resolution, and not all can do color.

18
Inkjet printer
Creates digital images by propelling droplets of ink onto paper,
plastic or other substrates.
Advantages :
• Prints good resolution photos,
• No warm-up time is needed before printing,
• It can be very cheap
• Prints pages in color.
Disadvantages :
• It has an average printing speed .
• The ink can be rather expensive

19
Laser printer
Laser printer uses static electricity and a laser to melt the powder
ink from a cartridge onto the paper. Most do not print colors.

Advantages :
• It is 2 to 3 times faster and more economical
to use than the Inkjet printers that use more ink.
Disadvantages :
• Higher purchase price.
• Need more frequent maintenance and cleaning
• Their print quality is not as good as Inkjet printers.

20
3D printers
3D printing or additive manufacturing (AM) is the process of
building a three-dimensional object (physical objects) from
computer-aided design (CAD) model (digital blueprints) by
successively adding material layer by layer.

21
4D printers
4D printing uses the same technique of 3D printing and adds the
dimension of transformation over time. The printed product reacts
with environment parameters (humidity, temperature, etc.) and
changes its form accordingly. It uses special materials and
sophisticated designs that are “programmed” to prompt your 3D
print to change its shape

22
1D, 2D, 3D & 4D printers

23
Motherboard
A motherboard is the main printed circuit board in a computer. It
connects all the different components of the computer such as CPU,
memory, connectors for input and output devices, and allows
communication between them

24
Motherboard

• Chipset: electronic circuit that coordinates data exchanges


• Clock (serves to clock the system) + Battery
• Processor: computer brain.
• Memory: data storage.
• Expansion connectors (slots): connectors for inserting expansion
cards
• System bus: channel for passing information between the
microprocessor and the main memory.

25
Computer Memories
The memory is a device able to store, preserve, and extract
information (coded in binary in a computer).

Memories can be classified based on their capacity/size in Bytes,


access time and cost
26
Registers

Registers found integrated in a CPU. A register consists of a small


amount of fast storage. It provides the fastest way to access
data and has the same speed of the CPU.

The exact number of registers depends on the type of the


processor

Among the registers, the most important one is the accumulator


register that stores arithmetic and logic results.

27
Cache

Cache is an intermediate memory between the CPU and the


main memory.

A cache is a smaller, faster memory, closer to a CPU, however


larger than register.

The cache contains copies of data from main memory frequently


requested by the CPU.

28
Main memory

• Main memory is a fast memory but slower than registers.

• Its storage capacity is small and has a high cost per bit storage.

• Its size is between few hundreds of MB to few GB with a direct


access.

• This memory is accessed directly by the processor and made up


of RAM and ROM.

29
RAM (Random Access Memory)

Temporary storage that stores program code and data that can be
accessed, read, and written to by the processor (CPU) and other
hardware devices

Its content can be modified (read and write).

RAM is volatile, all its contents are lost when the power supply is
interrupted.

SRAM (Static RAM) and DRAM (Dynamic RAM) , SRAM is faster than
DRAM and used as cache memory. 30
ROM (Read Only Memory)
ROM is non-volatile and is more like a permanent storage for
information.

It stores the BIOS software, the bootstrap loader program to


load and start the operating system when computer is turned
on.

PROM (Programmable ROM) as Game, EPROM (Erasable


PROM), and EEPROM (Electrically Erasable PROM) are some
commonly used ROMs.
31
Secondary memory

Secondary memory also known as secondary storage or


auxiliary storage is a non-volatile high capacity memory of
several hundred MB to several hundred GB.

This memory is not directly accessible by the CPU

A secondary memory is larger and slower than RAM.

32
Secondary memory
Second memory device include :
1. Flash memory that can be electrically erased and reprogrammed
(USB flash drives, memory cards, and (SSD) solid state drives),
2. Optical disc for which data is read and written by lasers (CD-ROM,
CD-RW, DVD, Blu-ray BD),
3. Magnetic disk is a circuit plate constructed of metal with
magnetized material (HDD hard disk drive, floppy disk drive)

USB flash drive


Memory Cards
SSD
CD, DVD, Blu-ray 33
Hard disk drive (HDD)
A hard disk is an electromechanical data storage device that uses
magnetic storage to store and retrieve digital information using one or
more rigid rapidly rotating disks (platters) coated with magnetic
material.

34
Hard disk partitioning
Hard disk partitioning is the creation of one or more regions on a
hard disk, so that an operating system can manage information in
each region separately. These regions are called partitions

There are two types of partitions: primary partition and extended


partitions

35
Information Organization in Memory
The information are represented and manipulated by the computer
in binary form.

Any information will be treated as a sequence of 0 and 1 in order to


be processed by the electronic components of the computer
(0 corresponds to electrical value off and 1 to on).

A bit is a BInary digiT

A bit can hold only one of two values 0 or 1 sometimes refer to false
or true.
36
Information Organization in Memory
A byte = 8 bits. Because bits are so small, they are assembled into a
group of eight to form a byte.

Nibble is a group of four bits

A word is piece of data of fixed size handled as a unit.

The word size is the number of bits processed by the CPU at a time
With modern computers word size can be 32 bits or 64 bits.

Larger units of information storage can be used like kilobyte (KiB or


KB), megabyte (MiB, gigabyte (GiB), TeraByte (TB), etc. 37
Information Organization in Memory

How to convert from a unit to another is shown below:

• 1 Byte = 8 bits.
• 1 Kilobyte = 1 KB = B = 1,024 Byte.
• 1 Megabyte = 1 MB = KB = Byte.
• 1 Gigabyte = 1 GB = MB = Byte.
• 1 Terabyte = 1 TB = GB = Byte.

38
Information Coding

Information coding in computer is the process of converting


information such as letter, word, sound, image, and video into binary
form or representation in order to be processed.

A character could be a capital letter, a small letter, a digit, a symbol ($,


?, !, …) and initially was coded on 7 bits using the ASCII (American
Standard Code for Information Interchange) code.

39
ASCII code

The ASCII code can represent = 128 characters.

Sample of
ASCII code
table

40
ASCII code

For example, the code of ‘A’ = 65, ‘a’= 97, and ‘0’ = 48 in decimal,

The code of the letter ‘A’ is 65 in decimal (= 0100 0001 in binary).

The right most bit in a Byte is called least significant bit (LSB) and the
left-most bit is called most significant bit (MSB).

The MSB can also correspond to the sign bit of a signed binary number
(negative or positive number) 41
Extended ASCII code

The ANSI code contains = 256 characters like à, È, ë, and Ç.

Unicode is another character coding system proposed in 1991. It


uses 16 bits to code a character, so characters can be coded
using Unicode.

The Unicode contains Chinese letters, Arabic letters, etc.

42

You might also like