[go: up one dir, main page]

0% found this document useful (0 votes)
25 views28 pages

London

Uploaded by

bakrcyber
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)
25 views28 pages

London

Uploaded by

bakrcyber
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/ 28

Ministry of Higher Education and Scientific Research

University of Mosul

College of Computer Science and Mathematics

Cyber Security Department

Research about Computer


Hardware components

Done By :
Abdullah Omar Salah-Aldien
Gorup : C
Computer hardware components : can generally be broken down into three categories:

- Processing – Processing components are responsible for actually carrying out actions
in the computer. The main processing component is the Central Processing Unit (CPU).
We will take an extensive look at the CPU later in this lecture. In addition, modern
consumer laptops, desktop computers, and smartphones including a separate
Graphics Processing Unit (GPU), which we will take a brief look at.

- Memory – As the term suggests, memory components remember information. We


can generally divide memory into two components: primary memory and secondary
memory. Primary memory is fast, but volatile – it loses all information stored in it
when the power goes off (a laptop maintains a trickle of energy to the primary
memory in sleep mode, but if the battery completely dies, the laptop’s primary
memory contents will be lost. Primary memory is primarily RAM (Random Access
Memory). Secondary memory is much slower and used for permanent, non-volatile
storage. Secondary memory will usually be either a Solid State Drive (SSD) or a Hard
Drive (sometimes abbreviated HDD). Smartphones have a similar divide between
primary and secondary memory and include volatile RAM and non-volatile Flash
Memory.

- Input/Output– A variety of devices are used to get information to and from the
computer. On a consumer laptop or desktop, these are primarily the keyboard,
mouse, and computer display (also sometimes referred to on desktop computers as
the computer monitor). In addition, devices like printers and scanners also fall into
this category. Input/Output is commonly abbreviated as I/O or simply io (pronounced
as “eye-oh”).

While all computers have some sort of processing unit, the actual components do vary. The most
common computers in the world are neither desktop nor laptop computers; instead they are
embedded computers or embedded systems, which do not have a keyboard or mouse, and in some
cases don’t even have a display for output. These are the computers that are embedded in mundane
everyday devices from microwave ovens, coffee makers, and vending machines up to automobiles and
airplanes. Their inputs come from sensor devices, and their outputs are electronic signals, which
control the devices in which they are embedded.
Common Tasks on the Computer :
- Let’s take a look at how some common tasks on the computer relate to the Computer
Components we’ve just listed. Installing a Program on the Computer
- Typically, the installation files will be compressed, particularly if the application installer is
downloaded from the Internet, so they will need to be decompressed before the installation
progress can begin.
- The installation process copies the instructions for your new program onto your computer’s
secondary storage device (e.g., Solid State Drive or Hard Drive).
- At this point, the instructions are now decompressed and in permanent, non-volatile storage.
Running a Program on the Computer
- When we execute a program, the instructions for the program are copied from our secondary
storage device into primary memory.
- The instructions must be in primary memory for the CPU to access and execute them.
- In addition, storage space is set aside in primary memory for the program’s variables and other
information Saving a File from a Program
- When we create data or documents in our program, the data is stored just in primary memory
unless we explicitly save the documents.
- As previously noted, primary memory is volatile and if the power goes out, your data will be lost.
- Saving a file copies the data from primary memory to secondary memory where it is permanently
saved.

Opening a File from a Program :

- Opening a file from our program copies the data in the file from secondary storage
into primary memory where it can be operated on by the program.
- Generally, a program will want all data in primary memory before it can manipulate
it.
Exploring the CPU :
We will now take a closer look at the CPU. The most important things to take
away from this discussion are :
1) The primitive nature of the CPU in comparison to how we view computers
(either as programmers or as users).
2) Some understanding of what Machine Language and Assembly Language are.
3) The distinction between High-Level Languages and Low-Level Languages.
4) How Compilers and Interpreters allow us to execute High-Level Languages on
a computer that actually only understands Machine Language.
Components of the CPU include:

 Registers – Storage in the CPU is limited to a small number of registers. For


example, the ARM architecture (used in the iPhone among other places) has
31 general-purpose 64-bit registers (the 32nd is for special purposes only)
and 32 registers that are 128-bits for handling floating-point operations.
 Instruction Register – A special register stores the binary code of the
current instruction that is being executed.
 Instruction Counter – A special register keeps track of the current address
in Main Memory of the instruction that is currently being executed.
 Arithmetic Logic Unit (ALU) – The ALU can take the contents of two
different registers and perform either an arithmetic operation on them
(such as Add or Multiply) or a Boolean logic operation on them (such as And
or Or).
 Control Unit – This contains the logic circuitry controlling the other parts of
