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

Chapter 3 Computer Architecture

Uploaded by

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

Chapter 3 Computer Architecture

Uploaded by

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

CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

Central Processing Unit (CPU):


The heart of any contemporary computer system, including tablets and smartphones, is the
central processing unit (CPU), sometimes referred to as a microprocessor or processor. On a
single microprocessor, the CPU is frequently implemented as an integrated circuit. The CPU is
in charge of carrying out or processing each and every instruction and piece of data in a
computer program. As depicted in Figure 3.1, the CPU is composed of:
 control unit (CU)
 arithmetic and logic unit (ALU)
 registers and buses.
Von Neumann architecture:
Early computers could not function without significant human intervention since data had to be
supplied into the machines while they were actually operating; programs or data could not be
stored. John von Neumann created the idea of the "stored program computer" in the middle of
the 1940s, and it has served as the foundation for computer design ever since. Prior to the
middle of the 1940s, none of the following primary innovative aspects of the von Neumann
architecture were present in computers:
 the idea of a processor, often known as a central processing unit
 The memory could be directly accessed by the CPU.
 Data and programs could both be stored in computer memory.
 The instructions that made up stored programs could be carried out in any order.

There are many diagrams of von Neumann CPU architecture in other textbooks and on the
internet. The following diagram is one example of a simple representation of von Neumann
architecture:

NAVID SAQIB : 03334259883 1


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

Components of the central processing unit (CPU):


The Control Unit (CU), Arithmetic & Logic Unit (ALU), and system clock are the three primary
parts of the CPU.

Arithmetic & Logic Unit (ALU):


The Arithmetic & Logic Unit (ALU) enables the necessary logic (AND, OR) or arithmetic (+, -, and
shifting) operations to be performed during the execution of a program. A computer may
contain multiple ALUs to do different tasks. The processes of addition, subtraction, and left or
right logical shift are used to perform multiplication and division.

Control Unit (CU):


An instruction is read from memory by the control unit. The Program Counter (PC) contains the
address of the place where the instruction is located. The Fetch–Decode–Execute cycle is then
used to interpret this instruction (see later in this section). In order to instruct the other
computer components on what to do, signals are generated along the control bus during that
procedure. The computer's control unit makes sure that program instructions and data flow are
coordinated across the system. In order to guarantee that this crucial synchronization occurs,
the system clock generates timing signals on the control bus; without the clock, the computer
would simply fail!
All of the information and programs that the CPU needs to access are stored in the RAM. The
Immediate Access Store (IAS) is another common name for RAM. The CPU temporarily loads
data and programs from backup storage (such a hard disk drive) into RAM. This is done because
reading and writing data to RAM is far faster than reading and writing data to a backup store.

NAVID SAQIB : 03334259883 2


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

As a result, any important data that an application needs are temporarily kept in RAM to greatly
accelerate processes.

Registers:
The registers are among the most essential parts of the von Neumann system. Registers may
have a specific function or be broad. Only the special purpose registrations will be taken into
account. Table provides a summary of all the registers utilized in this textbook. The Fetch–
Decode–Execute cycle provides a more thorough explanation of how to use these registers (see
later in this section).

Specific purpose registers

System buses and memory:


Earlier on, Figure 3.1 referred to some components labelled as buses. Figure shows how these
buses are used to connect the CPU to the memory and to input/ output devices.

NAVID SAQIB : 03334259883 3


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

System buses and memory

Memory:
There are several partitions that make up the computer memory. There is an address and its
contents in every partition. Each address in the table has eight bits, and the content has eight
bits. The address and its contents are actually much greater than this in a genuine computer
memory.
Every location in the memory will be uniquely identified by its address, and the binary value
stored in each location will be its contents.
Now, let's look at two instances of read and write operations to and from memory that can be
performed using the MAR and MDR registers:
Think about the READ operation first. The memory region displayed in Table 3.2 will be utilized.
The two registers are used as follows if we wish to read the contents of memory address 1111
0001:
 the address of location 1111 0001 to be read from is first written into the MAR (memory
address register):

 a ‘read signal’ is sent to the computer memory


 the contents of memory location 1111 0001 are then put into the MDR (memory data
register):

Now let us now consider the WRITE operation. Again, we will use the memory section
shown in Table 3.2. Suppose this time we want to show how the value 1001 0101 was
written into memory location 1111 1101:
 the data to be stored is first written into the MDR (memory data register):

NAVID SAQIB : 03334259883 4


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

 this data has to be written into location with address: 1111 1101; so this address is now
written into the MAR:

 finally, a ‘write signal’ is sent to the computer memory and the value 10010101 will then
be written into the correct memory location.

Input and output devices:


In Section 3.2, the input and output devices will be discussed in further detail.
They are the primary means of loading and unloading data from computer systems. Input
devices, such as keyboards, touch screens, and microphones, transform external data into a
format that computers can comprehend and analyze. Output devices, such as printers, displays,
and loudspeakers, display computer processing results in a format that is comprehensible to
humans.

(System) buses:
Computers employ (system) buses as parallel transmission components; a single bit of data is
transmitted by each wire in the bus. The address bus, data bus, and control bus are the three
commonly utilized buses in the von Neumann architecture.

Address bus:
The address bus distributes addresses across the computer system, as its name implies. The
address bus is unidirectional, meaning that bits can only flow in one direction between the CPU
and memory. This prevents addresses from being transported back to the CPU, which is a
characteristic that is not wanted.
A bus's breadth plays a crucial role. More memory locations can be directly addressed at any
given time the wider the bus; for example, a bus with a width of 16 bits can address 216
(65536) memory places, whereas a bus with a width of 32 bits can address 4294967296
memory locations concurrently. Even so, it's not big enough for contemporary computers, but
this book doesn't cover the technologies underlying even broader buses.

Data bus:
Data can be sent along the data bus in both ways because it is bidirectional. This implies that
data can go between input/output devices and the CPU as well as between memory and the
CPU. It is crucial to remember that data can be a number, an address, or a command. The width

NAVID SAQIB : 03334259883 5


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

of the data bus is crucial, just like it is for the address bus; the broader the bus, the longer
words that can be carried. (A word is a collection of bits that are considered to be a single unit;
the most typical word lengths are 16 bits, 32 bits, or 64 bits.) The overall performance of the
computer can be enhanced by longer words.

Control bus:

In addition, the control bus is bidirectional. From the control unit (CU), it transmits signals to
every other part of the computer. Its typical width is eight bits. Since it just transmits control
signals, there is really no reason for it to be any wider.

Fetch–Decode–Execute cycle:
The CPU retrieves certain data and instructions from memory and places them in the
appropriate registers before executing a sequence of instructions. In this process, the address
bus and data bus are both utilized. Once this is done, each instruction needs to be decoded
before finally being executed. The cycle known as Fetch-Decode-Execute is this.

Fetch:

MDR has the capacity to hold both instructions and data. The following instruction is obtained
from the memory address currently held in the MAR and stored in the MDR during the fetch-
decode-execute cycle. The Current Instruction Register (CIR) is then copied with the contents of
the MDR. After that, the PC is incremented (by 1) in order to process the following instruction.
Decode:
The instruction is then decoded so that it can be interpreted in the next part of the cycle.
Execute:
The CPU passes the decoded instruction as a set of control signals to the appropriate
components within the computer system. This allows each instruction to be carried out in its
logical sequence.
Figure shows how the Fetch–Decode–Execute cycle is carried out in the von Neumann computer
model.

NAVID SAQIB : 03334259883 6


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

Fetch–Decode–Execute cycle flowchart

Cores, cache and internal clock:


We'll now talk about the variables that affect a CPU's performance. The function of the system
clock should be taken into account initially. The clock establishes the synchronization clock
cycle for all computer activities. The control bus, as previously indicated, sends timing signals to
make sure everything is perfectly synchronized. The computer's processing speed increases in
tandem with clock speed (a typical contemporary figure is 3.5GHz, or 3.5 billion clock cycles per
second).
NAVID SAQIB : 03334259883 7
CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

It isn't feasible to state that utilizing a higher clock speed inevitably improves a computer's
overall performance, even though the computer's speed may have grown. Other elements must
be taken into account, such as:
1. It is important to consider the width of the address bus and data bus, as they have been
known to impact computer performance.
2. Consideration should be given to overclocking. By going into the BIOS (Basic
Input/Output System) and adjusting the settings, one can modify the clock speed.
Nevertheless, employing a clock speed greater than what the machine was intended to
support can cause issues, such as:
i. execution of instructions outside design limits can lead to seriously unsynchronized
operations (i.e. an instruction is unable to complete in time before the next one is
due to be executed) – the computer would frequently crash and become unstable.
ii. overclocking can lead to serious overheating of the CPU again leading to unreliable
performance.

3. Cache memory utilization can also enhance CPU performance. Cache memory offers
substantially faster data access times than RAM since it is housed inside the CPU, as
opposed to RAM. CPU performance is increased by using cache memory to store
frequently used instructions and data that must be accessed more quickly. A CPU that
wants to read data from memory will first look in the cache, and if that doesn't have the
necessary information, it will then go on to main memory or RAM. The CPU performs
better the greater the cache memory size.
4. Changing the number of cores used in a computer can enhance its performance.
An ALU, a control unit, and the registers comprise one core. Numerous computers have
either a quad core CPU, which has four cores, or a twin core CPU, which has two cores.
Increasing the number of cores reduces the requirement to keep clock rates rising. But,
as the CPU must interact with each core, doubling the number of cores does not
automatically result in a doubling of the computer's performance; rather, performance
will be decreased overall.
For instance, a dual core CPU uses a single channel to interact with both cores, which
limits part of the performance gain that could otherwise be possible:

while, with a quad core the CPU communicates with all four cores using six channels,
considerably reducing potential performance:

NAVID SAQIB : 03334259883 8


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

It is therefore necessary to examine each of these elements while evaluating computer


performance. Recapitulating these ideas:
 increasing bus width (data and address buses) increases the performance and speed of a
computer system.
 increasing clock speed will potentially increase the speed of a computer.
 a computer’s performance can be changed by altering bus width, clock speed and use of
multi-core CPUs.
 use of cache memories can also speed up a CPU’s performance.

Instruction set:
Instructions are a series of operations that are sequentially decoded in a computer system.
Every operation will provide instructions to the CPU's ALU and CU. An operand and an opcode
make up an operation.

The opcode informs the CPU what The operand is the data which needs to
operation needs to be done be acted on or it can refer to a register in
the memory

