Computers are an essential part of modern life, used in everything from simple tasks like browsing the internet to complex operations like managing industrial systems. To function effectively, computers rely on different types of memory, storage devices, and hardware components. In this lecture, we will explore primary and secondary storage, embedded systems, input/output devices, different types of RAM and ROM, logic gates, and monitoring/control systems.
The central processing unit (CPU), often called a microprocessor or processor, is the heart of all modern computer systems, including tablets and smartphones. It is typically installed as an integrated circuit on a single microchip. The CPU is tasked with executing and processing all the instructions and data in a computer application.
The CPU is composed of several key components: the control unit (CU), the arithmetic and logic unit (ALU), registers, and buses. These components work in harmony to ensure the smooth operation of the computer. The CU manages the flow of data and instructions, the ALU performs arithmetic and logical operations, registers store data temporarily, and buses facilitate communication between different parts of the CPU and other components in the computer.
In the mid - 1940s, John von Neumann developed the concept of the “stored program computer,” which has since been the foundation of computer architecture. Prior to this, early computers had to be fed data during operation and could not store programs or data, relying heavily on human intervention.
The von Neumann architecture introduced several novel features. It brought about the concept of a central processing unit. The CPU in this architecture could access memory directly, and computer memories were capable of storing both programs and data. Stored programs were made up of instructions that could be executed sequentially.
A typical von Neumann CPU architecture diagram includes components such as the address bus, data bus, memory address register (MAR), memory data register (MDR), program counter (PC), control bus, control unit (CU), current instruction register (CIR), arithmetic and logic unit (ALU), and accumulator (ACC).
The ALU is responsible for performing arithmetic operations like addition, subtraction, and shifting, as well as logic operations such as AND, OR. Multiplication and division are achieved through a series of addition, subtraction, and shift operations. For instance, when multiplying two numbers, the ALU might use repeated addition.
The CU reads instructions from memory. The address of the instruction is stored in the PC. It then interprets the instruction using the Fetch - Decode - Execute cycle. During this process, the CU generates signals on the control bus to direct other components in the computer. A system clock is crucial for this process as it produces timing signals on the control bus, ensuring synchronization. Without the clock, the computer would experience chaotic and unsynchronized operations, likely crashing.
Registers are fundamental components in the von Neumann system. Special - purpose registers include the CIR, which stores the current instruction being decoded and executed; the ACC, used for ALU calculations and storing data temporarily during calculations; the MAR, which holds the address of the memory location being read from or written to; the MDR, which stores data read from or written to memory; and the PC, which stores the address of the next instruction to be read.
System buses, including the address bus, data bus, and control bus, play a vital role in connecting the CPU to memory and input/output devices. The address bus carries addresses throughout the system; between the CPU and memory, it is unidirectional to prevent addresses from being sent back to the CPU. The width of the address bus is significant as it determines the number of memory locations that can be directly addressed. A wider bus allows for addressing more memory locations. For example, a 16 - bit address bus can address \(2^{16}\)(65,536) memory locations, while a 32 - bit bus can address 4,294,967,296 memory locations.
The data bus is bidirectional, enabling data transfer between the CPU and memory, as well as between the CPU and input/output devices. Data can be an address, an instruction, or a numerical value. Similar to the address bus, the width of the data bus affects the word length that can be transported. Larger word lengths generally improve the computer's overall performance.
The control bus is also bidirectional and typically 8 - bits wide. It carries control signals from the CU to all other computer components. Since it only needs to carry control signals, there is no real need for it to be wider.
To execute a set of instructions, the CPU goes through the Fetch - Decode - Execute cycle. In the fetch stage, data and instructions are fetched from the memory address stored in the MAR and stored in the MDR. The contents of the MDR are then copied to the CIR, and the PC is incremented so that the next instruction can be processed.
In the decode stage, the instruction in the CIR is decoded to understand what operation needs to be performed. This involves breaking down the instruction into its opcode (which tells the CPU what operation to do) and operand (the data on which the operation is to be performed or a reference to a register in memory).
Finally, in the execute stage, the CPU sends the decoded instruction as a set of control signals to the appropriate components in the computer system. This allows each instruction to be carried out in the correct logical sequence. For example, if the instruction is an addition operation, the ALU will perform the addition using the data specified in the operand.
The performance of a CPU is determined by several factors. The system clock plays a crucial role as it defines the clock cycle that synchronizes all computer operations. The control bus transmits timing signals based on the clock, ensuring everything is in sync. Increasing the clock speed generally increases the processing speed of the computer. For example, a typical current clock speed of 3.5 GHz means the computer can perform 3.5 billion clock cycles per second.
However, increasing the clock speed does not necessarily guarantee an overall performance increase. The width of the address bus and data bus also affects computer performance. A wider address bus allows for accessing more memory locations, and a wider data bus enables transporting larger word lengths, both of which can enhance performance.
Overclocking, which involves changing the clock speed by accessing the BIOS and altering settings, can increase performance but also has risks. Executing instructions outside the design limits can lead to unsynchronized operations, causing the computer to crash frequently. Overclocking can also cause the CPU to overheat, leading to unreliable performance.
Cache memories can significantly improve CPU performance. Unlike RAM, cache memory is located within the CPU itself, resulting in much faster data access times. It stores frequently used instructions and data, allowing the CPU to access them more quickly. When the CPU needs to read memory, it first checks the cache. If the required data is not there, it then accesses the main memory/RAM. The larger the cache memory size, the better the CPU performance.
The use of multiple cores can also enhance computer performance. A core consists of an ALU, a control unit, and registers. Many computers are dual - core (with two cores) or quad - core (with four cores). Using more cores reduces the need to constantly increase clock speeds. However, doubling the number of cores does not necessarily double the computer's performance. The CPU needs to communicate with each core, and this communication overhead can reduce overall performance. For example, in a dual - core CPU, the CPU communicates with both cores using one channel, while in a quad - core CPU, it uses six channels, which reduces the potential performance increase.
In a computer system, instructions are a set of operations decoded in sequence. Each operation consists of an opcode and an operand. The opcode tells the CPU what operation to perform, such as addition, subtraction, or a jump to a different part of the program. The operand is the data on which the operation is to be carried out or a reference to a register in memory.
The set of all possible opcodes for a particular CPU is called the instruction set. All software running on a computer contains a set of instructions that need to be converted into binary for the computer to understand. The Fetch - Decode - Execute cycle is used to process each instruction in sequence.
One example of an instruction set is the X86, which is a common CPU standard used in many modern computers. Different computer manufacturers may have different internal electronic designs, but if the computer is based on the X86 CPU, they will share almost identical instruction sets. For example, Intel Pentium and AMD Athlon CPUs use similar X86 instruction sets despite their different designs.
It is important not to confuse instruction sets with programming code. Instruction sets are low - level language instructions that tell the CPU how to perform an operation. Program code, on the other hand, needs interpreters or compilers to convert it into the instruction set understood by the computer. Some common instruction set operations include ADD (for addition), JMP (for jump), and LDA (for load accumulator).
An embedded system is a combination of hardware and software designed to carry out a specific set of functions. The hardware can be electronic, electrical, or electro - mechanical. Embedded systems can be based on microcontrollers, microprocessors, or system - on - chips (SoC).
A microcontroller has a CPU, some RAM, ROM, and other peripherals all embedded on a single chip, and together they perform a specific task. A microprocessor, on the other hand, is an integrated circuit with only a CPU on the chip, and additional components like RAM, ROM, and peripherals need to be added. System - on - chips often contain a microcontroller as one of their components and typically include a CPU, memory, input/output ports, and secondary storage on a single microchip.
Embedded systems are feedback - oriented and have a specific set of tasks. They can receive input from an operator, such as selecting a temperature on a keypad, or from an automatic source like a sensor. The input can be analogue or digital. For example, in a car's engine management system, sensors may measure oxygen levels or fuel pressure. The output of the embedded system then controls the components it is designed to operate, such as increasing the power to heating elements in an oven or adjusting fuel levels in an engine.
Embedded systems can be either programmable or non - programmable. Non - programmable devices generally need to be replaced if a software upgrade is required. Programmable devices can be upgraded in two ways: by connecting to a computer and downloading updates, like updating maps on a GPS system in a vehicle, or through automatic updates via a Wi - Fi, satellite, or cellular link, as seen in many modern cars for engine management system updates.
There are both benefits and drawbacks to using embedded systems. Their small size makes them easy to fit into devices, and they are relatively low - cost to manufacture. They are dedicated to one task, often allowing for simple interfaces and may not require an operating system. They consume very little power and can be controlled remotely. However, they can be difficult to upgrade, and troubleshooting faults can be a specialist task. The interface may seem simple but can be confusing to use, and devices controlled by embedded systems that are connected to the internet are vulnerable to hackers and viruses. Also, due to upgrade and fault - finding difficulties, devices are often discarded rather than repaired, contributing to a “throw - away” society.
Motor Vehicles: Modern cars rely heavily on embedded systems. Components such as in - car entertainment systems, GPS systems, airbags, fuel injection systems, exhaust emissions control, traction control, vehicle security, and ABS braking are all controlled by embedded systems. For example, the fuel injection system uses an embedded system to precisely control the amount of fuel injected into the engine based on various sensor inputs like engine speed and load.
Set - top Box: A set - top box uses an embedded system to enable functions like recording and playing back television programs. It can be operated remotely by the user when away from home using an internet - enabled device or through the interface panel at home. The embedded system manages inputs from sources such as a solid - state device (SSD) for storing and retrieving programs and satellite signals, decoding the incoming signals for proper display.
Security Systems: Embedded systems are widely used in security devices. In a security system, the security code is set in RAM, and the alarm is activated or deactivated using a keypad. Sensors, such as temperature, pressure, and acoustic sensors, send data to the controller. The controller checks this data against values stored on an SSD (settings are stored on SSD to prevent loss in case of power failure or RAM reset). If an intrusion is detected, the output can be a signal to flash lights, sound an alarm, or send a message to the homeowner's mobile phone.
Lighting Systems: Embedded systems are used in modern lighting systems, from simple home use to large - scale architectural lighting. In an office environment, an embedded system can control the lighting based on factors like the time of day, whether the room is occupied, and the brightness of natural light. For example, it can dim the lights on a sunny day and restore proper lighting levels when someone enters the room. Some lighting systems use Bluetooth - enabled LED bulbs, allowing the embedded system to control each bulb independently.
Vending Systems: Vending machines make extensive use of embedded systems, typically in the form of microcontrollers. Inputs to the system come from the keypad for item selection, sensors for coin counting, temperature monitoring, and security (tilt sensors). Outputs include actuators to operate motors for dispensing items, signals to control the cooling system, item descriptions and change displays on an LCD panel, and data transmission back to the vending machine operator for remote monitoring and restocking instructions.
Washing Machines: Many “white goods” like washing machines are controlled by embedded systems. The user selects settings such as temperature and wash cycle using a keypad or dials. The embedded system then carries out the required tasks without further human intervention. These appliances can also be operated remotely using an internet - enabled smartphone or computer.
2.1.1 Function and Importance
Random - Access Memory, commonly known as RAM, is a vital component of a computer's primary storage. It acts as a temporary workspace for the CPU. When a user runs a program, the necessary instructions and data are loaded from secondary storage (such as a hard drive) into RAM. This is because the CPU can access data in RAM much more quickly than from secondary storage. For example, when you open a word - processing application, the application's code and the document you are working on are loaded into RAM. The CPU can then rapidly read and write data from/to RAM, enabling smooth and efficient operation of the program.
2.1.2 Types of RAM
2.1.2.1 Dynamic RAM (DRAM)
DRAM is the most widely used type of RAM in personal computers. It stores each bit of data in a separate capacitor within an integrated circuit. However, the charge in these capacitors leaks over time, so DRAM needs to be refreshed constantly, typically every few milliseconds. This refreshing process consumes some time and power. DRAM is relatively inexpensive to manufacture and can offer high - capacity storage at a reasonable cost. For instance, a typical desktop computer might have 8GB or 16GB of DRAM installed.
2.1.2.2 Static RAM (SRAM)
SRAM
2.2.1 Characteristics
Read - Only Memory is non - volatile, meaning that its contents are retained even when the power is turned off. As the name suggests, it is primarily designed for reading data. In most cases, the data stored in ROM cannot be easily modified. ROM is used to store essential information that is required for the computer to start up and function properly.
2.2.2 Types of ROM
2.2.2.2 Programmable Read - Only Memory (PROM)
PROM allows the user to program the data once. A special programming device is used to burn the data into the PROM chip. After programming, the data is fixed, and the chip cannot be reprogrammed. PROM was useful in early computing when users needed to store custom - made programs or data.
2.2.2.3 Erasable Programmable Read - Only Memory (EPROM)
EPROM can be erased and reprogrammed. To erase the data, the EPROM chip is exposed to ultraviolet light through a transparent window on the chip. After erasure, new data can be written to the chip using a programming device. This made EPROM more flexible than PROM, as it could be reused.
2.3.1 Volatility
RAM is volatile, which means that all data stored in it is lost when the power is turned off. This is why it is used for temporary storage during the computer's operation. In contrast, ROM is non - volatile, ensuring that critical data like the BIOS (Basic Input/Output System) remains intact even after a power cycle.
2.3.2 Read/Write Capabilities
2.3.3 Functions
RAM provides the working space for the CPU to execute programs and process data. It holds the current state of the computer's operations. ROM, on the other hand, stores the fundamental instructions that are necessary for the computer to start up and initialize its hardware components.
3.1.1 Hard Disk Drives (HDD)
3.1.1.1 Structure and Working Principle
A hard disk drive consists of one or more circular platters coated with a magnetic material. These platters spin at high speeds, typically 5400, 7200, or even 10000 revolutions per minute (RPM). Data is stored on the platters in the form of magnetic patterns. Read - write heads, which are tiny electromagnets, float just above the surface of the platters to read and write data. The heads are attached to an actuator arm that moves them across the platters to access different locations.
3.1.1.2 Data Organization
Data on an HDD is organized into tracks, sectors, and cylinders. A track is a circular path on the platter, and sectors are small segments of a track. Each sector can store a fixed amount of data, usually 512 bytes. Cylinders are formed by the same - numbered tracks on all the platters in a multi - platter HDD.
3.1.2.1 Working Mechanism
Magnetic tape drives use a long, thin strip of magnetic tape to store data. The tape is wound around reels, and the drive moves the tape past a read - write head. Data is written onto the tape in a sequential manner. When reading data, the drive has to move the tape to the correct position to access the desired information.
3.1.2.2 Applications
Magnetic tape drives are mainly used for long - term data storage and backup. They offer very high storage capacities at a low cost per gigabyte. For example, large - scale data centers often use magnetic tape libraries to store archival data. However, the sequential access nature of magnetic tape means that accessing specific data can be very slow.
3.2.1 Compact Disc (CD)
3.2.1.1 Types of CDs
There are several types of CDs, including CD - ROM (Compact Disc Read - Only Memory), CD - R (Compact Disc Recordable), and CD - RW (Compact Disc Rewritable). CD - ROMs are pre - pressed with data and cannot be written to by the user. CD - Rs allow the user to write data to the disc once. After writing, the data becomes permanent. CD - RWs, on the other hand, can be written to, erased, and rewritten multiple times.
3.2.1.2 Data Storage and Retrieval
Data on a CD is stored as a series of pits and lands on the disc's surface. A laser beam is used to read the data. When the laser hits a pit, the reflected light is different from when it hits a land. This difference in reflection is detected by a photodetector, which converts it into digital data.
3.2.1.3 Limitations
CDs have relatively low storage capacities compared to other modern storage devices. A standard CD can store up to 700MB of data. They are also more prone to scratches and damage, which can affect data retrieval.
3.2.2 Digital Versatile Disc (DVD)
3.2.2.1 Types of DVDs
Similar to CDs, DVDs come in different types, such as DVD - ROM, DVD - R, DVD + R, DVD - RW, and DVD + RW. DVD - ROMs are read - only, while the recordable and rewritable versions allow users to store their own data. DVDs can also have dual - layer capabilities, which significantly increase their storage capacity.
3.2.2.2 Advantages over CDs
DVDs offer much higher storage capacities than CDs. A single - layer DVD can store up to 4.7GB of data, and a dual - layer DVD can store up to 8.5GB. This makes DVDs more suitable for storing large - size files such as movies and high - definition content.
3.2.3 Blu - ray Disc (BD)
3.2.3.1 High - Capacity Storage
Blu - ray Discs are designed for high - definition video and large - scale data storage. A single - layer Blu - ray Disc can store up to 25GB of data, and a dual - layer disc can store up to 50GB. The high storage capacity is achieved by using a blue - violet laser, which has a shorter wavelength than the red laser used in DVDs and CDs. This allows for smaller pits and lands on the disc, enabling more data to be stored.
3.2.3.2 Future - Proofing for Multimedia
As the demand for high - definition video and large - size data files continues to grow, Blu - ray Discs are well - positioned to meet these needs. They are commonly used for storing high - definition movies, video games, and large - scale data backups.
3.3.1 Solid - State Drives (SSD)
3.3.1.1 Technology and Architecture
SSDs use flash memory technology to store data. Flash memory consists of a matrix of floating - gate transistors. Data is stored as electrical charges on the floating gates of these transistors. When a voltage is applied, the charge on the floating gate can be changed, representing a change in the stored data. SSDs do not have any moving parts, which makes them more reliable and less prone to mechanical failures compared to HDDs.
3.3.1.2 Performance Advantages
SSDs offer significantly faster data access times than HDDs. They can read and write data much more quickly, especially when it comes to random access. This results in faster boot times for computers, quicker application launches, and improved overall system performance. For example, a computer with an SSD can boot up in a matter of seconds, while a computer with an HDD may take a minute or more.
3.3.1.3 Cost and Capacity Considerations
Although the cost per gigabyte of SSDs has been decreasing over the years, they are still more expensive than HDDs. However, as technology advances, the price gap is narrowing. In terms of capacity, SSDs are available in a wide range, from a few gigabytes to several terabytes, but for very large - scale storage requirements, HDDs may still be more cost - effective.
3.3.2 USB Flash Drives
3.3.2.1 Portability and Convenience
USB flash drives are small, portable storage devices that use flash memory. They can be easily connected to a computer's USB port, making them very convenient for transferring data between different computers. They are also lightweight and can be carried around in a pocket or on a keychain.
3.3.2.2 Storage Capacity and Usage
USB flash drives are available in various storage capacities, ranging from a few gigabytes to several terabytes. They are commonly used for storing documents, photos, videos, and other types of files. They are also useful for creating bootable media, such as a bootable USB drive for installing an operating system.
Off - line storage is crucial for data protection. In case of a disaster such as a fire, flood, or a cyber - attack, having data stored in an off - site location can prevent permanent data loss. Off - line storage also provides an extra layer of security against unauthorized access.
4.2.1 External Hard Drives
External hard drives, whether they are HDD - based or SSD - based, are a popular choice for off - line storage. They can be easily disconnected from the computer and stored in a safe location. They offer high storage capacities and can be used to back up large amounts of data, such as an entire computer's hard drive.
4.2.2 Tape Libraries
Tape libraries are often used in large - scale data centers for off - line storage. They can store a vast amount of data in a relatively small physical space. The tapes can be removed from the library and stored in a secure off - site location.
4.2.3 Cloud Storage with Off - Line Options
Some cloud storage providers offer the option to download data to an external storage device for off - line use. This allows users to have a local copy of their data while still benefiting from the cloud's storage capacity and accessibility.
SCSI is a more high - end interface that is commonly used in enterprise - level storage systems. It supports multiple devices on a single bus and offers high - speed data transfer. SCSI is known for its reliability and is often used in servers and storage arrays where performance and data integrity are critical.
USB is a widely used interface for connecting various types of devices, including storage devices such as USB flash drives and external hard drives. It is very convenient and supports plug - and - play functionality. USB has also evolved over time, with USB 3.0 and USB 3.1 offering much higher data transfer rates compared to the earlier versions.
PCIe is a high - speed interface that is used to connect storage devices directly to the computer's motherboard. It offers extremely fast data transfer rates and is commonly used in high - performance SSDs. PCIe - based SSDs can provide significantly better performance than those using traditional interfaces such as SATA.
As technology continues to advance, we can expect storage devices to have even higher storage densities. This means that more data can be stored in a smaller physical space. For example, new materials and manufacturing techniques may be developed to increase the storage capacity of SSDs and HDDs.
The demand for faster data transfer rates will continue to grow. Future storage devices are likely to offer even higher speeds, enabling quicker access to data and more efficient data processing. This may be achieved through the development of new interfaces and storage technologies.
There is a trend towards integrating storage and computing capabilities. This means that storage devices may be able to perform some data processing tasks directly, reducing the need to transfer large amounts of data between the storage device and the CPU. This can lead to improved system performance and energy efficiency.
Storage devices are an essential part of modern computer systems. From the primary storage of RAM and ROM to the various secondary and off - line storage options, each type of storage device has its own unique characteristics, advantages, and limitations. As technology progresses, we can expect to see continuous improvements in storage capacity, data transfer rates, reliability, and security. Understanding the different types of storage devices and their capabilities is crucial for users, whether they are individuals looking to store personal data or large - scale enterprises managing vast amounts of information. By making informed decisions about storage, we can ensure the efficient and secure management of our digital assets.
Storage devices
Key terms / vocabulary
Memory cache – high speed memory external to processor which stores data which the
processor will need again.
Random access memory (RAM) – primary memory unit that can be written to and read from.
Read-only memory (ROM) – primary memory unit that can only be read from.
Dynamic RAM (DRAM) – type of RAM chip that needs to be constantly refreshed.
Static RAM (SRAM) – type of RAM chip that uses flip-flops and does not need refreshing.
Refreshed – requirement to charge a component to retain its electronic state.
Programmable ROM (PROM) – type of ROM chip that can be programmed once.
Erasable PROM (EPROM) – type of ROM that can be programmed more than once using
ultraviolet (UV) light.
Hard disk drive (HDD) – type of magnetic storage device that uses spinning disks.
Latency – the lag in a system; for example, the time to find a track on a hard disk, which
depends on the time taken for the disk to rotate around to its read-write head.
Fragmented – storage of data in non-consecutive sectors; for example, due to editing and
deletion of old data.
Removable hard disk drive – portable hard disk drive that is external to the computer; it can
be connected via a USB part when required; often used as a device to back up files and data.
Solid state drive (SSD) – storage media with no moving parts that relies on movement of
electrons.
Electronically erasable programmable read-only memory (EEPROM) – read-only (ROM)
chip that can be modified by the user, which can then be erased and written to repeatedly using
pulsed voltages.
Flash memory – a type of EEPROM, particularly suited to use in drives such as SSDs,
memory cards and memory sticks.
Optical storage – CDs, DVDs and Blu-rayTM discs that use laser light to read and write data.
Dual layering – used in DVDs; uses two recording layers.
Birefringence – a reading problem with DVDs caused by refraction of laser light into two
beams.
Binder 3D printing – 3D printing method that uses a two-stage pass; the first stage uses dry
powder and the second stage uses a binding agent.
Direct 3D printing – 3D printing technique where print head moves in the x, y and z
directions. Layers of melted material are built up using nozzles like an inkjet printer.
Digital to analogue converter (DAC) – needed to convert digital data into electric currents
that can drive motors, actuators and relays, for example.
Analogue to digital converter (ADC) – needed to convert analogue data (read from sensors,
for example) into a form understood by a computer.
Organic LED (OLED) – uses movement of electrons between cathode and anode to produce
an on-screen image. It generates its own light so no back lighting required.
Screen resolution – number of pixels in the horizontal and vertical directions on a
television/computer screen.
Touch screen – screen on which the touch of a finger or stylus allows selection or
manipulation of a screen image; they usually use capacitive or resistive technology.
Capacitive – type of touch screen technology based on glass layers forming a capacitor, where
fingers touching the screen cause a change in the electric field.
Resistive – type of touch screen technology. When a finger touches the screen, the glass layer
touches the plastic layer, completing the circuit and causing a current to flow at that point.
Virtual reality headset – apparatus worn on the head that covers the eyes like a pair of
goggles. It gives the user the ‘feeling of being there’ by immersing them totally in the virtual
reality experience.
Sensor – input device that reads physical data from its surroundings.
Types of memory
Digital to analog
Analog to digital