the CPU.

Machine Language :
- Each type of computer processor has its own internal machine language. So
an ARM processor used in an Apple iPhone speaks an entirely different
language than a MacBook Pro, which has an Intel x86 processor in it.
- The actual language of all CPUs is quite primitive. Let’s take a look at some
sample instructions from the MIPS processor.
Example Arithmetic and Boolean Instructions:
- ADD $d, $s, $t
o Takes the contents of the $s register adds it to the $t register, using the
Arithmetic Logic Unit (ALU), and stores the results in the $d register.
- OR $d, $s, $t
o Takes the contents of the $s register and perform a bitwise OR operation
with the contents of the $t register then stores the results in the $d register.

Example Jump and Branch Instructions:


- JR $s
o Jump-based on Register: jump to the address specified in register $s. This
changes the next instruction which will be executed to the new memory address
specified in register $s.
- BGEZ $s, offset
o Branch-if Greater than or Equal to Zero: if the contents of register $s are
greater than or equal to zero, jump to a new location determined by offset—this
changes the contents of the Instruction Counter based on the offset amount,
and thus changes the next instruction to execute.
- BEQ $s, $t, offset
o Branch-if Equal: if the contents of register $s and register $t are the same, then
jump to the new location determined by offset.

Example Memory Instructions:


- LBU $d, address
o Load Byte: loads the byte at a given memory address into the $d register.
- SB $s, address
o Store Byte: takes the least significant byte of the $s register and stores it at the
address given.
- LW $d, address
o Load Word: loads the 32-bits at a given memory address into the $d register.
- SW $s, address
o Store Word: takes the contents of the $s register and stores it at the address
given.
There are more instructions then I have listed here, but this gives a good sense of

what they look like. There are arithmetic instructions to subtract, multiple, and

divide, for example, as well as arithmetic instructions for the floating point registers;

more branch include testing if something is less than zero or greater than zero; and

the memory instructions allow transfers in 16-bit chunks in addition to the 8-bit and

32-bit instructions I have listed.

General Operation of the CPU :

- Instructions for the current program are stored in Main Memory.

- The Instruction Counter keeps track of the address in Main Memory for the

current instruction to execute.

Here is the basic cycle the CPU uses to carry out a program. This is sometimes

referred to as the Fetch-Decode-Execute cycle:

- 1) The instruction in Main Memory corresponding to the current value of the

Instruction Counter will be fetched from Main Memory and placed in the

Instruction Register.

- 2) The Control Unit contains logic circuitry, which will decode the contents of

the Instruction Register to determine the instruction’s type and the registers it
operates on; it will then send the contents of those registers into the Arithmetic

Logic Unit; finally it will send the resulting value to the destination register.

- 3) The Instruction Counter will be incremented.

- 4) We go back to 1) where the instruction in Main Memory associated with the

Instruction Counter is retrieved from Main Memory.

There are some exceptions. Branching will require changing the instruction counter.

Loading and storing operations will use different circuitry than the ALU. However,

this gives you a basic idea of how the CPU works.

Machine Language and Assembly Language :

There are two languages that work at the CPU level. They are:

- Machine Language – This is the actual language of the CPU. It consists of

binary codes.

- Assembly Language – This is a language used by programmers, which

translates directly into Machine Language, with each individual instruction in

Assembly having a direct equivalent in Machine Language.


Here’s an example:

As a programmer, I might write the instruction:

ADD t1, t2, t3

This means take the contents of register t2 add it to the contents of register t3

and store it in

register t1. The equivalent machine language code is:

00000001010010110100100000100000

We can break this down into the following parts

000000 01010 01011 01001 00000 100000

Going from right-to-left the 100000 at the end is the code for ADD. The code for

SUB

(subtract) would be 100010, the code for DIV would be 011010. The CPU uses

these last six bits to determine what operation is being performed.

The next set of bits (again going right-to-left) is 00000. These bits would be used

for SHIFT operations (operations shifting bits leftward or rightward within a

register) and is not needed for our ADD operation.


The next three sets of bits 01001, 01011, and 01010 designate the registers

used by our ADD operation. 01001 is the destination register. The 01011 is the

first source register, and the 01010 is the second source register. Note that these

register codes are five bits long 25 = 32 and MIPS has 32 registers for integer

values.

The final six bits set to 000000 are not needed for basic arithmetic operations.

- Each line of Assembly Code can be translated directly into the binary Machine

Code that the MIPS processor actually uses. However “ADD t1, t2, t3” is much

easier for a human to write and much harder to make a mistake with than

writing “00000001010010110100100000100000”.

Multicore Processors :