There are actually only a certain number of opcodes that can be used; these are referred to as
the instruction set because the computer must comprehend the operation in order for it to be
performed. Every piece of computer software has a set of instructions (that must be turned into
binary). The process by which the CPU processes each instruction one after the other is known
as the fetch-decode-execute cycle.
The X86 instruction set is an example of a widespread CPU standard found in many
contemporary systems. If the computer is built around the X86 CPU, then all designs will have
nearly the same instruction set, even though various computer manufacturers will use their
own internal circuitry designs. For instance, while being built on very distinct electrical
architectures, the X86 instruction sets used by AMD Athlon and Intel Pentium CPUs are nearly
identical.
Instruction sets are the low-level language instructions that tell the CPU how to do an
operation; be careful not to mix them with programming code. To translate program code into
an instruction set that a computer can understand, interpreters or compilers are required. ADD,
JMP, LDA, and other operations are a few instances of instruction set operations.)
Embedded systems:
A hardware and software combination created with a specific set of tasks in mind is called an
embedded system. Electronic, electrical, or electro-mechanical hardware makes up the system.
Foundations for embedded systems include:
microcontrollers: this has a CPU in addition to some RAM and ROM and other peripherals all
embedded onto one single chip (together they carry out a specific task)
NAVID SAQIB : 03334259883 9
CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

microprocessor: integrated circuit which only has a CPU on the chip (there is no RAM, ROM or
peripherals – these need to be added)
system on chips (SoC): this may contain a microcontroller as one of its components (they
almost always will include CPU, memory, input/output (I/O) ports and secondary storage on a
single microchip)
An embedded system will have a specific set of tasks; Figure 3.6 summarises how embedded
systems work in general:

When installed in a device, the data may be automatically obtained from a source like a sensor
or manually entered by the user (e.g., by turning a dial on an oven control panel or selecting a
temperature from a keypad). This sensor input will either be digital or analog in form; examples
of such inputs would be fuel pressure or oxygen levels in an automobile's engine management
system. The embedded system's role will then be carried out by the output, which will transmit
signals to the components that need to be managed (e.g., lower fuel levels in the engine or
boost power to the oven's heating elements).
Depending on the device, embedded systems are either programmable or non-programmable.
Non-programmable devices need, in general, to be replaced if they require a software upgrade.
Programmable devices permit upgrading by two methods:

 connecting the device to a computer and allowing the download of updates to the
software (for example, this is used to update the maps on a GPS system used in a
vehicle)
 automatic updates via a Wi-Fi, satellite or cellular (mobile phone network) link (for
example, many modern cars allow updates to engine management systems and other
components via satellite link).

NAVID SAQIB : 03334259883 10


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

There are definite benefits and drawbacks of devices being controlled using embedded systems:

Embedded systems can be remotely controlled using a computer or smartphone since they can
be connected to the internet. For instance, remotely controlling a set-top box to record a
television show or turning on or off the central heating system while you're away from home.
Engineers can optimize their designs for embedded systems to lower the physical size and cost
of the devices because these systems are specialized and committed to a limited range of
functions. Applications range widely, from a single microcontroller (found in an MP3 player, for
instance) to a sophisticated array of several units (found in a medical imaging system, for
instance).
It is important to note that an embedded system is not what a computer is. Since computers
are multi-functional—that is, they can perform a wide range of functions that may be
customized with different software—they cannot be categorized as embedded systems.

Examples of the use of embedded systems:


Motor vehicles:
Modern cars have many parts that rely on embedded systems to function correctly. Figure shows some
of the many components that are controlled in this way.

NAVID SAQIB : 03334259883 11


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

Set-top box:

In this instance, an embedded system is used by a set-top box to enable functions like television
show recording and replay. When the user is not at home, they can use an internet-enabled
device to operate this remotely, or they can utilize the interface panel when they are home.
Many of the tasks involving inputs from various sources, like a satellite signal (where the
incoming signal needs to be decoded) or a Solid-State Device (SSD) (where television programs
can be saved or retrieved), will be handled by the embedded system.

Security systems:
Embedded systems are used in many security devices:

NAVID SAQIB : 03334259883 12


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

The security code is set in RAM and the alarm activated or deactivated using the keypad. Data
from sensors is sent to the controller which checks against values stored on the SSD (these
settings are on SSD rather than RAM in case the sensitivity needs to be adjusted). An output can
be a signal to flash lights, sound an alarm or send a message to the home owner via their
mobile phone. Again, the home owner can interface with the system remotely if necessary.
Lighting systems:
Modern sophisticated lighting systems, from basic lighting for the house to large architectural
lighting systems, incorporate embedded technologies. Here, we'll focus on the lighting system
seen in a large office. The illumination must be controlled by the system while accounting for:
 the time of day or day of the week
 whether the room is occupied
 the brightness of the natural light.
An embedded system can automatically control the lighting using a number of inputs (such as
light sensors) and key data stored in memory. Again, this fits very well into the system
described.
In an office setting, knowing the time of day or day of the week is crucial since the system may
conserve energy by switching to low lighting settings when the space is empty. The second
bullet point (above) has the ability to override this; if there is movement in the workplace, the
proper lighting levels will be restored automatically. The lights might be automatically dimmed
on a highly sunny day by the system, only turning on lighter when the amount of natural light
drops below a predetermined threshold. Embedded systems have the ability to manage various
internal and external lighting systems, such as light displays on buildings to mark important
occasions or fountains. In the event of an emergency, they are also utilized to turn on
emergency lighting in things like aero planes.
Vending systems:
A significant number of embedded systems are used in vending machines. Typically, they
employ microcontrollers to manage certain operations that are commonly linked with vending
machines:

NAVID SAQIB : 03334259883 13


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

At the heart of the vending machine is an embedded system in the form of a microcontroller.
Inputs to this system come from the keypad (item selection) and from sensors (used to count
the coins inserted by the customer, the temperature inside the machine and a ‘tilt sensor’ for
security purposes). The outputs are:
 actuators to operate the motors, which drive the helixes (see figure below) to give the
customers their selected item(s)
 signals to operate the cooling system if the temperature is too high
 item description and any change due shown on an LCD display panel
 data sent back to the vending machine company so that they can remotely check sales
activity (which could include instructions to refill the machine) without the need to visit
each machine.

All of this is controlled by an embedded system which makes the whole operation automatic but
also gives immediate sales analysis which would otherwise be very time consuming.
Washing machines:
Embedded systems are used to control a large number of "white goods," including microwaves,
washing machines, refrigerators, and other appliances. Each one is equipped with a keypad or
dials for adjusting the temperature, washing cycle, and cooking time. The embedded system
uses this data as input to complete the necessary task without the need for additional human

NAVID SAQIB : 03334259883 14


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

participation. These "white goods" can also be controlled remotely with a computer or
smartphone that can connect to the internet, just like other gadgets.

Input Devices:
Barcode scanners (readers):
A barcode is made up of parallel, differing-thickness black and bright lines. Every number from
0 to 9 is represented by a different set of lines. There are several barcode techniques for
displaying these numbers. The example that we will use uses distinct codes for the digits that
appear on the left and right of the barcode:

Diagram of guard bars Sample barcode


Each digit in the barcode is represented by bars of 1 to 4 blocks thick as shown in Figure 3.15.
Note there are different patterns for digits on the left-hand side and for digits on the right-hand
side.

The section of barcode to represent the number 5 4 3 0 5 2 would therefore be:

NAVID SAQIB : 03334259883 15


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

Two black lines and two light lines make up each digit. Every digit is represented by the same
width. The numbers on the right always start with a dark bar and have an even number of dark
elements compared to the odd number of dark elements on the left. A barcode can be scanned
in any direction thanks to this configuration.
So, what happens when a barcode is scanned?

 the barcode is first of all read by a red laser or red LED (light emitting diode)
 light is reflected back off the barcode; the dark areas reflect little or no light, which
allows the bars to be read
 the reflected light is read by sensors (photoelectric cells)
 as the laser or LED light is scanned across the barcode, a pattern is generated, which is
converted into digital data – this allows the computer to understand the barcode
 for example: the digit ‘3’ on the left generates the pattern: (where L = light and D =
dark), this has the binary equivalent of: (where L = 0 and D = 1).
Barcodes are most commonly found at the checkout in supermarkets. There are several other
input and output devices at the checkout:
Input and output devices at a checkout:

After the barcode is scanned, what happens next?


 The barcode number, often referred to as the key field in the stock item record, is
searched for in the stock database; each stock item is uniquely identified by this key
field.
 when the barcode number is found, the stock item record is looked up

NAVID SAQIB : 03334259883 16


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

 The checkout (or point of sale terminal, POS) receives the price and further stock item
details.
 every time the barcode is scanned, the number of stock items in the record is lowered
by one.
 this new value for number of stocks is written back to the stock item record
 the number of stock items is compared to the re-order level; if it is less than or equal to
this value, more stock items are automatically ordered
 A flag is added to the record to cease placing new orders each time the stock item
barcode is read after an order for further stock items is generated.
 when new stock items arrive, the stock levels are updated in the database.

Advantages to the management of using barcodes

 considerably quicker and simpler to adjust the pricing of in-stock items


 substantially improved, more recent sales data and trends
 There's no need to price every stock item on the shelves, saving the management time
and money.
 makes it easier to check customer purchasing patterns by connecting barcodes to things
 like customer loyalty cards, which enables automatic stock control.

Advantages to the customers of using barcodes

 quicker checkout lines because employees don't have to recall or check item pricing
 There are fewer billing errors made to clients.
 The client receives an itemized bill.
 Savings can be transferred to the client
 improved monitoring of "sell by dates" to ensure fresher food.

Quick response (QR) codes:


The quick response (QR) code is an additional kind of barcode. This consists of a light
background with a matrix of filled-in dark squares. One website that promotes rock music
products, for instance, is linked to via the QR code in Figure. The code contains a web address.
QR codes can hold considerably more information than the more conventional barcodes
described earlier.

NAVID SAQIB : 03334259883 17


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

Description of QR codes:

 A block of tiny, light- and dark-colored squares called pixels makes up a QR code.
Currently, the QR code may include up to 4296 characters, which translates to 7089
digits. Additionally, internet addresses can be encoded within the code. This contrasts
with a barcode's limit of 30 digits. But when more and more information is added, the
QR code's structure grows increasingly intricate.
 The final small corner square is needed to guarantee that the camera shot is taken at
the correct size and angle when the QR code is scanned. The three huge squares at the
corners of the code serve as a kind of alignment.

QR codes may be scanned anywhere, thanks to the proliferation of smartphones and tablets
that provide internet access while on the go. This has several applications:

 promoting goods with QR codes, like the one in Figure


 giving automatic access to a website or contact telephone number
 electronically keeping boarding passes at railway and airport terminals (Figure)

By using the built-in camera on a mobile smartphone or tablet and by downloading a QR app
(application), it is possible to read QR codes on the move using the following method:

 point the camera of your phone or tablet at the QR code.


 the app will now process the image taken by the camera, converting the squares into
readable data

NAVID SAQIB : 03334259883 18


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

 the browser software on the mobile phone or tablet automatically reads the data
generated by the app; it will also decode any web addresses contained within the QR
code
 the user will then be sent to a website automatically (or if a telephone number was
embedded in the code, the user will be sent to the phone app)
 if the QR code contained a boarding pass, this will be automatically sent to the
phone/tablet.

Advantages of QR codes compared to traditional barcodes


 They have a lot more capacity for information.
 Less errors will occur because of the larger capacity of QR codes, which enable the use
of built-in error-checking systems. Because standard barcodes don't include much data
redundancy, or duplicate data, it is unable to protect against incorrectly printed or
damaged barcodes.
 Unlike barcodes, which require costly laser or LED (light-emitting diode) scanners to
read, QR codes are simpler to read and can be read by smartphones' or tablets'
cameras.
 Sending QR codes as text messages or photos is simple.
 Additionally, QR codes can be encrypted, which offers them more security than
conventional barcodes.
Disadvantages of QR codes compared to traditional barcodes
 There are multiple QR formats available.
 At tagging is the process of sending harmful codes through QR codes. Anyone can do
this because there are a ton of free programs accessible for users to generate QR codes.
Writing malicious code and embedding it into a QR code is not too difficult. The
malicious code writer might be able to access all data on the user's phone, including
stored passwords, address books, and photos, if the code is scanned. In addition, the
user might be forwarded to a phony website, or perhaps a virus could be downloaded.

New developments:
The greater capacity to integrate advertising logos has led to the development of newer QR
codes, known as frame QR codes (see Figure 3.19). There is a "canvas area" with frame QR
codes where you can add photos or artwork to the code itself. In contrast to standard QR
codes, this software is typically not free.

Digital cameras:

The more conventional film-based cameras have been mostly superseded by digital models.
Before the photographer could view their work, the film needed to be developed and then
printed.
Due to the inability to remove undesired photos, these cameras were costly to operate.

NAVID SAQIB : 03334259883 19


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

These days, digital cameras just connect to a computer via a USB port or Bluetooth, which
allows photo files to be sent wirelessly.

These cameras are controlled by an embedded system which can automatically carry out the
following tasks:
 adjust the shutter speed
 focus the image automatically
 operate the flash gun automatically
 adjust the aperture size
 adjust the size of the image
 remove ‘red eye’ when the flash gun has been used
 and so on.
What happens when a photograph is taken
 When light enters a light-sensitive cell through the lens, it becomes a picture. This cell is
composed of millions of tiny sensors that function as photodiodes, or charge coupling
devices (CCDs), which convert light into electricity.
 Since each sensor is a tiny component that makes up the image, they are frequently
referred to as pixels, or picture parts.
 An analogue to digital converter (ADC) transforms the image into tiny electric charges,
which are then passed through an ADC to form a digital image array.
 The ADC then converts each pixel's electric charges into brightness levels (now in a
digital format); for instance, an 8-bit ADC provides 28 (256) possible brightness levels
per pixel (such as brightness level 01110011).
 apart from brightness, the sensors also measure color which produces another binary
