Uploaded by wapob91978

3. Hardware

advertisement
3. Hardware
Saturday, 18 February 2023
17:24
COMPUTER ARCHITECTURE
The CPU
• Stands for Central Processing Unit
• Also known as microprocessor or processor
• Is installed as an integrated circuit on a single microchip
The Von Neumann architecture
Components:
○ ALU
§ Arithmetic Logic Unit
§ Allows for arithmetic and/or logic operations to be carried out when a pro
○ CU
§ Control Unit
§ Reads an instruction from memory and stores it into the program counter
○ System Clock
§ Synchronizes all executions
○ RAM
§ Random Access Memory
§ IAS (Immediate Access Store)
ogram is ran
r
§ Reads an instruction from memory and stores it into the program counter
○ System Clock
§ Synchronizes all executions
○ RAM
§ Random Access Memory
§ IAS (Immediate Access Store)
§ CPU takes data from the backing store to put it into RAM so that it can be
accessed faster
○ Registers
§ CIR
□ Current Instruction register
® Stores current instruction being decoded and executed
§ ACC
□ Accumulator
□ Used when carrying out ALU calculations, it stores data temporarily
§ MAR
□ Memory Address Register
□ Stores address of the memory being read from or written to
§ MDR
□ Memory Data Register
□ Stores data which has either just been read from or which is about t
memory
§ PC
□ Program Counter
□ Stores the addresses where the next instruction to be read can be fo
Buses and Memory:
Memory:
○ Made up of partitions:
§ Contain addresses and contents
r
read and
during them
to be written to
ound
Memory:
○ Made up of partitions:
§ Contain addresses and contents
§ Address identifies location
○ READ:
§ Address is read from MAR
§ Contents are put into the MDR
○ WRITE:
§ Data is stored in MDR
§ Data is written into location with the right address (which is written in the
Input and Output devices:
○ Getting data into and out of devices
○ Input devices make it so that external data is converted into something understa
computer
○ Output devices are the results of computer processing of data into a human und
System Buses:
○ Used in computers as parallel transmission components
○ Every wire transmits one bit of data
○ Address bus:
§ Carries addresses
§ Unidirectional
○ Data bus:
§ Bidirectional
§ Sends data
§ The wider, the larger the word length
○ Control bus:
§ Bidirectional
§ Sends control signals
Fetch-Decode-Excecute cycle:
• To carry out a set of instructions, the CPU fetches data and instructions from memory
in registers using both the address bus and data bus.
• Each instruction is decoded before being executed, in a process known as the Fetch-De
cycle.
• Fetch
○ Both data and instruction can be stored in MDR.
○ In the Fetch-Decode-Execute cycle, the next instruction is fetched from the mem
stored in the MAR.
○ The instruction is stored in the MDR and then copied to the Current Instruction R
○ The PC is incremented so that the next instruction can be processed.
• Decode
○ The instruction is decoded so that it can be interpreted in the next part of the cy
• Execute
○ The CPU passes the decoded instruction as a set of control signals to the approp
components within the computer system.
e MAR)
andable by the
derstandable form
and stores them
ecode-Execute
mory address
Register (CIR).
ycle.
priate
○ The PC is incremented so that the next instruction can be processed.
• Decode
○ The instruction is decoded so that it can be interpreted in the next part of the cy
• Execute
○ The CPU passes the decoded instruction as a set of control signals to the approp
components within the computer system.
○ This allows each instruction to be carried out in its logical sequence.
Cores, chache and internal clock
• system clock: synchronizes all computer operations; increasing clock speed increases p
• address bus and data bus: also affect computer performance; need to be taken into a
• Program Counter (PC): contains the address of the memory location of the next instru
fetched
• memory address register (MAR): temporarily stores the address copied from the PC to
instruction from memory
• memory data register (MDR): temporarily stores the instruction fetched from memor
• Current Instruction Register (CIR): contains the instruction copied from the MDR
• overclocking: can lead to execution of instructions outside design limits, causing crash
overheating
• cache memory: located within the CPU and stores frequently used instructions and da
access
• number of cores: more cores can improve performance, but doubling the number of c
necessarily double performance
• PERFORMANCE INCREASED WITH:
○ Increased bus width
○ Increased clock speed
○ Use of multi-core CPUs
○ Use of cache memory
Instruction set:
•
•
•
•
•
•
•
•
•
•
Instructions: set of operations decoded in sequence, instruct the CPU
ALU and CU: part of the CPU that executes operations
Opcode and operand: make up an operation
Instruction set: limited number of opcodes that can be used; all software contains inst
Fetch-Decode-Execute cycle: sequence of steps used by the CPU to process instruction
X86: common CPU standard with almost identical instruction sets used by different co
manufacturers
Programming code: needs interpreters or compilers to convert code into instruction s
Examples of instructions: ADD, JMP, LDA, etc.
Opcode: informs CPU what operation to do
Operand: data to act on or register in memory
Embedded systems:
• Embedded system: combination of hardware and software designed to carry out spec
○ Hardware can be electronic, electrical, or electro-mechanical.
○ Types of embedded systems:
ycle.
priate
processing speed
account
uction to be
o fetch the
ry
hes and
ata for faster
cores doesn't
tructions
ns
omputer
set
cific functions
Embedded systems:
• Embedded system: combination of hardware and software designed to carry out spec
○ Hardware can be electronic, electrical, or electro-mechanical.
○ Types of embedded systems:
§ Microcontrollers: have a CPU, RAM, ROM, and peripherals all on one chip
§ Microprocessors: only have a CPU on the chip, with no RAM, ROM, or per
§ System on chips (SoC): may contain a microcontroller as one of its compo
always includes CPU, memory, input/output (I/O) ports, and secondary sto
microchip.
• Inputs to embedded systems:
○ Data can be input manually by an operator or automatically by a sensor.
○ Sensor input can be analogue or digital.
• Outputs of embedded systems:
○ Carry out functions by sending signals to controlled components.
• Programmable vs. non-programmable embedded systems:
○ Non-programmable devices need to be replaced if software upgrade is required
○ Programmable devices can be upgraded by connecting to a computer or through
updates via Wi-Fi, satellite, or cellular link.
• Benefits and drawbacks:
•
• Examples:
○ Motor vehicles (cars, planes, etc.)
○ Set-top box (recording and playback of tv programs)
○ Security systems (codes, lights, alarms)
○ Lights
○ Vending machines
Input and Output devices:
Input devices:
Barcode scanners:
• Barcode: series of dark and light parallel lines of varying thickness
cific functions
p
ripherals
onents, and almost
orage on a single
d.
h automatic
Input and Output devices:
Input devices:
Barcode scanners:
• Barcode: series of dark and light parallel lines of varying thickness
• Numbers 0 to 9 represented by a unique series of lines
• Various barcode methods for representing these digits exist
• Each digit is made up of 2 dark lines and two light lines. The width representing each
• Digits on the left have an odd number of dark elements, always begin with a light bar.
• Digits on the right have an even number of dark elements, always begin with a dark b
• This arrangement allows a barcode to be scanned in any direction.
• When a barcode is scanned:
○ It is read by a red laser or red LED.
○ Light is reflected back off the barcode, with dark areas reflecting little to no ligh
○ Reflected light is read by sensors (photoelectric cells).
○ As the laser or LED light is scanned across the barcode, a pattern is generated, w
converted into digital data that allows the computer to understand the barcode
•
• The barcode number is looked up in the stock database using it as the key field to uniq
each stock item.
• Once the barcode number is found, the stock item record is looked up to find the price
item details, which are sent back to the checkout or POS terminal.
• The number of stock items in the record is reduced by 1 each time the barcode is read
value for the number of stock is written back to the stock item record.
• The number of stock items is compared to the re-order level, and if it is less than or eq
more stock items are automatically ordered.
• Once an order for more stock items is generated, a flag is added to the record to stop
time the stock item barcode is read.
• When new stock items arrive, the stock levels are updated in the database.
• Advantages to management of using barcodes:
• Easier and faster to change prices on stock items
• Provides more up-to-date sales information/sales trends
• Reduces time and cost to management by not needing to price every stock item
• Allows for automatic stock control
• Possible to check customer buying habits more easily by linking barcodes to, for
digit is the same.
.
bar.
ht.
which is
e.
quely identify
e and other stock
d, and this new
qual to this value,
re-ordering every
m on the shelves
r example,
• Advantages to management of using barcodes:
• Easier and faster to change prices on stock items
• Provides more up-to-date sales information/sales trends
• Reduces time and cost to management by not needing to price every stock item
• Allows for automatic stock control
• Possible to check customer buying habits more easily by linking barcodes to, for
customer loyalty cards.
• Advantages to customers of using barcodes:
• Faster checkout queues (staff don’t need to remember/look up prices of items)
• Reduced errors in charging customers
• Itemised bills are given to the customer
• Cost savings can be passed on to the customer
• Better track of ‘sell by dates’ so food should be fresher.
• Other uses of barcodes:
• Utilized in libraries where they are used in books and on the borrower’s library c
• Every time a book is taken out, the borrower is linked to the book automatically.
• This allows automatic checking of when the book is due to be returned.
QR Codes
○ Matrix of filled-in squares on a light background
○ Can hold up to 4296 characters and internet addresses
○ Three large squares at corners function as alignment
○ Can be scanned with smartphones and tablets
○ Uses include advertising, website access, and storing boarding passes
○ Reading QR Codes:
Use camera on mobile device and download QR app
Point camera at QR code, app processes image and converts squares to readable data
Browser software reads data and decodes web addresses or phone numbers
User sent to website or phone app, boarding pass automatically sent to device
Advantages of QR Codes:
• Hold more information than traditional barcodes
• Built-in error-checking systems
• Easier to read, no need for expensive scanners
• Can be transmitted as text messages or images
• Can be encrypted for greater protection
○ Disadvantages of QR Codes:
• More than one format available
• QR codes can be used to transmit malicious codes (attagging)
• Malicious code creator can gain access to user's phone and information
• User can be sent to fake website or virus can be downloaded
○
○
○
○
○
Digital Cameras
○ Digital cameras have replaced traditional film cameras
○ Film cameras required developing and printing, making them expensive to operate
m on the shelves
r example,
card.
.
Digital Cameras
○
○
○
○
○
○
○
○
○
○
Digital cameras have replaced traditional film cameras
Film cameras required developing and printing, making them expensive to operate
Modern digital cameras can connect to a computer via USB or Bluetooth
Digital cameras are controlled by an embedded system that can perform tasks like adju
speed, focusing, operating the flash, etc.
When a photograph is taken, light passes through the lens onto a light-sensitive cell m
millions of photodiodes (sensors)
These sensors are called pixels and make up the image
The image is converted into electric charges that are passed through an analogue to di
(ADC) to create a digital image array
The ADC converts electric charges into brightness levels and measures color
Most cameras use a 24-bit RGB system where each pixel has red, green, and blue value
The number of pixels determines the file size, and the image quality depends on the re
number of pixels used, light levels, and how the image is stored.
Keyboards
○ Keyboards are the most common method for data entry on electronic devices
○ They can be connected via USB or wireless, and virtual/touch screen on mobile device
○ Keyboard input is relatively slow and prone to errors
○ Frequent use of keyboards can cause injuries such as repetitive strain injury (RSI)
○ Ergonomic keyboards can help alleviate RSI by providing better support
○ The computer recognizes a letter pressed on the keyboard by completing a circuit on a
circuit board at the base of the keys
○ The CPU identifies which key was pressed by referring to an index file, which has an AS
each character on the keyboard.
Microphones
○ Microphones can be built into a computer or external devices connected via USB or Bl
○ A microphone converts sound waves into an electric current.
○ Sound waves cause the air to vibrate which is picked up by a diaphragm in the microph
vibrate.
○ The vibration of the diaphragm causes a copper coil to move, cutting through the mag
permanent magnet and inducing an electric current.
○ The electric current can be amplified or sent to a recording device and is analogue in n
○ The electric current can also be sent to a computer where a sound card converts it into
which can then be stored.
Optical Mice
○ An optical mouse is a pointing device that takes 1500 images per second using tiny cam
○ It can work on virtually any surface and does not have a ball like the older mechanical
○ A red LED is used in the base of the mouse and the red light is bounced off the surface
a CMOS.
○ The CMOS generates electric pulses representing the reflected red light which are sen
usting shutter
made up of
igital converter
es
ecording device,
es
a membrane or
SCII value for
luetooth.
hone causing it to
gnetic field of a
nature.
o a digital signal
meras.
mouse.
e and picked up by
nt to a digital
Optical Mice
○ An optical mouse is a pointing device that takes 1500 images per second using tiny cam
○ It can work on virtually any surface and does not have a ball like the older mechanical
○ A red LED is used in the base of the mouse and the red light is bounced off the surface
a CMOS.
○ The CMOS generates electric pulses representing the reflected red light which are sen
signal processor (DSP).
○ The processor works out the coordinates of the mouse based on the changing image p
moved on the surface.
○ The computer then moves the on-screen cursor to the coordinates sent by the mouse.
○ Benefits:
• No moving parts, more reliable.
• Dirt can't get trapped.
• No need for special surfaces.
• Most optical mice use Bluetooth connectivity.
○ Advantages of a wired mouse:
• No signal loss.
• Cheaper to operate.
• Fewer environmental issues.
2D and 3D Scanners
2D Scanners
○ 2D scanners are commonly used to scan hard copy documents.
○ They convert the scanned image into an electronic form.
○ The electronic copy can be stored in a computer.
○
meras.
mouse.
e and picked up by
nt to a digital
patterns as it is
.
○
○
○
○
○
○
○
○
○
○
OCR software allows scanned text to be converted into a text file format for editing
3D scanners produce three-dimensional images of solid objects using various technolo
2D scanners are commonly used to input hard copy documents and produce digital im
OCR technology is used in 2D scanners at airports to read passports and produce digita
Face recognition software compares digital images of a passenger's face from the pass
photograph taken at the airport using key facial positions
Computed tomographic (CT) scanners create 3D images of solid objects.
Tomography technology builds up an image of the solid object through a series of thin
Each slice is built up using X-rays, radio frequencies, or gamma imaging, among other m
Each slice is stored as a digital image in computer memory, creating a representation o
object.
The scanner can have different names depending on how the image is formed.
Touch Screens
○ Touch screens are common input devices used in mobile phones and tablets.
○ There are three common types of touch screen technologies: capacitive, infrared, and
○ Capacitive touch screens have a layer of glass, a transparent electrode layer, and a glas
work by changing the electrostatic field when touched by a conductive object.
○ There are two types of capacitive touch screens: surface and projective. Projective scre
touch.
○ Infrared touch screens use sensors and infrared transmitters to detect when a beam is
indicating where the screen was touched.
○ Resistive touch screens have two layers of electrically resistive material with a voltage
them. When the layers touch, a circuit is completed which results in a flow of electricit
○ Capacitive screens have better image clarity and durability than resistive screens, but a
electromagnetic radiation. Infrared screens allow multi-touch and are durable but can
water and light interference. Resistive screens are good with resistance to dust and wa
poor visibility in sunlight and low touch sensitivity.
Output Devices
Actuators
○ Actuators are used when a computer is used to control devices.
○ They are mechanical or electromechanical devices.
○ Examples of actuators include relays, solenoids, and motors.
Light projectors
○ Types of Projectors:
• Digital light projector (DLP)
ogies
mages
al images
sport and a
n "slices."
methods.
of the whole solid
resistive.
ss substrate. They
eens allow multi-
s broken,
e applied across
ty.
are sensitive to
n be sensitive to
ater but have
○ They are mechanical or electromechanical devices.
○ Examples of actuators include relays, solenoids, and motors.
Light projectors
○ Types of Projectors:
• Digital light projector (DLP)
• Liquid crystal display (LCD) projector
• Uses:
• Project computer output onto larger screens or interactive whiteboards
• Used in presentations and multimedia applications
• DLP Projector:
• Uses a digital micromirror device (DMD) chip with millions of micro mirrors
• Micro mirrors tilt towards or away from the light source to create light or dark p
• Micro mirrors can switch on or off several thousand times a second to create var
• Bright white light source passes through a colour filter and creates over 16 millio
• DMD chip contains several thousand microscopic mirrors arranged on the chip s
• LCD Projector:
• Uses high-intensity beam of light passing through an LCD display and then onto a
• Beam of light is sent to chromatic-coated mirrors, reflecting back at different wa
• Three different coloured light components pass through three LCD screens
• Three different versions of the same image are produced
• Images are re-combined using a special prism to produce a full colour image
• Final image passes through projector lens onto a screen
Inkjet and laser printers
Inkjet
• Inkjet printers have a print head, ink cartridge(s), stepper motor and belt, and paper fe
• Two technologies for producing ink droplets are thermal bubble and piezoelectric.
• In thermal bubble technology, resistors create heat that makes ink vaporize into a tiny
ejects ink from the print head.
• In piezoelectric technology, a crystal is given a tiny electric charge to vibrate and force
onto the paper.
• The printing process starts with a user sending a document to the printer, which then
of steps to print the document.
pixels
rious grey shades
on colours
surface
a screen
avelengths
eed.
y bubble, which
e ink to be ejected
follows a series
• In piezoelectric technology, a crystal is given a tiny electric charge to vibrate and force
onto the paper.
• The printing process starts with a user sending a document to the printer, which then
of steps to print the document.
Laser
• Laser printers use dry powder ink and static electricity to produce text and images.
• Unlike inkjet printers, laser printers print the whole page in one go.
• Colour laser printers use 4 toner cartridges: blue, cyan, magenta, and black.
• The printing method of colour laser printers is similar to monochrome printers but use
to build up text and images.
Applications:
• Inkjet printers are good for printing one-off photos or small quantities of good quality
• Laser printers are ideal for high volume printing of high-quality monochrome or color p
• Laser printers produce high quality printouts and are very fast for making multiple cop
document
e ink to be ejected
follows a series
es coloured dots
color prints
prints
pies of a
Applications:
• Inkjet printers are good for printing one-off photos or small quantities of good quality
• Laser printers are ideal for high volume printing of high-quality monochrome or color p
• Laser printers produce high quality printouts and are very fast for making multiple cop
document
• Laser printers have large toner cartridges and paper trays that can hold more than a re
3D Printers
• 3D printers produce solid objects layer by layer using materials such as powdered resin
or ceramic.
• They are based on inkjet and laser printer technology.
• Various types of 3D printers exist, ranging from the size of a microwave oven to a sma
• 3D printers use additive manufacturing (building up layers) instead of subtractive man
(removing material).
• Direct 3D printing uses inkjet technology to build up layers of an object.
• Binder 3D printing uses two passes for each layer, spraying dry powder first and then a
solid layer.
• Newer technologies are using lasers and UV light to harden liquid polymers, increasing
products that can be made.
Uses:
• 3D printing can revolutionize manufacturing in various industries
• 3D printing can create prosthetic limb coverings and parts for precision reconstructive
• Aerospace manufacturers are exploring 3D printing for lightweight and precise parts
• 3D printing is being used in fashion and art for innovative creations
• 3D printing can make parts for items no longer in production, such as suspension parts
LED and LCD screens
• LED Screens:
○ Made of tiny light emitting diodes (LEDs) in red, green, or blue colors
○ Used for large outdoor displays due to the brilliance of colors produced
○ Recent advancements led to OLED screens
○ Careful not to confuse with LCD screens which require backlighting using LEDs
• LCD Screens:
○ Made of tiny liquid crystals
○ Require backlighting using LEDs (or previously CCFL)
color prints
prints
pies of a
eam of paper.
n, metal, paper
all car.
nufacturing
a binder to form a
g the diversity of
e surgery
s for vintage cars.
Download