- For many years, processors increased in speed every year. Unfortunately,

Electrical Engineers are having difficulty further increasing the speed of the CPU.

So as an alternative, we have been getting multiple Cores in each CPU.

- You can think of each Core as consisting of an entirely separate CPU with their

own registers, their own Arithmetic Logic Unit, and their own instruction register and

instruction counter.
- Having multiple cores doesn’t necessarily lead to faster programs however. Let’s

take a look at some of the issues related to them:

- for simultaneous execution of different programs. I

can assign one core to one program, and a different core to another program.

(We’ll take a look at how programs are scheduled in another lecture this

week.)

- rogram, but that depends on the

program being written to take advantage of multiple cores.

multiple cores. Some programs that work well for multiple cores include:

 Web servers with multiple cores can assign different cores to different visitors.

The visitors don’t generally interact, so the cores can operate more or less

independently.

 Photo processing can assign different cores to different parts of the image. For

example, if I have four cores, I can assign one to the top-left, one to the top-

right, one to the bottom-left, and the last to the bottom-right.

 Video processing can assign cores to different parts of a movie.

 Spreadsheets, such as Excel, can take advantage of multiple cores.

 Simulations can assign different processors to simulate different parts of the


simulation. For example, a weather simulation can assign a processor to

simulate one region, and a different processor for another region.

 Unfortunately, not all programs can be easily divided to take advantage of

multiple cores. While having a few cores is probably useful (because as we’ll

see next lecture you always have the Operating System running in addition to

anything else executing on your computer), the ability for someone to really

take advantage of four, six, eight or more cores really depends on the type of

programs that you use.

Graphics Processing Units (GPUs) :

- Modern desktop, laptop, and mobile devices all include a Graphics Processing

Unit (GPU) in addition to the CPU.

- While CPUs with 2, 4, 6, and 8 cores are common, GPUs have many more

cores. For example , NVidia’s GeForce GTX 960, a consumer-level GPU, has

1024 cores and their high end-consumer models have as many as 3,584 cores

as of this writing.

- What is the difference between the many, many cores in a GPU and the much

smaller number of cores in a CPU?


- GPU cores have much more limited utility. Typically, we will load data into a

GPU and all the cores will perform the same action simultaneously in all their

cores.

 -dimensional arrays)

and on matrices.

used for many other purposes including Neural Networks, Code Cracking, and

Bitcoin Mining.

- For the right type of operation, a GPU gives is tremendous power, but it

doesn’t replace the more general-purpose functionality of the CPU.

Processor :
The processor or the CPU is the main component of the computer. Select a
processor based on factors like its speed, performance, reliability and motherboard
support. Pentium Pro, Pentium 2 and Pentium 4 are some of the processors.

Developments of Processors:

A computer processor is one of the most advanced technologies available in the


market today. It is also one of the most defining inventions by mankind, along with
television and automobiles. Computer processors grow by leaps and bounds every
year, with processors getting faster year in and year out. Processor speeds are
increasing all the time and their sophistication is growing with every innovation.

The Intel 4004 was a 4-bit processor which had a speed of 740 kHz. In 1976, Intel
introduced the 16-bit 8086 processor which had a speed of 5 MHz. A later version
of the 8086 was used to build the first personal computer by IBM. This was followed
by the Intel 486, which was a 32-bit processor which had a speed of 16 MHz.
During this time, several improvements in technology were made. For instance,
processors could run in both real mode and protected mode, which introduced the
concept of multitasking. Power-saving features, such as the System Management
Mode (SMM), meant that the computer could power down various components.
Computers finally went from command-line interaction to WIMP (Window, Icon,
Menu, Pointing device) interaction.

In 1993, Intel introduced the Pentium processor which has a speed of 60 MHz. This
was followed by the Pentium II which has a speed of 233 MHz, and the Pentium III
which has a speed of 450 MHz, and the Pentium 4 which has a speed of 1.3 GHz.
Later, Intel brought out the Celeron processor, which has a speed of 266 MHz and
which is used in affordable low-end computers. In 2003, Intel inaugurated the
Pentium M processor, which ushered in a new era of mobile computing, under the
Centrino platform. The Pentium M is slower, at 900 MHz, so that energy
consumption is reduced and the battery of the laptop lasts longer. In 2006, Intel
introduced the Core processor which has a speed of 1.6 GHz. It has more than one
core, like in the case of Core Duo (which has two cores) and has virtualization
capability which allows multiple copies of an operating system to be run on the
same computer.