pattern; most cameras use a 24-bit RGB system (each pixel has 8 bits representing each
of the 3 primary colors), which means each pixel has a red value (0 to 255 in denary), a
green value (0 to 255) and a blue value (0 to 255); for example, a shade of orange could
be 215 (red), 165 (green) and 40 (blue) giving a binary pattern of 1101 0111 1010 0101
0010 1000 (or D7A528 written in hex)

NAVID SAQIB : 03334259883 20


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

 the number of pixels determines the size of the file used to store the photograph
 the quality of the image depends on the recording device (how good the camera lens is
and how good the sensor array is), the number of pixels used (the more pixels used, the
better the image), the levels of light and how the image is stored (JPEG, raw file, and so
on).

Mobile phones have caught up with digital cameras as regards number of pixels. But the
drawback is often inferior lens quality and limited memory for the storage of photos. But this is
fast changing and, at the time of writing, many smartphones now have very sophisticated optics
and photography software as standard.

Keyboards:
Keyboards are by far the most common method used for data entry. They are used as the input
devices on computers, tablets, mobile phones and many other electronic items.
The keyboard is connected to the computer either by using a USB connection or by wireless
connection. In the case of tablets and mobile phones, the keyboard is often virtual or a type of
touch screen technology.

As shown in Chapter 1, each character on a keyboard has an ASCII value. Each character pressed
is converted into a digital signal, which the computer interprets.

NAVID SAQIB : 03334259883 21


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

They are a relatively slow method of data entry and are also prone to errors, however
keyboards are probably still the easiest way to enter text into a computer. Unfortunately,
frequent use of these devices can lead to injuries, such as repetitive strain injury (RSI) in the
hands and wrists.

This issue can be solved using ergonomic keyboards, which have the keys placed differently as
seen in Figure. Additionally, they are made to support the hands and wrists more when typing
for extended periods of time.
A description and graphic of how the computer recognizes a letter pushed on the keyboard are
provided below (Figure).
 At the base of the keys is a membrane or circuit board.
 When the 'H' key is hit in Figure, a circuit is completed as indicated.
 The computer's CPU can then identify the key that has been pressed.
 In order to determine which character, the key press represents, the CPU consults an
index file.
 There is an ASCII value for every character on a keyboard (see Chapter 1).

Microphones:
Microphones can be external devices connected via Bluetooth or USB ports, or they can be
integrated within the computer itself. A microphone's ability to transform sound waves into an
electric current is depicted in Figure. The generated current is transformed into a digital format
for processing or storing by a computer (on, for example, a CD).

NAVID SAQIB : 03334259883 22


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

 The creation of sound vibrates the atmosphere.


 The microphone's diaphragm starts to shake when it detects vibrations in the air.
 The cone that is attached to the diaphragm is encircled by a copper coil. The copper coil
rotates back and forth as a result of the cone's inward and outward movements in
response to the diaphragm's vibration.
 An electric current is produced when the coil cuts through the magnetic field
surrounding the permanent magnet as a result of its forward and backward motion.
 After that, the electric current is either sent to a recording device or amplified. The
nature of the electric current is analogous.

It is also possible to send the microphone's electric current output to a computer, where a
sound card will transform it into a digital signal that may be saved on the computer. What
happens when a microphone picks up the word "hut" and converts it into digital values is
depicted in the following diagram:

Examine Figure. The microphone has taken up the word "hut" as a sound wave. This is then
transformed into digital values via an analogue to digital converter (ADC), which may be saved
in a computer or altered as needed with the right software.

Optical mouse:
One type of pointing device is an optical mouse. It takes 1500 pictures per second with small
cameras. The optical mouse functions on almost any surface, in contrast to the more
antiquated mechanical mouse.
A complementary metal oxide semiconductor (CMOS) detects the red-light reflection from a
red LED placed in the mouse's base after it bounces off the surface. To represent the reflected
red light, the CMOS creates electric pulses, which are then transmitted to a digital signal
processor (DSP). As the mouse moves around the surface, the processor can now calculate its
coordinates based on how the visual patterns change. The on-screen pointer can then be
moved by the computer to the coordinates that the mouse gave.
NAVID SAQIB : 03334259883 23
CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

Benefits of an optical mouse over a mechanical mouse


 It is more dependable because there are no moving parts.
 No part of the mechanical structure can hold dirt.
 It is not necessary to use any specific surfaces.

Most optical mice use Bluetooth connectivity rather than using a USB wired connection. While
this makes the mouse more versatile, a wired mouse has the following advantages:

 no signal loss because the signal pathway (wire) is always present


 operates more affordably (no need to charge or purchase new batteries).
 reduced environmental problems (used batteries don't need to be disposed of).

2D and 3D scanners:
Scanners are either two dimensional (2D) or three dimensional (3D).
2D scanners

These are the most popular types of scanners, and they are often used for scanning hard copy
(paper) documents. An electronic version of the image is created so that it can be kept on a
computer.
There are several steps involved in scanning a document:
Scanners that have optical character recognition (OCR) software installed can convert scanned
text into a text file format. This implies that by importing the scanned image into a word
processor, it can now be modified and altered.
When an image or photograph was used as the original document, it can be scanned to create
an image file, such as a JPEG.

3D scanners:
Solid items can be scanned by 3D scanners, which create three-dimensional images. These
scanners take pictures at various positions along the x, y, and z coordinates since solid things
have these coordinates. A digital representation of the solid thing is created.
To create a working model of the scanned image, the scanned images can be delivered to a 3D
printer or used in computer aided design (CAD).
3D scanners employ a wide range of technologies, including white light, magnetic resonance,
lasers, and more. A detailed examination of these is outside the purview of this book, but the
second application that follows outlines the technology underlying one type of 3D scanning.

Application of 2D scanners at an airport:

NAVID SAQIB : 03334259883 24


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

Passports are examined at airports using 2D scanners. They create digital images that are a
representation of the passport pages by using OCR technology. OCR technology makes it
possible to modify these digital images in a variety of ways.

For instance, the OCR program may examine these pictures, pick out the text, and then
automatically enter the text into the appropriate fields of a database that already exists.
Depending on how the data is going to be used, the text may be stored in ASCII format.

The passport's two-dimensional photo is frequently scanned and saved as a JPEG file at
airports. Using a digital camera, the passenger's face is also captured (a 2D image is taken so it
can be matched to the image acquired from the passport). Software for face recognition and
detection is used to compare the two digital photos. Important facial features are contrasted.

Some of the positions that the face recognition software uses are displayed on the face in
Figure. The software verifies each position when attempting to compare two photos of faces.
Information like:

 distance between the eyes


 width of the nose
 shape of the cheek bones
 length of the jaw line
 shape of the eyebrows,
are all used to uniquely identify a given face.
When the image from the passport and the image taken by the camera are compared, these key
positions on the face determine whether or not the two images represent the same face.

Utilizing computed tomographic (CT) scanners for 3D scanning Using computed tomographic
(CT) scanners, a solid object can be rendered into a 3D image. This is based on tomography
technology, which essentially uses a number of extremely thin "slices" to build up an image of
the solid object. The 3D solid item is represented by each of these 2D "slices."
Although there are several different techniques, X-rays, radio waves, or gamma imaging are
used to build up each slice. The computer memory then stores each "slice" as a digital image.
The computer memory has a digital representation of the entire solid thing.

NAVID SAQIB : 03334259883 25


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

There are several names for this kind of tomographic scanner, depending on how the image is
created. As an illustration:

Name CT Scanner MRI SPECT


Stands for Computerized Magnetic resonance Single photo
tomography images emission computer
tomography
Uses X-rays Radio frequencies Gamma rays

