Chapter 3 Computer Architecture
Chapter 3 Computer Architecture
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:
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).
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):
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):
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.
(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
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.
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:
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).
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.
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:
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:
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
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:
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:
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.
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.
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:
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:
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.
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.
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)
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.
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).
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
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:
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.
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:
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.
There are several names for this kind of tomographic scanner, depending on how the image is
created. As an illustration:
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).
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).
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:
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.
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:
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.
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.
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 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
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.
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.
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.
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 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
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.
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.
(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
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.
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.
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:
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:
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.
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:
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.
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,
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.
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.
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.
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
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.
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
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
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.
Magnetic storage
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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.
Cloud storage
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.
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
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
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
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:
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.
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.