While Intel is the leading company in the manufacturing of processors, there are
other companies such as AMD that make processors too. In 1991, AMD had
brought out the Am386 processor and its speed is 40 MHz. It is compatible with the
Intel 386 processor. In 1999, AMD introduced the Athlon processor which has a
speed of 500 MHz. Athlon was a legitimate competitor to Intel Pentium III because it
was faster. As a matter of fact, AMD Athlon was the first processor to reach the
speed of 1 GHz. The future for the computer processor industry is promising, as
processors will continue to get faster and cheaper. According to Moore‘s Law, the
number of transistors on a chip used to double every year, and from 1975, it used
to double every two years.

In the future, processors will have more cores that will be blistering fast and reduce
power consumption. Software programmers will have to create multi-threaded
applications to utilize the multiple cores. Computers with such processors will be
faster for multimedia applications such as graphics software, audio players and
video players. There is also a possibility that optical computing will increase
processor speeds exponentially. All these signs point to a brighter future for
processors, which will be to the benefit of everyone.

RISC and CISC:

John Hennessy, current Stanford Computer Science Professor and Stanford’s

President from 2000- 2016, earned the Turing Award (Computer Science’s

equivalent of a Nobel Prize) in 2018. Let’s take a look at the work he earned it for.

As computers became more advanced, they gained increasingly complex

instructions. So one might have an instruction that retrieved the contents of a

memory address specified in one register, added it to the contents of another

register and stored it back in the memory location specified by a third register. This

trend toward more complex instructions is called Complex Instruction Set

Computing (CISC). President Hennessy, along with his co-Turing Award winner
Professor Dave Patterson (at Berkeley), concluded that this was the wrong

approach. They advocated that instructions should become simpler, not more

complex. This approach is called Reduced Instruction Set Computing (RISC).

According to the Association for Computing Machinery (ACM), the primary

Computer Science professional organization, 99% of modern CPUs are based on

RISC architectures.
A small instruction set allows us to easily optimize and overlap instructions in ways

that CISC cannot do without difficulty. Two important innovations that followed were

Pipelined and Superscalar CPUs.

Pipelined CPUs are based on the insight that during the execution of a CPU
instruction, different

parts of the CPU are used at different times. We’ve previously seen a CPU cycle

includes fetching an instruction, decoding an instruction, and executing an

instruction. In a traditional approach, while we are fetching an instruction, the

decoding circuits and the ALU (Arithmetic Logic Unit) sit fallow; and while the ALU

runs, the fetching and decoding circuits are wasted. Pipelining will overlap these

parts to look like something like this:

Here while we are decoding an instruction, we are simultaneously fetching the next

instruction. When we execute an instruction in the ALU, we are decoding the next

instruction and fetching the third instruction. We can continue to overlap all
instructions until we hit a condition branch (e.g., an if statement), which does

cause issues with pipelining, since we’ve already started fetching and decoding an

instruction which might not actually be executed depending on what happens with

our condition. There are a variety of ways of handling this, which we will not go into

in CS106E. Superscalar CPUs include multiple CPU components, such as two or

more ALUs, so that we can

simultaneously execute some instructions. For example if I have the code:

a = b + c;

x = y + z;

A Superscalar CPU would run these both simultaneously as there is no interaction

between the two lines of code. We can look at execution of a Superscalar CPU like

this:
Ports are nothing but it is connections between external and internal input/output

devices such as keyboards, mice, mouse, Disk Drive, and many more with

motherboards using cables. That allows to communicate between external devices

or peripherals with a laptop or computer. Computer ports may be virtual or physical.

In this article, we are going to discuss about different types of physical computer

ports available in the market.

Characteristics of Ports

There are different characteristics of computer ports:

 External devices like keyboards, mice, and other devices are connected by

using computer cables and ports.

 Computer ports are the slots in the motherboard in which cables of the

external devices are plugged in for communication.

 Many examples of external devices that can be attached via ports are

monitors, mouse, speakers, microphones, keyboards, etc

Types of Computer Ports

There are two types of computer ports discussed below:

 Internal port -Internal ports are used to connect internal devices like disk

drives, CD drives, and other internal devices with the motherboard.


 External port-External ports are used to connect external devices modem,

mouse, printer, flash drives, etc with the motherboard.

Let us now discuss a few important types of ports:

 Serial Port

 Parallel Port

 USB Port

 PS/2 Port

 VGA Port

 Modem Port

 FireWire Port

 Sockets

 Infrared Port

 Game Port

 Digital Video Interface(DVI) Port

 Ethernet Port

Now let us discuss these ports one by one:


1. Serial Port(COM Port)

A serial port is also called a communication port and they are used for connection

of external devices like a modem, mouse, or keyboard (basically in older PCs).

Serial cables are cheaper to make in comparison to parallel cables and they are