Here is a simple example of how tomography works:

Touch screens:
Touch screens are now a very common form of input device. They allow simple touch selection
from a menu to launch an application (app). Touch screens allow the user to carry out the same
functions as they would with a pointing device, such as a mouse. There are three common types
of touch screen technologies currently being used by mobile phone and tablet manufacturers.
Similar technologies are used in other touch screen applications (for example, food selection at
a fast-food restaurant):
 capacitive
 infrared
 resistive (most common method at the moment).

Capacitive touch screens:


Glass (a protective layer), a transparent electrode (conductive layer), and a glass substrate
make up capacitive touch screens. The electrostatic field of the conductive layer changes when
bare fingers or a specialized pen come into contact with the screen since human skin is a
conductor of electricity. The coordinates of the point of touching can be found by using the
installed microcontroller to calculate the location of this change.

NAVID SAQIB : 03334259883 26


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

These days, capacitive touch displays come in two primary varieties:


 surface
 projective.

Although the two approaches operate somewhat differently from one another, they share the
same overall framework, as seen in Figure.
The corners of a screen contain sensors when using surface capacitive screens. Additionally,
tiny voltages are supplied to the screen's corners to create an electric field. When a finger
touches the screen, electricity is drawn from every corner, which lowers capacitance. The
instant at which the finger touched the screen is ascertained by a microcontroller by
measurement of the capacitance reduction. Only a bare finger or stylus can be used with this
system.
Surface capacitive panels and projective capacitive screens function somewhat differently. The
X-Y matrix layout now resembles the transparent conductive layer. A three-dimensional (3D)
electrostatic field is produced as a result. The 3D electrostatic field is disrupted when a finger
contacts the screen, enabling a microcontroller to identify the point of contact's coordinates.
Bare fingertips, a stylus, and thin cotton or surgical gloves are all needed to operate this device.
Additionally, it supports multi-touch functionality (such pinching and sliding).

Advantages compared to the other two technologies


 superior clarity of images compared to resistive screens, particularly in direct sunlight
 incredibly robust screens with excellent scratch resistance
 multi-touch is possible with projective capacitive screens.

Disadvantages compared to the other two technologies


 Surface capacitive panels require a special stylus or just your fingertips to operate.
 They are susceptible to electromagnetic radiation, which includes microwaves and
magnetic forces.

Infrared touch screens:


Glass panels equipped with a variety of sensors and infrared transmitters are used in infrared
touch screens.

NAVID SAQIB : 03334259883 27


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

The infrared radiation is picked up by the sensors. The amount of infrared radiation that
reaches the sensors is decreased if any of the infrared beams are interrupted (for instance, by a
finger contacting the screen). A microcontroller receives the sensor readings and uses them to
determine where the screen was touched:

Advantages compared to the other two technologies


 Allows multi-touch features
 possesses strong screen durability
 A scratched or broken screen has no effect on operability.

Disadvantages compared to the other two technologies


 The screen may be moisture- or water-sensitive.
 The infrared beams could be accidentally activated if they are disrupted in any manner.
 Occasionally susceptible to interference from light.

Resistive touch screens:


Two layers of electrically resistant material with a voltage put across them make up resistive
touch screens. One side of the flexible polymer (polyethylene) top layer is coated with a
resistive material. The underlying layer is likewise composed of glass, with one side coated with
a resistive material (often indium tin oxide). An inert gas (like argon) or air separates these two
layers. The two layers come into contact when something touches the upper polyethylene
surface. Now that the resistive material has been applied to both layers, a circuit is complete
and electricity is flowing. The location of the voltage shift is identified as the point of contact.

NAVID SAQIB : 03334259883 28


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

The voltage produced when the two resistive layers come into contact is converted by a
microcontroller into digital data, which is then sent to the microprocessor.

Advantages compared to the other two technologies


 strong resistance against water and dust
 Suitable for use with gloves, bare fingers, or a stylus.

Disadvantages compared to the other two technologies


 Low touch sensitivity—you may need to apply more pressure at times—
 Does not allow for multi-touch functionality
 Visibility is poor in direct sunshine.
 The polymer screen is susceptible to scratches.

Output devices:

Actuators:
It is typically required to employ an actuator when using a computer to control equipment like
a conveyer belt or valve in order to, for example, start/stop the belt or open/close the valve. A
motor, solenoid, relay, or other mechanical or electromechanical device is an actuator. We'll
use a solenoid as an example, which produces linear motion by converting an electrical signal
into a magnetic field:

When a current is provided to the coil, a plunger—such as a magnetized metal bar—placed


inside it will move (see Figure). As a result, the solenoid might, for instance, control a switch or
a valve. Additionally, there are instances of rotational solenoids that employ a cylindrical coil. In
this instance, supplying a current to the coil would result in the plunger rotating.

NAVID SAQIB : 03334259883 29


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

Light projectors:
Two popular kinds of light projectors are as follows:
 Liquid crystal display (LCD)
 digital light projector (DLP).

Computer output can be projected onto bigger screens or even interactive whiteboards using
projectors. They are frequently utilized in multimedia applications and presentations. The two
projector technologies' fundamental modes of functioning are contrasted in the next section.

Digital light projectors (DLP):


The secret to the operation of these devices is the utilization of millions of micro mirrors on a
small digital micromirror device (DMD chip).
The resolution of the digital image is determined by the quantity and arrangement of micro
mirrors on the DMD chip. The micro mirrors are ON when they tilt in the direction of the light
source. The micro mirrors are off when they tilt away from the source of light. A pixel of light or
black is produced on the projection screen as a result. The micro mirrors have the ability to turn
on and off thousands of times per second, producing a totally of 1024 different shades of grey.
For instance, if the mirror turns on more frequently than it turns off, a lighter shade of grey will
be created.
A bright white light source (for example, from a xenon bulb) passes through a color filter on its
way to the DMD chip. The white light is split into the primary colors: red, green and blue – the
DLP projector can create over 16 million different colors. The ON and OFF states of each micro
mirror are linked with colors from the filter to produce the colored image.

Note: The DMD chip is a microoptoelectromechanical system (MOEMS) with thousands of tiny
mirrors arrayed on its surface that are composed of polished aluminum metal. They are all
roughly 16µm (16 × 10-6 meters) in size, and each one represents a pixel in the image that is on
the screen.

Liquid crystal display (LCD) projector:


Compared to DLP, this technology is older. In essence, an LED light beam of great intensity
shines through an LCD panel and onto a screen. Below is a description of how these functions in
theory:
 An intense white light beam is produced by an LED or light bulb inside the projector
body.
 This light beam is then directed toward a collection of dichromic mirrors, which are
covered in chromatic coatings and reflect light back at various wavelengths.

NAVID SAQIB : 03334259883 30


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

 These mirrors reflect white light at wavelengths that correspond to red, green, and blue
light components.
 These three distinct colors of light go through three LCD displays (each screen is made
up of thousands of tiny pixels that can either let light through or block it, creating a
monochromatic image).
 As a result, the original image is now created in three different versions: one that is the
entire image in various shades of red, another that is the entire image in various shades
of green, and a third that is the entire image in various shades of blue.
 These images are then combined again using a unique prism to create a full-color image.
 At last, the picture is projected onto a screen via the projector lens.

Advantages and disadvantages of the two types of projectors:

Advantages Disadvantages
higher contrast ratios image tends to suffer from
higher reliability/longevity ‘shadows’ when showing a
moving image
quieter running than LCD DLP do not have grey
projector components in the image
uses a single DMD chip, the color definition is
Digital light projector (DLP) which mean no issues lining frequently not as good as LCD
up the images projectors because the color
smaller and lighter than LCD saturation is not as good
projector (color saturation is the
they are better suited to intensity of a color)
dusty or smoky atmospheres
than LCD projectors
give a sharper image than although improving, the
LCD projector DLP projectors contrast ratios are not as
good as DLPs

NAVID SAQIB : 03334259883 31


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

have better color saturation LCD projectors have a limited


than DLP projectors life (that is, the longevity is
not as good as DLPs)
more efficient in their use of since LCD panels are organic
LCD projector energy than DLP technology in nature, they tend to
– consequently they generate degrade with time (screens
less heat turn yellow and the colors
are subsequently degraded
over time)

Inkjet and laser printers:

Inkjet printers:
Basically, inkjet printers consist of:
 a print head made up of nozzles that squirt ink droplets onto paper to create characters
 an ink cartridge, or cartridges; one cartridge each of the three colors (magenta, yellow,
and blue) and black, or one cartridge that contains all three colors plus black. (Note: Six
colors are used in some systems.)
a paper feed that automatically feeds the printer with papers as needed
 a stepper motor and belt that moves the print head assembly across the page from side
to side.

There are currently two distinct technologies used to create the ink droplets:

Thermal bubble: The ink evaporates due to the localized heat produced by small resistors. As a
result, a tiny bubble is formed in the ink, which eventually causes part of the ink to be ejected
from the print head onto the paper. A little vacuum is produced as the bubble bursts, allowing
new ink to be sucked into the print head. Until the printing cycle is over, this keeps happening.

Piezoelectric: each nozzle has a crystal at the back of the ink reservoir. A little electric charge is
applied to the crystal, causing it to vibrate. As a result of this vibration, ink is forced onto the
paper and more ink is drawn in for additional printing.

The following series of actions occur when a user wants to print a document from an inkjet
printer. The fundamental processes in the printing process are the same regardless of the
technology being used.

NAVID SAQIB : 03334259883 32


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

Laser printers:
Instead of using liquid ink, laser printers employ dry powder ink and capitalize on the
characteristics of static electricity to create text and images. Laser printers print one entire page
at once, in contrast to inkjet printers. Four toner cartridges are needed for color laser printers:
blue, cyan, magenta, and black. The printing process is the same for both monochrome and
color printers, but color dots are used to create the text and graphics.

Applications of inkjet and laser printers:


Depending on what characteristics an inkjet or laser printer has that make it the best output
device for a certain application, one can decide which to employ.

Inkjet printer:
Compact ink cartridges and paper trays are not a problem for inkjet printers because they are
often used for one-off photographs or small-scale color printing (a few sheets at a time).

Laser printer:
Any application that requires high volume printing (in color or monochrome) would choose the
laser printer (for example, producing a large number of high-quality flyers or posters for
advertising). These devices produce high-quality printouts and are very fast when making
multiple copies of a document. Large toner cartridges and roomy paper trays that can
accommodate more than a ream of paper are two features that laser printers have.

3D printers:
Realistic, functional solid items are created with 3D printers. Their primary foundation lies in
the technology of inkjet and laser printers. Paper, ceramic, powdered metal, and powdered
resin are some of the materials used to build up the solid product layer by layer.
An industrial 3D printer was used to create the alloy wheel shown in Figure 3.42.
It was created via binder 3D printing, a process that involved building several layers of metal
powder that were each 0.1 mm thick. We go over several more instances below.

