Chapter3_Hardware

Syllabus

Computers and their components

  • IO

    • Input

      Accepts information from human operations, electromechanical devices, other computers, etc.

    • Output

      Sends results of processing

  • Storage

    • Primary storage
      • Primary storage can be accessed directly from the CPU
      • Contains ROM (random access memory) and RAM (read-only memory)
    • Secondary storage
      • Storage devices that are not directly accessible by the CPU
      • Non-volatile devices
  • Embedded systems

    • Microprocessor within a larger system (e.g. washing machine, cooker, refrigerator…)
    • Microprocessor that perform one specific task (e.g. connect to a web so the system can be turned on or off by a program on smartphone)
  • Principal operations

    • Laser printer
      • The revolving drum is initially given an electrical charge
      • A laser beam scans back and forth across the drum
      • … discharging certain points (which matches with the shape of texts and images to be printed)
      • The drum is coated with oppositely charged toner
      • The drum rolls over electro-statically charged paper
      • The “pattern” on the drum is transferred to the paper
      • The paper is passed through the fuser to seal the image
      • The electrical charge is removed from the drum using discharging bulb
    • 3D printer
      • Produces solid, 3D objects/prototypes
      • Used in CAD/CAM
      • Make use of tomography/slices of an object
    • Microphone
      • The microphone has a diaphragm
      • The incoming sound waves cause vibrations of the diaphragm
      • … causing a coil to move past a magnet
      • A electrical signal is produced
    • Speakers
      • Takes an electrical signal and translates it into physical vibrations to create sound waves
      • An electric current in the coil creates an electro-magnetic field
      • Changes in the audio signal causes the direction of the electric current to change
      • The direction of the current determines the polarity of the electromagnet
      • The electro-magnet is repelled by or attracted to the permanent magnet
      • Causing the coil to vibrate
      • The movement of the coil causes the cone/diaphragm to vibrate
      • That vibration is transmitted to the air in front of the cone
      • The amount of movement will determine the frequency and amplitude of the sound wave produced
    • Magnetic hard disk
      • The hard disk has one or more platters made of aluminum or glass
      • Each surface of the platter is capable of being magnetized
      • The disks are mounted on a central spindle
      • The disks are rotated at high speed
      • Each surface of the disk has a read/write head mounted on an arm positioned just above the surface
      • Electronic circuits control the movement of the arm and hence the heads
      • The surface of the disk is divided into concentric tracks and sectors
      • One track in one sector is the basic unit of storage called a block
      • The data is encoded as magnetic pattern for each block
      • When writing to disk, a variation in the current in the head produced a variation in magnetic field on the disk
      • When reading, variation in the magnetic field produced a variation in current through the head
    • Solid state memory
      • No moving parts
      • Solid stats memory is non-volatile
      • Makes use of NAND gates (transistors)
      • SSD controller manages the components
      • Uses a grid of columns and rows that has two transistors at each intersection
      • One transistor is called a floating gate
      • The second transistor is called the control gate
      • Memory cells store voltages which can represent either a 0 or a 1
      • Essentially the movement of electrons is controlled to read/write
      • The old data needs to be erased in order to write the new data in the same location
    • Optical disc reader/writer
      • Drive motor is used to spin the disc
      • Tracking mechanism moves the laser assembly
      • A lens focuses the laser onto the disc
      • Laser beam is shone onto disc to read/write
      • Surface of disc has a reflective metal layer
      • Tracks on the disc have sequence of pits and lands
      • Reflected light is then encoded as a bit pattern
    • Touchscreen
      • Resistive touchscreen
        • Consists of two charged plates
        • Upper layer made if plastic and bottom layer made of glass
        • Gap between the layers
        • Pressure causes the plates to touch
        • Top layer moves to touch the bottom layer
        • The circuit is completed when 2 layers touch
        • The point of contact is registered
        • The position is calculated using coordinates
      • Capacitive touchscreen
        • Made from materials that store electric charge
        • Acts like capacitors
        • When touched, the charge is transferred to the finger
        • There is a change in the electrostatic field
        • Sensors at the screen corners detect the change
        • One board microprocessor
        • Point of contact is registered
        • Coordinates is used to calculate the position
    • Virtual reality headset
      • Video is sent from a computer to the headset
      • Two feeds are sent to an LCD/OLED display
      • Lenses placed between the eyes and the screen allow for focusing and reshaping the image for each eye, thus giving a 3D effect
      • Most headsets use 110 field of view, which is enough to give a pseudo 360 surround image
      • A frame rate of 60 to 120 images per second
      • As user moves their head, a series of sensors measure this movement, which allows the image/video on the screen to react to the user’s head movements
      • Headsets also use binaural sound
      • Infra-red sensors to monitor eye movement
  • Buffers

  • RAM vs ROM

    • RAM (Random Access Memory)
      • Stores the runtime data (e.g. data read from sensors)
      • Memory location can be accessed independent of which memory location was last used
      • Can be written to or read from, and the data stored can be changed by the user or by the computer
      • Used to store data, files, part of an application or part of the operating system currently in use
      • Volatile (memory contents are lost on powering off the computer)
      • Memory sizer is often larger than ROM
      • Can be increased in size to improve the operational speed of computer
    • ROM (Read Only Memory)
      • Store the start-up instructions
      • It cannot be written to or changed
      • Permanent memory device
      • Non-volatile memory device
      • Data stored cannot be altered
      • Sometimes used to store BIOS and other data needed at start up
  • SRAM vs DRAM

    • SRAM is much faster than DRAM when it comes to data access
    • DRAM is the most common type of RAM used in computers
  • PROM vs EPROM vs EEPROM

    • PROM (Programmable Read-Only Memory)
      • Can be altered once
      • Made up of a matrix of fuses
    • EPROM (Erasable Programmable Read-Only Memory)
      • Use floating gate transistors and capacitors
      • Reusable
      • Using UV light to erase
      • ROM (primary)
    • EEPROM (Electronically Erasable PROM)
      • Used in solid state storage device
      • Faster but more expensive than flash drive
      • Using pulsed voltage to erase
      • SSD (secondary)
  • Monitoring and control system

    • Monitoring system
      • If the new data is outside the acceptable range, a warning message is sent to a screen or an alarm is activated
      • The microprocessor or computer has no effect on what is being monitored - it is simply “watching” the process
      • Examples
        • Monitoring a patient in a hospital for vital signs such as heart rate, temperature, etc.
        • Checking for intruders in a burglar alarm system
        • Checking the temperature level in a car engine
        • Monitoring the pollution level in a river
    • Control system
      • If the new data is outside the acceptable range, the microprocessor or computer sends signals to control valves, motors, etc.
      • The output from the system affects the next set of inputs from the sensors
      • Examples
        • Turning street lights on at night and turn them off again during daylight
        • Controlling the temperature in a central heating/air conditioning system
        • Controlling the traffic lights at a road conjunction
        • Controlling the environment in a green house

Screenshot 2023-02-10 at 15.12.55

Logic gates and logic circuits

  • Logic gates

    IMG_AF736B9BC6FF-1.jpeg

  • Truth tables

    • NOT

      $A$ $X$
      $0$ $1$
      $1$ $0$
    • AND

      $A$ $B$ $X$
      $0$ $0$ $0$
      $0$ $1$ $0$
      $1$ $0$ $0$
      $1$ $1$ $1$
    • OR

      $A$ $B$ $X$
      $0$ $0$ $0$
      $0$ $1$ $1$
      $1$ $0$ $1$
      $1$ $1$ $1$
    • NAND

      $A$ $B$ $X$
      $0$ $0$ $1$
      $0$ $1$ $1$
      $1$ $0$ $1$
      $1$ $1$ $0$
    • NOR

      $A$ $B$ $X$
      $0$ $0$ $1$
      $0$ $1$ $0$
      $1$ $0$ $0$
      $1$ $1$ $0$
    • XOR

      $A$ $B$ $X$
      $0$ $0$ $0$
      $0$ $1$ $1$
      $1$ $0$ $1$
      $1$ $1$ $0$