easier to shield from interference. There are two versions of the serial port, which

are the 9-pin serial port model and the 25-pin serial port model. The rate of

transmission of data in the serial port is 115 KB/sec.

 Serial ports are used for external modems and older computer mice.

 There are two versions of serial-ports that is 9-pin and 25-pin.

 The speed of data in the serial port is 115 kilobits per second.

2. Parallel Port (LPT Ports)

Parallel ports are generally used for connecting scanners and printers. It can send

several bits at the same time as it uses parallel communication. Its data transfer
speed is much higher in comparison with the serial port. It is a 25-pin model. It is

also known as Printer Port or Line Printer Port.

 Parallel Ports are used for scanners and printers

 parallel ports are also known as printer port

 This is a 25-pin model.

3. USB (Universal Serial Bus)

In 1997 USB was first introduced. This can connect all kinds of external USB

devices, like external hard disk, printer, scanner, mouse, keyboard, etc. There are a

minimum of two USB Ports provided in most of the computer systems. It is a kind of

new type serial connection Port that is much faster than the old serial Ports These

USB Ports are much smarter and more versatile, as they allow the “daisy chaining”

of up to 127 USB peripherals connected to one port. The data transfer rate in this is

Data12 megabits per second. It also provides plug-and-play communication.


 USB ports can connect all kinds of USB devices like external hard

disks, scanners, printers, keyboards, etc.

 USB port was introduced in 1997.

 A minimum of two USB ports are available on each laptop or computer.

 The data transmission rate in the USB port is 12 megabits per second.

4. PS/2 Port

PS/2 ports are special ports used for connecting old computer keyboard and

mouse. It was invented by IBM. In old computers, there are a minimum of two PS/2

Ports, each for the keyboard and the mouse. It is a 6-pin mini Din connector.
 PS/2 ports are used for old computer keyboard and mouse.

 This is also known as the mouse port.

 Most of the old computers have two PS/2 ports one for the mouse and one for

the keyboard.

5. VGA Port

VGA ports also known as Video Graphic Array connectors are those which connect

the monitor to a computer’s video card. VGA port has 15 holes and it is similar to

the serial port connector. But VGA Ports have holes in it and the serial port

connector has pins in it.


VGA-Port

 VGA port is used to connects monitor to a computer’s video card.

 There are 15 holes in the VGA port.

 VGA ports are similar to serial port connectors only difference is, that serial

connector has pins and VGA has holes.

6. Sockets

Microphones and speakers are connected with the help of Sockets to the sound

card of the computer.


7. FireWire Port

The IEEE 1394 interface, which is developed in the late 1980s and early 1990s by

Apple as FireWire. It can transfer large amounts of data at very high speed. It is

used to connect camcorders and video equipment to the computer. It comes up

with three variants which are 4-Pin FireWire 400 connector, 6-Pin FireWire 400

connector, and 9-Pin FireWire 800 connector.

 It can transfer large volumes of data at a very high speed.

 Used to connect video equipment to the computer.

 The data transmission rate is 400 to 800 megabits per second.

 FireWire Port was invented by Apple.

 FireWire has three models: 4-Pin FireWire 400 connector, 6-Pin FireWire 400

connector, and 9-Pin FireWire 800 connector.


8. Infrared Port

An infrared port is a wireless communication interface that is used to send and

receive infrared signals from other devices. The range of connectivity of the infrared

port is 5-10ft. Infrared port allows devices to communicate without a physical

connection.

9. Game Port

These ports are used previously to connect a joystick to a PC. But nowadays it is

replaced by USB ports.

10. Modem Port

As the name suggests, a Modem port is used to connect a PC’s modem to the

telephone network.
11. Digital Video Interface(DVI) Port

DVI Port is used to connect an LCD(flat panel) monitor to the computer’s high-end

video graphic cards and it is very popular among video card manufacturers.

12. Ethernet Port

Ethernet Port helps to connect to a network and high-speed Internet(provided by

LAN or other sources). It connects the network cable to a computer and resides in

an Ethernet card. It provides a data travel speed of 10 Mb to 1000 Mb(megabits)

per second.
 It is used to connect users with LAN (Local Area Network) and provide high-

speed internet.

 Connects by using a network cable to a computer.

 The data transmission rate is 10 to 1000 megabits per second depending upon

the network bandwidth.

Conclusion

As we discussed there are two types of computer ports physical and virtual. These

ports are used to connect internal and external devices to the motherboard for

communication. Examples of physical ports are USB Ports, Ethernet ports, DVI

ports, and many more. Examples of virtual ports include port 20, port 21, port 80,

etc.

You might also like