NAVID SAQIB : 03334259883 33


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

Some of the characteristics of 3D printing are described in the following information:


 3D printers come in a variety of sizes, from the size of a microwave oven to that of a
small automobile.
 Using additive manufacturing, which builds an object layer by layer, is what 3D printers
do. This is in stark contrast to subtractive manufacturing, which uses material removal
to create an object. For instance, layer by layer, utilizing powdered stone, a statue
would be constructed using a 3D printer until the desired shape was achieved. In order
to create the final product, the subtractive method would include carving the statue out
of solid stone (i.e., eliminating the stone that is not needed). Similar to how CNC
machining forms an object by removing metal, 3D printing creates the same product by
layering metal powder into the object.
 Inkjet technology is used in direct 3D printing; a print head can move left to right much
as in a traditional printer. To add layers to an item, the print head can also move up and
down.
 Direct 3D printing and binder 3D printing are comparable. Nevertheless, this technique
requires two passes for every layer: a dry powder is sprayed during the first pass, and a
binder (a kind of glue) is sprayed during the second pass to create a solid layer.
 Modern technologies are expanding the range of items that can be produced by
hardening liquid polymers with lasers and UV radiation.

How to create a solid object using 3D printers:


The process of creating an object with a 3D printer involves several steps. Below is a summary
of the steps:

NAVID SAQIB : 03334259883 34


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

Uses of 3D printing:
Since 3D printing will alter manufacturing practices across numerous industries, it is thought to
be the next "industrial revolution." The list that follows is just a sampling of what we know can
be produced with these printers; in the years to come, it will likely fill a book:
 Prosthetic limb coverings can be customized to precisely suit the limb.
 creating objects that enable precise reconstructive surgery (such as facial reconstruction
after an accident); the pieces created using this method have higher precision in their
design since they can be created using an accurate scan of the skull.
 Manufacturers in the aerospace industry are considering employing 3D technology to
create wings and other components; the benefit will be lightweight precision pieces.
 Fashion and art: 3D printing fosters the development of fresh, imaginative concepts.
 producing parts for products that are no longer in production, such as suspension
components for classic cars.

These are just a few of the exciting applications which make use of this new technology.

LED and LCD screens

LED screens:
Light emitting diodes (LEDs) are small devices that make up an LED screen. Every LED has one of
three colors: red, green, or blue. An extensive array of colors can be produced by controlling
the brightness of each LED by altering the electric current supplied to it.
Large outdoor displays typically employ this kind of screen because of the brilliant colors it
produces. OLED (organic LED) screens have been introduced as a result of recent developments
in LED technology (see later).
The reader needs to be very careful here. Many television screens are advertised as LED when
in fact they are LCD screens which are backlit using LEDs.

LCD screens:
Tiny liquid crystals make up LCD panels. Variations in applied electric fields have an impact on
the array of pixels composed of these microscopic crystals. This book does not cover how this
operates. However, it's crucial to understand that LCD screens need backlighting in order to
function.
LCD panels are back-lit utilizing light-emitting diode (LED) technology; these screens are not to
be mistaken with pure LED screens, as LCDs do not produce light. An excellent contrast and

NAVID SAQIB : 03334259883 35


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

brightness range are produced by the use of LED backlighting. LCD panels were backlit by cold
cathode fluorescent lamps (CCFLs) prior to the usage of LEDs.
The light source of CCFLs is essentially provided by two fluorescent tubes that are placed
beneath the LCD screen. When LEDs are utilized, the LCD panel is backed by a matrix of small
blue-white LEDs.
The use of LEDs for back lighting has grown in popularity because they have several benefits
over more antiquated CCFL technology, including:
 LEDs virtually always attain their maximum brightness straight away; they don't need to
"warm up" to achieve optimal efficiency.
 While CCFL has a somewhat yellowish tinge, LEDs produce a whiter light that sharpens
the image and increases the vibrancy of the colors.
 LED lighting is brighter, which enhances the definition of color.
 Compared to displays with CCFL technology, LED monitors are significantly slimmer.
 Because LEDs never fade, the technology is more dependable and the product is more
consistent.
 Because LEDs use so little power, they use less energy and generate less heat.

Organic light emitting diodes (OLED):


Organic light emitting diodes are used in more recent LED technology (OLEDs). These employ
organic materials, which are composed of carbon compounds, to produce very flexible
semiconductors. Two charged electrodes—a glass anode and a metallic cathode—are
positioned between organic sheets. The electrodes emit light when subjected to an electric
field. Thus, backlighting is not necessary in any way. This makes ultra-thin screens possible. It
also implies that since OLED is a self-contained device, LCD technology is no longer required.

However, the screen's thinness—a key feature of OLED technology—is what matters most.
OLED technology allows panels to be bent into any shape (see Figure 3.45). Manufacturers of
mobile phones would be able to create devices that fit around your wrist like watch straps if
they accept this. Imagine having displays that are so small you can fold them up and carry them
in your pocket until you need them.
Alternatively, how about making "smart" clothes by sewing folding OLED displays to textiles?
This could be used to outdoor survival gear, where an OLED display, GPS receiver, and
integrated circuit could all be sewed in.

NAVID SAQIB : 03334259883 36


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

Advantages of using OLED compared to existing LEDs and LCDs:


 Comparing an OLED to an LED or LCD, the plastic, organic layers are lighter, thinner, and
more flexible.
 Unlike LED and LCD panels, which use glass for their light-emitting layers, OLED layers
are constructed of plastic. This allows for lighter light-emitting layers.
 OLEDs give a brighter light than LEDs.
 Since OLEDs produce their own light, they do not require backlighting like LCD screens
do.
 OLED screens use significantly less power than LCD screens because they don't need
backlighting, which takes up the majority of the LCD's electricity. This is crucial for
battery-operated devices like cell phones.
 OLEDs can be formed into enormous, thin sheets because they are basically polymers;
as a result, they could be utilized for large advertising boards in subways and airports,
among other places.
 OLEDs are perfect for usage in television sets and advertising screens because of their
wide field of view, which is approximately 170 degrees.

(Loud) speakers:
Loudspeakers are output devices that produce sound. When connected to a computer system,
digitized sound stored on a file needs to be converted into sound as follows:
 A digital to analog converter (DAC) is the first device that the digital data passes through
before being converted into an electric current.
 Since the current produced by the DAC will be so little, this is subsequently run via an
amplifier to provide a current strong enough to power a loudspeaker.
 This electric current is then fed to a loudspeaker where it is converted into sound.

A digital to analogue converter (DAC) is required if the sound is recorded in a computer file. It
converts binary (digital) data into analogue form (electric current), which may power a

NAVID SAQIB : 03334259883 37


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

loudspeaker. This is illustrated in Figure.


The loudspeaker's process for converting electric current into sound is depicted in Figure.

 An iron core becomes a transient electromagnet when an electric current passes


through the wire coil that surrounds it; a permanent magnet is also placed extremely
near to this electromagnet.
 The induced magnetic field in the iron core varies in tandem with the electric current
flowing through the wire coil. As a result, the iron core is drawn to the permanent
magnet and begins to vibrate in response to variations in the current.
 Sound waves are produced by the cone (made of paper or a thin synthetic material)
vibrating due to the attachment of the iron core.

Sensors:
Sensors are input devices that use their environment to read or measure physical
characteristics. A few examples are length, pressure, temperature, and degree of acidity (there
are many others). Real data is analogue in nature, which means it lacks a single discrete value
and is always changing. As a result, analogue data requires the user to interpret it in some way.
For instance, a mercury thermometer requires the user to measure the height of the mercury
column and then use their best judgment to determine the temperature by referring to the
scale. Depending on how exactly the height of the mercury column is measured, there are an
endless number of possible values.

Nevertheless, these physical values are meaningless to computers, so the information must be
transformed into a digital representation. Typically, an analog to digital converter (ADC) does
this. Physical values are transformed into discrete digital values by this gadget.

NAVID SAQIB : 03334259883 38


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

When the computer is used to control devices, such as a motor or a valve, it is necessary to use
a digital to analogue converter (DAC) since these devices need analogue data to operate in
many cases. Actuators are used in such control applications.
The microprocessor may adjust a motor or a valve in response to sensor readings, which could
subsequently affect the sensor's subsequent measurement. when a result, when the
microprocessor works to bring the system within the intended parameters, its output will have
an effect on the subsequent input it receives. We call this feedback.
It's critical to understand that sensors don't send out readings when the parameter they're
monitoring changes; instead, they send out constant values. They are feeding data into a
microprocessor, which will analyze it and determine what has to be done.

Table shows a number of common sensors and examples of applications where the sensors
might be used.

Sensor Description of sensor Example applications


Temperature measures temperature of the • control of a central heating
surroundings by sending system
signals; these signals will • control/monitor a chemical
change as the temperature process
changes • control/monitor
temperature in a greenhouse
Moisture measures water levels in, for • control/monitor moisture
example, soil (it is based on levels in soil in a greenhouse
the electrical resistance of • monitor the moisture levels
the sample being monitored) in a food processing factory
Humidity this is slightly different to • monitor humidity levels in a
moisture; this measures the building
amount of water vapor in, for • monitor humidity levels in a
example, a sample of air factory manufacturing
(based on the fact that the microchips
conductivity of air will change • monitor/control humidity
depending on the amount of levels in the air in a
water present) greenhouse
Light these use • switching street lights on or
photoelectric cells that off depending on light levels
produce an output (in the
form of an electric current)
NAVID SAQIB : 03334259883 39
CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

depending on the brightness • switch on car headlights


of the light automatically when it gets
dark
Infrared (active) these use an invisible beam • turn on car windscreen
of infrared radiation picked wipers automatically when it
up by a detector; if the beam detects rain on the
is broken, then there will be a windscreen
change in the amount of • security alarm system
infrared radiation reaching (intruder breaks the infra-red
the detector (sensor) beam)
Infrared (passive) these sensors measure the • security alarm system
heat radiation given off by an (detects body heat)
object, for example, the • monitor the temperature
temperature of an intruder or inside an industrial freezer or
the temperature in a fridge chiller unit
Pressure a pressure sensor is a • weighing of lorries at a
transducer and generates weighing station
different electric currents • measure the gas pressure in
depending on the pressure a nuclear reactor
applied
Acoustic/sound these are basically • pick up the noise of
microphones that convert footsteps in a security system
detected sound into electric • detect the sound of liquids
signals/pulses dripping at a faulty pipe joint
Gas most common ones are • monitor pollution levels in
oxygen or carbon dioxide the air at an airport
sensors; they use various • monitor oxygen and carbon
methods to detect the gas dioxide levels in a
being monitored and greenhouse
produce outputs that vary • monitor oxygen levels in a
with the oxygen or carbon car exhaust
dioxide levels present
pH these measure acidity • monitor/control acidity
through changes in voltages levels in the soil in a
in, for example, soil greenhouse
• control acidity levels in a
chemical process
Magnetic field these sensors measure • detect magnetic field
changes in magnetic fields – changes (for example, in
the signal output will depend mobile phones and CD
on how the magnetic field players)
changes • used in anti-lock braking
systems in cars
NAVID SAQIB : 03334259883 40
CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

Accelerometer these are sensors that • used in cars to measure


measure acceleration and rapid deceleration and apply
motion of an application, i.e. air bags in a crash
the change in velocity (a • used by mobile phones to
piezoelectric cell is used change between portrait and
whose output varies landscape mode
according to the change in
velocity)
Proximity these sensors detect the • detect when a face is close
presence of a nearby object to a mobile phone screen and
switches off screen when
held to the ear
Flow (rate) these sensors measure the • used in respiratory devices
flow rate of a moving liquid and inhalers in hospitals
or gas and produce an output • measure gas flows in pipes
based on the amount of (for example, natural gas)
liquid or gas passing over the
sensor
Level these sensors use ultrasonics • monitor levels in a petrol
(to detect changing liquid tank in a car
levels in, for example, a tank) • in a pharmaceutical process
or capacitance/ conductivity where powder levels in tablet
(to measure static levels (for production need to be
example, height of water in a monitored
river) – note, level sensors • leak detection in refrigerant
can also be optical or (air conditioning)
mechanical in nature

Applications for sensors include both control and monitoring. While the process is simplified in
the flowchart, there is a slight difference in the operation of these two methods:

NAVID SAQIB : 03334259883 41


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

Examples of monitoring:
 keeping an eye on a hospital patient's vital signs, like their temperature and heart rate.
 surveillance of trespassers using a burglar alarm system
 examining the engine temperature of an automobile

Examples of control:
 Using street lights during the day and shutting them off at night
 regulating the temperature of a central air conditioning and heating system
 Chemical process control (for example, maintaining temperature and pH of process)
 Controlling the environment in a green house.

Monitoring applications:

Security systems:

NAVID SAQIB : 03334259883 42


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

Note: compare this to Figure (embedded systems) which shows the security system in more
detail. Figure concentrates on the sensor input.
 The security monitoring system will carry out the following actions:
 Activating the system requires entering a password on a keypad.
 An intruder's movement within the building will be detected by the infrared sensor.
 the infrared sensor will pick up the movement of an intruder in the building
 the pressure sensor will pick up the weight of an intruder coming through a door or
through a window
 If the sensor data is analogue, it is sent through an ADC.
 ... to generate digital information
 the computer/microprocessor will sample the digital data coming from these sensors at
a given frequency (e.g. every 5seconds) ...
 ... the computer/microprocessor compares the data with the values that are stored.
 if any of the incoming data values are outside the acceptable range, then the computer
sends a signal ...
 ... to a siren to sound the alarm, or
 ... to a light to start flashing
 If the devices require analogue values in order to function, a DAC is utilized.
 Till a password is entered to reset the system, the alarm will keep going off and the
lights will keep flashing.

Monitoring of patients in a hospital:


 The patient has several sensors attached to them.
 ... these measure vital signs such as: temperature, heart rate, breathing rate, etc.
 Every one of these sensors is connected to a computer system.
 The sensors feed data back to the computer system continuously.
 The data is frequently sampled by the computer.
 Each parameter's allowed value range is entered into the computer.
 the computer compares the values from the sensors with those values keyed in
 if anything is out of the acceptable range, a signal is sent by the computer ...
 ... to sound an alarm
 When sensor data is within range, the values are shown either as a digital readout or
graphically on a screen.
 monitoring continues until the sensors are disconnected from the patient.

NAVID SAQIB : 03334259883 43


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

Control applications:
Management of street lighting
The sequence that follows demonstrates how a street lamp's operation is managed by a
microprocessor. A light sensor installed in the bulb continuously transmits data to the CPU. The
sensor's data value varies according on the weather conditions, such as sunny, cloudy, rainy, or
nighttime:

 Data is sent to the ADC interface via the light sensor.


 data is converted to digital form and sent to the microprocessor in this way.
 The microprocessor (or at some other frequency rate) samples the data once every
minute.
 if the data from the sensor < value stored in memory …
 ... a signal is sent from the microprocessor to the street lamp ...
 ... and the lamp is switched on
 the lamp stays switched on for 30 minutes before the sensor readings are sampled again
(this prevents the lamp flickering off and on during brief heavy cloud cover, for example)
 if the data from the sensor >= value stored in memory …
 … a signal is sent from the microprocessor to the street lamp ...
 … and the lamp is switched off
 the lamp stays switched off for 30 minutes before sensor readings are sampled again
(this prevents the lamp flickering off and on during heavy cloud cover for example).

Anti-lock braking systems (on cars):


Cars with anti-lock braking systems (ABS) use magnetic field sensors to prevent the wheels from
locking up if the brakes are applied too forcefully:

NAVID SAQIB : 03334259883 44


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

 when one of the car wheels rotates too slowly (i.e. it is locking up), a magnetic field
sensor sends data to a microprocessor
 the microprocessor checks the rotation speed of the other three wheels
 The microprocessor notifies the braking system if they differ, that is, spin more quickly.
 … and the braking pressure to the affected wheel is reduced …
 The wheel's speed of rotation is subsequently increased to match that of the other
wheels.
 These magnetic field sensors are used to check the rotational speed multiple times per
second.
 Additionally, in order to keep any wheel from locking up during severe braking, the
brake pressure applied to each wheel can be adjusted continuously.
 … this is felt as a ‘judder’ on the brake pedal as the braking system is constantly switched
off and on to equalize the rotational speed of all four wheels
 if one of the wheels is rotating too quickly, braking pressure is increased to that wheel
until it matches the other three.

Central heating systems:


In this example, a gas supply is used to heat water using a heater. When the heating levels need
to be raised, a microprocessor-controlled valve on the gas supply opens. Whenever the
temperature goes below a predetermined level, a water pump is utilized to circulate hot water
throughout the central heating system:

Greenhouse environment control:


Here, the greenhouse conditions could be managed by utilizing five separate sensors: light, pH,
temperature, humidity, and wetness. Figure illustrates the control mechanisms to help simplify
this issue.

NAVID SAQIB : 03334259883 45


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

Given the quantity of sensors, it is evident that this is a very complicated issue. Let's only think
about the humidity sensor. This signals an ADC, which forwards the signal to the computer as a
digital signal. This determines what needs to be done by comparing the input with stored (pre-
set) values (follow the orange lines in Figure 3.54). The computer signals a DAC (follow the
green lines in the diagram) to run the motors to open the windows, lowering the humidity, if
the humidity is higher than the pre-set value. The computer sends a signal to open valves so
that water is sprayed into the air (follow the green lines) if it is less than the pre-set value. The
diagram doesn't depict this since it might go either way: if the reading equals the pre-set value,
then nothing happens. As long as the system is turned on, control is maintained. All five sensors
can be utilized with similar justifications.

Data storage
Every computer needs memory and storage of some kind. The internal devices that the
computer uses to store data that it may access directly are referred to as memory. Another
name for this is main memory. This memory may contain the user's workspace, transient data,

NAVID SAQIB : 03334259883 46


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

or essential computer operating data.


Users can store files, data, and applications on storage devices. The user has permanent access
to their data, which they can edit or read as they like. Since the user might want to save huge
files (such music or films), storage must be larger than internal memory. In order to facilitate
data transfers between computers, for example, storage devices can also be removed. In the
event of data loss, a user can store critical data on removable devices in an alternative place.
All of this detachable storage, meanwhile, is no longer as necessary thanks to technological
advancements like cloud storage and "data drop," which makes use of Bluetooth. The types of
memory and storage devices addressed in this section are summarized in Figure.

There are two main categories of memory and storage devices:

 primary memory
 secondary storage.

The key distinctions between storage devices and primary memory are outlined below:

Primary memory:
Random access memory (RAM) and read-only memory (ROM) memory chips are examples of
primary memory, which is the portion of the computer memory that can be accessed directly
from the CPU. Applications and services that are momentarily stored in memory locations can
NAVID SAQIB : 03334259883 47
CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

be accessed by the CPU through primary memory. Figure depicts the primary memory's
organization.

Random access memory (RAM):


RAM is a component found in every computer system. The fact that any memory location in
RAM can be accessed regardless of which memory location was most recently used means that
these memory devices are not truly random. Data is temporarily loaded into RAM from
secondary storage when you launch an application or program. In comparison to secondary or
offline devices, RAM has a substantially faster access time to locate data. RAM characteristics
include:
 can be altered by the user or the computer, and it can be written to or read from (i.e. it
is a temporary memory)
 utilized to store information, files, segments of running operating systems, applications,
or data
 Because it is volatile, data in the memory is erased when the machine is turned off.

Generally speaking, a computer will function more quickly the more RAM it has. RAM actually
never runs out of memory; instead, as more data is stored, it simply operates slower and
slower. The CPU must constantly contact the secondary data storage devices in order to replace
outdated data in RAM with updated data when RAM is "full." The number of times this must be
done is significantly decreased by increasing the RAM size, which speeds up the computer's
operation.

There are currently two types of RAM technology:

 dynamic RAM (DRAM)


 static RAM (SRAM).

Dynamic RAM (DRAM):

NAVID SAQIB : 03334259883 48


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

Capacitors and transistors make up each DRAM chip. Since a single RAM chip contains millions
of transistors and capacitors, each of these components is minuscule. Each component's
purpose is:
 capacitor: this is where the data bits (0 or 1) are stored.
 Transistor: this functions as a switch and enables the chip control circuitry to read or
modify the value of the capacitor.

This kind of RAM requires continuous refreshes; otherwise, the capacitor would lose its value
every 15 microseconds and would need to be re-charged. If it wasn't changed, the charge in
each capacitor would swiftly evaporate, leaving a value of 0.

DRAMs have a number of advantages over SRAMs:


 Compared to SRAM, they are far less expensive to manufacture.
 they consume less power than SRAM
 Compared to SRAM, their memory capacity is higher.

Static RAM (SRAM):


SRAM and DRAM differ greatly in that SRAM doesn't require frequent refreshing.
Flip flops, which house every piece of memory, are used by it.
When it comes to data access, SRAM is far quicker than DRAM (access times for SRAM are
typically 25 nanoseconds, while DRAMs are 60 nanoseconds).

The most popular kind of RAM in computers is DRAM, however SRAM is the recommended
technology in situations where maximum speed is required, like in the CPU's memory cache. A
high-speed section of memory called memory cache works well because most programs visit

NAVID SAQIB : 03334259883 49


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

the same information or instructions repeatedly. The computer saves time by avoiding
accessing the slower DRAM by storing as much of this data in SRAM.

Differences between DRAM and SRAM

DRAM SRAM
consists of a number of transistors and uses flip flops to hold each bit of memory
capacitors
needs to be constantly refreshed doesn’t need to be constantly refreshed
less expensive to manufacture than SRAM has a faster data access time than DRAM
has a higher memory capacity than SRAM
main memory is constructed from DRAM CPU memory cache makes use of SRAM
consumes less power than SRAM

Read-only memory (ROM):


Read-only memory (ROM) is an additional type of primary memory. While there are some
similarities between this and RAM, its primary distinction is that it cannot be written to or
altered. Features of ROM chips include the following:
 They don't lose their contents when the computer is powered off since they are non-
volatile.
 They are permanent memories, meaning that neither the user nor the computer, nor
any application or software, may write to or alter their contents.
 The contents are limited to reading.
 Known as the start-up instructions (or bootstrap), they are frequently used to store data
that the computer needs to access when it powers up for the first time (the basic
input/output system, or BIOS).

The primary distinctions between RAM and ROM are outlined below:

RAM ROM
temporary memory device permanent memory device
volatile memory non-volatile memory device
can be written to and read from data stored cannot be altered
used to store data, files, programs, part of OS
currently in use always used to store BIOS and other data
can be increased in size to improve needed at start up
operational speed of a computer

We will consider the function of each type of memory independently:


ROM
 preserving the factory parameters, such the frequency of the remote control

NAVID SAQIB : 03334259883 50


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

 preserving the "start-up" sequences for when the toy car is turned on initially
 storing predefined procedures, such as how the hand-held device's buttons control
turning left, accelerating, stopping, and so on.

RAM
 The RAM chip would store the new instructions that the user would want to put in their
own routines.
 The information and commands obtained from the remote-control unit will be stored in
the RAM chip.

Secondary and off-line storage


Non-CPU-addressable storage devices are referred to as secondary (or off-line) storage. These
are non-volatile devices that let users store data for as long as needed. Although data access
times with this form of storage are noticeably greater than with RAM or ROM, it can store more
data than primary memory. Secondary storage houses all operating systems, device drivers,
applications, and general files (such music, documents, and pictures). The several kinds of
secondary storage that are present in most computers are covered in the section that follows.

Magnetic, optical and solid-state storage


Depending on the technology employed, secondary (and offline) storage can be divided into
three categories:
 Magnetic
 solid state
 optical

Magnetic storage

Hard Disk Drives (HDD):


Hard disk drives (HDDs) remain one of the most widely utilized computer data storage
solutions.

The magnetic surfaces of the disks—also known as platters, as they are often called—store data
in a digital format. Many platters on the hard disk drive will have a maximum spin speed of
7000 revolutions per second. Electromagnets are used in read-write heads to read data from
and write data to platters.

NAVID SAQIB : 03334259883 51


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

Platters can be crafted from ceramic, glass, or aluminum. Every surface of the platters in the
disk drive is accessible to a number of read-write heads.
Every platter typically has two surfaces that can be utilized for data storage.
These read-write heads are incredibly fast; on average, they may travel 50 times per second
from the disk's center to its edge and back.

Sectors and tracks are the surface-level data storage units. A track's sectors will all have the
same number of bytes in them.
Sadly, hard disk drives access data far more slowly than other storage devices like RAM. A lot of
applications need the read-write heads to move their heads a lot in order to continuously
search for the right blocks of data. At that point, latency starts to have a big impact. The
amount of time it takes for a particular data block on a data track to revolve around to the
read-write head is known as the latency.
Sometimes warnings like "Please wait" or, worse yet, "not responding" will alert users to the
impact of latency.

The necessary number of sectors required to store the data will be assigned when a file or set
of data is saved on an HDD.
The allotted sectors might not be next to one another, nevertheless. The HDD will experience
multiple deletions and edits over time, which causes sectors to get more and more fragmented
and eventually worsen the HDD's performance (that is, making it take longer and longer to
access data). This condition can be improved by "tidying up" the disk sectors with
defragmentation software.

On an HDD, each sector's contents will be read sequentially, or in order; yet, the sector will only
be accessible by a direct read/write head movement.

NAVID SAQIB : 03334259883 52


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

In essence, removable hard disk drives are external hard drives that may be plugged into a USB
port on a computer. They can be utilized as a backup device or as an additional means of file
transfer between PCs in this manner.

Solid state drives (SSD):


As was previously mentioned, HDD latency is a problem. Since solid state disks (SSD) have no
moving parts and retrieve all data at the same speed, they greatly alleviate this problem. The
most popular kind of solid-state storage devices store data by managing the passage of
electrons within NAND or NOR chips; they do not rely on magnetic features. Millions of tiny
transistors within the chip store the data as 0s and 1s; at each junction, one transistor is
referred to as a floating gate and the other as a control gate. In essence, this creates a
rewritable nonvolatile memory.

Floating gate and control gate transistors:


The complementary metal oxide semiconductor, or CMOS, NAND technology is used in floating
gate and control gate transistors. Flash memory devices use a matrix, with a floating gate and a
control gate positioned at each intersection in the following manner:

The primary disadvantage of SSD technology remains its longevity, however this is starting to
lessen. SSD endurance refers to the fact that the majority of solid-state storage devices are
rated at a measurable 20GB of write operations per day over a three-year timeframe. Because
of this, SSD technology is still not present in all servers, where a significant amount of write
operations occur on a daily basis. However, several manufacturers are working to increase the
solid-state systems' durability, and they are quickly proliferating in applications like servers and
cloud storage devices.

Memory sticks/flash memories:


Solid state technology is employed by pen drives, commonly referred to as memory sticks or
flash memories.
Usually, the USB port on the computer is used to connect them. Their primary benefit is that
they are incredibly lightweight and compact, which makes them ideal for file transfers between
computers. They can also be utilized, for instance, as tiny backup devices for picture or music
files.
Memory sticks are frequently used as a dongle in complex or pricey software, such as financial
planning applications. Extra files required to operate the software are contained on the dongle.
This dongle is required for the software to function properly. As a result, it stops both
NAVID SAQIB : 03334259883 53
CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

unauthorized and unlawful usage of the software as well as copying it because the software is
useless without the dongle.

Optical media

CD/DVD disks:
Optical storage devices are what CDs and DVDs are called. Data is read and written to the
disk's surface using laser light.

A tiny coating of light-sensitive organic dye or metal alloy is used to store data on both CDs and
DVDs. Both systems use a single, spiral track that extends from the disk's center to its edge, as
shown by the diagram in Figure. The optical head follows the spiral track from the center
outwards while a disk spins, moving to the place where the laser beam "contacts" the disk
surface.
A CD or DVD is segmented into sectors, just like an HDD, to enable immediate access to data.
Similar to HDDs, the outer portion of the disk operates at a faster speed than the inner portion.
The technology employed in DVDs differs slightly from that of CDs. One of the primary
distinctions is the ability to use dual-layering, which significantly boosts storage capacity. This
essentially indicates that there are two distinct recording layers. A translucent (polycarbonate)
spacer connects the two layers of a typical DVD, and a very tiny reflector is positioned in
between the two layers. A red laser that focuses at a difference of only a few micrometers from
the first layer is used to read and write on the second layer.

NAVID SAQIB : 03334259883 54


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

Blu-ray discs:
Another type of optical storage medium is Blu-ray discs. Nonetheless, they differ significantly
from DVDs in terms of both their design and read-write capabilities.
It is perhaps important to note that the reason they are named Blu-rays instead than Blue-rays
is that the term "Blue" could not be copyrighted, which is why "Blu" was used instead.

Blu-ray and DVD differ primarily in the following ways:


 a blue laser, rather than a red laser, is used to carry out read and write operations; the
wavelength of blue light is only 405nanometres (compared to 650nm for red light)
 using blue laser light means that the ‘pits’ and ‘lands’ can be much smaller;
consequently, Blu-ray can store up to five times more data than normal DVD
 single-layer Blu-ray discs use a 1.2mm thick polycarbonate disk; however, duallayer Blu-
ray and normal DVDs both use a sandwich of two 0.6mm thick disks (i.e. 1.2mm thick)
 Blu-ray disks automatically come with a secure encryption system that helps to prevent
piracy and copyright infringement
 the data transfer rate for a DVD is 10Mbps and for a Blu-ray disc it is 36Mbps (this
equates to 1.5hours to transfer 25GiB of data).

Since Blu-ray discs can come in single layer or dual-layer format (unlike DVD, which is always
dual-layer), it is probably worth also comparing the differences in capacity and interactivity of
the two technologies.

Comparison of the capacity and interactivity of DVDs and Blu-ray discs:


 A standard dual-layer DVD has a storage capacity of 4.7GB (enough to store a 2-hour
standard definition movie)
 A single-layer Blu-ray disc has a storage capacity of 27GB (enough to store a 2-hour high-
definition movie or 13hours of standard definition movies)
 A dual-layer Blu-ray disc has a storage capacity of 50GB (enough to store 4.5hours of
high-definition movies or 20hours of standard definition movies).

Virtual memory:
It is perhaps important to note that the reason they are named Blu-rays instead than Blue-rays
is that the term "Blue" could not be copyrighted, which is why "Blu" was used instead.
Blu-ray and DVD differ primarily in the following ways:
When a process runs out of RAM, it is one of the issues with memory management. A system
crash is likely to occur if the quantity of RAM that is accessible is exceeded because of many
processes executing at the same time. If we need more RAM, we can use the hard drive (or

NAVID SAQIB : 03334259883 55


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

SSD) to do this. This is the foundation of virtual memory. RAM is essentially the physical
memory, and virtual memory is the combination of RAM and the swap space on an SSD or hard
drive.
Data is loaded into memory from an HDD (or SSD) when needed to run an application. Two
straightforward illustrations can be used to illustrate the differences between using virtual
memory management and regular memory management.

Without virtual memory:


Assume that we have five applications in memory, numbered 0 through 4, each of which needs
access to RAM. The computer would run out of RAM memory space, as depicted in the first
diagram, if virtual memory wasn't used:

With virtual memory:


Next, we'll look at what occurs if the CPU makes use of virtual memory to give each of the five
programs the necessary RAM access. For this to happen, some data must be moved from RAM
into HDD or SSD and then another set of data must be moved from HDD or SSD into RAM:

Virtual memory now moves the oldest data out of RAM into the HDD/SSD to allow program 4 to
gain access to RAM. The 32-bit ‘map’ is now updated to reflect this new situation:
 Data from program 0 (which was using RAM address space 3 – the oldest data) is now
mapped to the HDD/SSD instead, leaving address space 3 free for use by program 4
 program 4 now maps to address space 3 in RAM, which means program 4 now has
access to RAM.

Now, our diagram looks like this:

NAVID SAQIB : 03334259883 56


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

This will all keep happening until the competing programs that are executing in memory stop
using RAM excessively. The impression of infinite memory is created via virtual memory. Data
can be transferred into and out of the HDD or SSD to create the appearance of more memory
even when RAM is full.
Memory management in computer operating systems uses paging to store, retrieve, and copy
data from HDDs and SSDs into RAM. In virtual memory systems, a page is a fixed-length,
sequential, or continuous chunk of data.

This is a crucial component of virtual memory functionality, which permits data blocks, or
pages, to be moved in and out of an HDD or SSD. But since virtual memory accesses data more
slowly, as this chapter has already indicated, the larger the RAM, the faster the CPU can
function. One advantage of expanding RAM as much as possible is this.

Virtual memory offers several primary advantages:


 Programs can be larger than physical memory and still function.
 Data that isn't being used, as during error handling, doesn't need to take up memory.
 It lessens the need to purchase and install more costly RAM memory (however, as
previously shown, there are restrictions on the usefulness of this).

Cloud storage

Public and private cloud computing:


Data is kept on distant servers using a technique called cloud storage. In the event of
maintenance or repair, the same data is kept on multiple servers so that clients can access it
whenever they choose. We refer to this as data redundancy. A hosting business owns and
operates the physical environment, which may consist of hundreds of servers spread across
numerous locations.

There are three common systems:

NAVID SAQIB : 03334259883 57


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

 Public cloud – this is a storage environment where the customer/client and cloud
storage provider are different companies
 Private cloud – this is storage provided by a dedicated environment behind a company
firewall; customer/client and cloud storage provider are integrated and operate as a
single entity
 Hybrid cloud – this is a combination of the two above environments; some data resides
in the private cloud and less sensitive/fewer commercial data can be accessed from a
public cloud storage provider.

Benefits and drawbacks of cloud storage:

Benefits of using cloud storage Drawbacks of using cloud storage


Files belonging to customers or clients that A sluggish or unreliable internet connection
are saved on the cloud can be viewed would make it difficult for the client or
whenever and from any device, anywhere in customer to access or download their files.
the globe as long as there is internet
connectivity.
Customers and clients do not have to use the Large storage capacity requirements can
same computer to store and retrieve result in high prices, and paying for high
information, nor do they need to bring an download/upload data transfer restrictions
external storage device with them. with the client/customer internet service
provider (ISP) can also be costly.
The cloud offers users remote data backup, There is always a chance that the cloud
which has clear advantages for preventing storage provider would collapse, which could
data loss and disaster recovery. result in the loss of all backup data.
If a customer's or client's hard drive or
backup device fails, their data can be
recovered thanks to cloud storage.
The cloud system provides nearly infinite
storage.

Data security when using cloud storage:


Businesses that move massive volumes of private information from their own systems to a
cloud service provider are essentially giving up control over their own data security. This begs
several questions, including:
 In what way is the building where the data is kept physically secured?
 To what extent is the cloud service provider resilient to power outages or natural
disasters?

NAVID SAQIB : 03334259883 58


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

 What security measures are in place for employees of the cloud service provider? Can
they access private information for financial gain using their authorization codes?
Potential data loss when using cloud storage:
The cloud storage facilities carry a danger of losing valuable and irreplaceable data. Data loss or
corruption may result from hacker actions (such as getting access to accounts or pharming
assaults, for example). Users must be satisfied that there are enough safety measures in place
to mitigate these dangers.
Some users may be wary of using cloud storage for crucial files due to security lapses that have
included some of the biggest cloud service providers.
 A glitch in the XEN hypervisor—a piece of hardware, software, or firmware that builds
and manages virtual machines—caused the XEN security threat, which prompted
multiple cloud operators to restart all of their cloud servers.
 A significant cloud service provider experienced a permanent loss of data while doing a
normal backup.
 The cloud hacking incident involving over 100 private images of celebrities was
publicized. Because they had access to multiple cloud accounts, the hackers were able
to post the images on social media and sell them to publishing businesses.
 A cloud security breach occurred in 2016 at the National Electoral Institute of Mexico,
exposing 93 million voter registrations that were kept on a central database and making
them accessible to the general public. Even worse, a large portion of the data in this
database also had links to a cloud server located outside of Mexico.

Network hardware

Network interface card (NIC):


For a device to be able to connect to a network (like the internet), it needs a network interface
card (NIC). It typically consists of the Media Access Control (MAC) address produced during the
manufacturing stage and is a component of the device hardware.
Similar to network interface cards (NICs), wireless network interface cards/controllers (WNICs)
are used to connect devices to the internet or other networks. On the other hand, they connect
wirelessly to networks by using an antenna and microwaves. Normally, they would be
integrated into an internal circuit or plug into a USB port.

Media Access Control (MAC):


The 48 bits that make up a MAC address are shown as six sets of hexadecimal numbers in the
following general format:

For instance, 00 – 1C – B3 – 4F – 25 – FF, where the first six hex numbers indicate that the
gadget was manufactured by a certain company, like Apple, and the next six hex digits are the
product's unique serial number. The MAC address will alter if the NIC card is changed.
NAVID SAQIB : 03334259883 59
CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

Types of MAC address:


Lastly, it should be noted that there are two different kinds of MAC addresses: locally
administered (LAA) and universally administered (UAA).
The MAC address assigned at the factory by the manufacturer is the UAA, which is the most
often used variety. Users hardly ever desire to modify this MAC address.
On occasion, though, a user or organization may want to modify their MAC address. This is a
rather simple process, but if the modified address isn't unique, it will lead to serious issues.
There are a few reasons why the MAC address needs to be changed using LAA:
 Some devices' MAC addresses may need to be changed in order for them to comply with
the strict format required by certain mainframe software.
 Alternatively, a MAC address filter on a router or firewall may need to be bypassed,
allowing only MAC addresses that match a specific format to pass through and blocking
devices whose MAC addresses don't.
 In order to circumvent specific kinds of network limitations, it can be essential to
simulate unlimited MAC addresses; hence, it might be necessary to modify the MAC
address on specific network-connected devices.

Internet protocol (IP) address:


A router gives a device a private IP address when it joins to a private network. Although it may
be the same as an IP address on another network, that IP address is specific to that network. On
the other hand, a router is assigned a distinct public IP address when connecting to the
internet. Usually, the internet service provider (ISP) provides this. The public IP address of one
device on the internet does not belong to another. While each connected device to the router
has a unique private IP address on that network, they all share the same public IP address. It is
required to provide an IP address since the internet runs on a set of protocols, or regulations.
The guidelines that senders and recipients of data communicating via the internet must agree
upon are defined by protocols.
IPv4 and IPv6 are the two versions of the protocol. IPv4 has 32 bits as its foundation, and
addresses are represented as four groups of eight bits each (displayed in denary format); for
instance,
254.25.28.77
A more recent version known as IPv6 is currently in use since using only 32 bits significantly
lowers the possible number of devices and routers utilized on the internet at any given
moment. This use 128-bit addresses, which consist of eight sets of hex digits; for instance,
A8FB:7A88: FFF0:0FFF:3D21:2085:66FB: F0FA
compares the features of MAC addresses and IP addresses:

MAC addresses IP addresses

NAVID SAQIB : 03334259883 60


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

identifies the physical address of a device on identifies the global address on the internet
the network
unique for device on the network may not necessarily be unique
assigned by the manufacturer of the device dynamic IP addresses are assigned by ISP
and is part of the NIC using DHCP each time the device connects to
the internet (see later)
dynamic IP addresses change every time a
they can be universal or local device connects to the internet; static IP
addresses don’t change
when a packet of data is sent and received, used in routing operations as they specifically
the MAC address is used to identify the identify where the device is connected to the
sender’s and recipient’s devices internet
use 48 bits use either 32 bits (IPv4) or 128 bits (IPv6)
can be UAA or LAA can be static or dynamic

NAVID SAQIB : 03334259883 61


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

NAVID SAQIB : 03334259883 62


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

Static and dynamic IP addresses:


There are two types of IP addresses: static (never changes) and dynamic (varies each time a
device makes an internet connection).

Static:
The internet service provider (ISP) gives a device a static IP address, which doesn't change every
time a device connects to the internet.
Typically, static IP addresses are given to:
 distant servers that are providing FTP (File Transfer Protocol) servers
 online databases, and websites.
 When files need to be moved over a networked computer system, FTP servers are
utilized.

Dynamic:
The ISP assigns dynamic IP addresses to devices every time they connect to the internet.
Dynamic Host Configuration Protocol (DHCP) is used for this. The ISP uses a machine on the
internet set up as a DHCP server to provide a device an IP address automatically. A dynamic IP
address, as its name implies, may vary each time a device connects to the internet.
Static and dynamic IP addresses are contrasted in Table:

Dynamic and static IP addresses:

Dynamic IP addresses Static IP addresses


increased privacy because they are updated Static IP addresses provide complete device
every time a user log in tracing since they are never changed.
When utilizing, say, VoIP, dynamic IP allow for faster upload and download speeds
addresses might be problematic because (see Figure)
they are less dependable and have the more costly to maintain because information
potential to disconnect and change the IP must always be accessible and the device
address, which could lead to the VoIP must run continuously
connection failing.

Routers:
Data packets can be routed between several networks, connecting a LAN to a WAN, for
instance, with the help of routers. A router translates data sent in one format from one
network (using a certain protocol) into a protocol and format that another network can
understand, enabling communication between the two networks. Usually, a router has multiple
wires linking it to computers and other LAN devices in addition to an internet cable hooked into
it.

NAVID SAQIB : 03334259883 63


CHAP 3 COMPUTER ARCHITECTURE 09/01/2023

Broadband routers sit behind a firewall. The firewall protects the computers on
a network. The router’s main function is to transmit internet and transmission
protocols between two networks and also allow private networks to be connected
together.
Routers inspect the data package sent to it from any computer on any of the
networks connected to it. Since every computer on the same network has the
same part of an internet protocol (IP) address, the router is able to send the
data packet to the appropriate switch, and the data will then be delivered to
the correct device using the MAC destination address. If the MAC address doesn’t
match any device connected to the switch, it passes on to another switch on the same network
until the appropriate device is found. Routers can be wired or wireless devices.

NAVID SAQIB : 03334259883 64

You might also like