Computer Architecture Multiple Choice Test PDF
Document Details
Uploaded by ArtisticBlackberryBush
Tags
Summary
This document covers various aspects of computer architecture, including Von Neumann and Harvard architectures, motherboard components, CPU components, and different interface standards. It includes questions and examples to illustrate the topics.
Full Transcript
# Von Neumann and Harvard Architectures ## Von Neumann-Definition - Memory holds both data and program. - Data and programs are stored together. - It is a diagram showing the CPU memory, control unit, arithemtic logic unit, and accumulator. - Two boxes representing **data** and **program**...
# Von Neumann and Harvard Architectures ## Von Neumann-Definition - Memory holds both data and program. - Data and programs are stored together. - It is a diagram showing the CPU memory, control unit, arithemtic logic unit, and accumulator. - Two boxes representing **data** and **program** are shown inside the memory unit. - Arrows between the boxes show how the control unit and the ALU interact with the memory unit. - **Question:** How do we know what we get inside the CPU - Program or Data? - **Rule:** We assume the first piece of information is always a command, followed by possibly data. ## Harvard-Definition - Programs (commands) and data are stored separately. - It is a diagram of the CPU showing the ALU, instruction memory, control unit, data memory and the 1/0 unit. - Two boxes, **instruction memory** and **data memory**, represent separate memory units for programs and data. - **Question:** How do we know what we get inside the CPU - Program or Data? - **Rule:** We know that information from instruction memory is a command and information from data memory is data. ## The Motherboard - The motherboard is the backbone of the computer. - It is a printed circuit board (PCB) that contains buses and electrical pathways. - These components may be soldered directly to the motherboard or added using sockets, expansion slots, and ports. ## The Modern Motherboard - It is a photo of a modern motherboard. - The image shows several components, labels, and connectors. - **BIOS:** Boot program to power up the motherboard and configure the chipset devices. ## Which one CISC or RISC CPU's? - **RISC (Reduced Instruction Set Computer)** and **CISC (Complex Instruction Set Computer)** - Both are popular processor architectures that use different data processing instruction sets. - **CISC:** - Reduced code size. - More efficient memory use. - Popular. - **RISC:** - Simpler instructions. - Faster execution. - Lower power consumption. - **CISC:** - Slower execution. - More complex design. - Higher power consumption. - **RISC:** - More instructions needed. - Increased memory usage. - Higher cost. ## The System Bus Model - Although the von Neumann model prevails in modern computers, it has been streamlined. - The below figure shows a diagram of the system bus model of a computer system. - This model partitions the computer system into three subunits: - CPU - Memory - Input/Output (I/O) - This refinement of the von Neumann model combines the ALU and the control unit into one functional unit, the CPU. - The input and output units are also combined into a single I/O unit. - The System Bus consists of three buses: - Data bus - Address bus - Control bus ## The Fetch and Execute Cycle - The life and times of a CPU is that of a gopher. - It is a simple program that is often stored as a series of numbers in memory - **Load num1 (30)(10):** CPU reads 30 which is the command Load from the memory via the Bus (read cycle). - **Load num2 (30)(20):** CPU read command 10 which is num1 address from the memory via the Bus ( read cycle). - **Add num1+num2 (40):** Now has whole command (fetch cycle complete (30, 10) -> Load num1. CPU now does the command "execute cycle"- the number is read from location 10 and stored in the CPU. - **Store answer in num3 (40)(40):** CPU reads 30 which is the command Load from the memory via the Bus (read cycle). ## The CPU Components - The Central Processing Unit (CPU) has two major components: - Control unit. - Arithmetic-Logic Unit (ALU). - It also has a number of special registers that carry out these operations. - A register is a very fast memory location. ## The CPU Components + Registers - A diagram of the central processing unit, the arithmetic-logic unit, and registers. - Registers include: - PC - CIR - AC - MAR - MDR ## The CPU Components - "The control unit co-ordinates and controls all the operations carried out by the computer." - The control unit: - Controls and monitors hardware attached to the system. - Controls input and output of data. - Controls the flow of data within the CPU. ## The CPU Components - **Arithmetic Logic Unit (ALU):** Performs two sorts of operations on data: - **Arithmetic operations:** Addition, subtraction, multiplication, division. - **Logical operations:** Comparing one data item to another: is it smaller than, greater than, or equal to? ## The CPU Components - Registers - **Program Counter:** Holds the address of the next instruction to be executed. - It is located in the Control Unit. - It gets incremented as soon as that instruction has been fetched. ## The CPU Components - Registers - It is a diagram showing the CPU, control unit, arithmetic logic unit, accumulator, MDR, PC, CIR and MAR. - **Program Counter (PC):** Points to the next instruction to be executed. - **Current Instruction Register (CIR):** Holds the current instruction to be executed. - **Memory Address Register (MAR):** Stores the memory address of the current instruction and the data it uses and is used to fetch them from memory. - **Memory Data Register (MDR):** Stores the actual instruction or data that has been fetched from memory. - **ALU:** Temporarily stores arithmetic and logic results and holds the result before the results are transferred to memory. ## The CPU Components - A bus is a set of parallel wires connecting two or more independent components. - It is used to pass signals between them. - The bus is divided into three separate buses: - Data bus - Address bus - Control bus ## The CPU Connections - The electrical wires coming from the CPU can be grouped into three groups: - Address bus: 16, 32, 64, 128 bit - Data bus: 8, 16, 32, 64 bit - Control bus: read/write, clock,DMA, interrupts etc. ## The CPU - **Question:** How does a CPU work? - The standard CPU operates using a FETCH/EXECUTE cycle. - CPU spends most of its time reading the program, understanding the command, and then doing the command. - The Program/data is stored in external memory in binary/hex and is transferred into the CPU via the bus. ## Interface Standards - ISA - Industry Standard Architecture (ISA) - The development of the IBM XT/AT came with the first industry-wide interface standard. - It was an extension of the FSB (Front Side Bus). - It used the address and data bus in the form of a common connector. ## Interface Standards - PATA - The next major connector is the hard disk/DVD-ROM connection. - It is a 80-wire cable. - The connector allows connection of more than one device using a jumper. - The maximum speed a PATA (IDE) unit can achieve is 133MHz with 16 bits. - **PATA:** Parallel Advanced Technology Attachment. ## Interface Standards - SATA - Current ATA is the **Serial ATA**. - The serial version replaced the parallel cable with a differential serial cable. - This enables the operating system to support different data widths, i.e. burst mode. - It improves the transfer speed and variable transfer speeds. - The maximum speed of a SATA interface: - SATA V1: Bandwidth = 1.5 Gb/sec, Data Transfer = 150MB/sec. - SATA V2: Bandwidth = 3.0 Gb/sec, Data Transfer = 300MB/sec. - SATA V3: Bandwidth = 6.0 Gb/sec, Data Transfer = 600MB/sec. - **SATA:** Serial Advanced Technology Attachment. ## Interface standards- ISA - Industry Standard Architecture (ISA) - It is a table of the upper and lower signals in the ISA 8-bit. ## Interface standards - EISA - Extended Industry Standard Architecture (EISA) - A table showing the memory, I/O, IRQ, DACK and DRQ connections. ## Interface standards EISA - EISA Data Transfer is 16 bits 8.33 MHz Maximum speed. - It is NOT - Giga Hertz. ## Interface Standards - PCI - **Need for speed… PCI (Peripheral Component Interconnect)** - With the development of CPU's and speed improvements, the Extended Industry Standard Architecture (EISA) bus was slowing down the overall computer. - **Alt view:** Driving a sports car in first gear. - The computing industry created a closed shop standard called the 'Peripheral Component Interconnect - PCI' standard. - It introduced a new connector, motherboard, and chipsets. ## Interface Standards - PCI - **Difference between ISA and PCI:** PCI is a significantly faster bus than Extended Industry Standard Architecture (EISA). - It has a double (quadruple in rare instances) bit-width, resulting in faster data transfer. - **Why change?** Enables higher speeds: - V1 = 33MHz, V2 = 66 MHz, 8/16/32 bit data bus. - Full support from Windows 95 to Windows 11 with plug and play. - The software could automatically set up the hardware. ## Interface Standards - At the same time as CPU development is happening, graphics development also occurred. - Software/multimedia programmers moved from 2 bit black/white or 8 bit color CGA graphics. - The programmers started using 16/32 bit color with textures. - Moving large amounts of data down the FSB (Front Side Bus) through the PCI slot to the graphics card caused a problem for the FSB. ## Interface Standards AGP - Since the speed of the PCI was only 66MHz, it caused a problem. - This led to the introduction of a new standard called **Advanced Graphics Port (AGP)**. - The AGP was based on the existing PCI standard. - It enabled a speed increase from 66Mhz to 1GHz. ## Interface Standards-AGP - Developments in graphics cards are never static. - They are constantly changing between processing the rendering locally within the card or the main CPU. - Some cards have dedicated graphics processors and 1TB of memory. ## Interface Standards PCIe - Recently motherboard manufacturers have virtually phased out most of the standards. - They introduced an overall new connection called 'Pica express.' ## Interface standards PCle - The PCle specification is fairly new. - It changed the standard to a serial protocol (x1). - It allows multiple serial channels to work at the same time. - This was possible to achieve x4 x8 x16. ## Variations of Drives? - **Solid state Hard drive (SSHD):** Best of both worlds, magnetic drive and solid state drive. - **Not SSD:** SSD drive is a solid state drive with no moving parts. - **Question:** Which one is better, SSHD or SSD? - **SSHD:** - **Lifetime:** less block copy. - **Cost:** More cost effective than SSD. - **Data Capacity:** Larger capacity than SSD. - **Access Time:** Faster access time than HDD but slower than SSD. - **SSD:** - **Windows:** Better for Windows installation. - **Bulk Storage:** Better for bulk storage than SSHD. ## Choosing a Storage Drive? - When choosing a storage drive, the main factors are: - Data transfer time. - Rotational speed. - On board cache. - Form factor. - Interface standard. - Data storage size. - Cost. - Lifetime - SSD/SSHD. - **Questions:** How hot is it? Does it need water cooling? ## How are CPU's made? - CPU's are made with Silicon doped with group 3,5 materials. - The combination of adding together these semiconductors produces the **transistor (an electronic switch)**. - **Transistors** can be combined to create **more complex devices, such as logic gates**. - These logic gates are the foundation of digital circuits and computer systems. ## Basic Building Blocks - In computing, we associate **TRUE** with binary '1' and **FALSE** with binary '0'. - **Logic elements** are represented as truth tables of 0' and 1's. - **Truth table input** can be calculated by counting in binary, adding 1 each time. - 00 + 1 = 01 - 01 + 1 = 10 - 10 + 1 = 11 - **Logic gates** are fundamental building blocks of digital circuits. - **AND gate:** Output is TRUE only if both inputs are TRUE. - **OR gate:** Output is TRUE if at least one input is TRUE. - **NOT gate:** Output is the inverse of the input. ## | Blocks together to form More - Logic gates can be combined in various ways to create more complex logic functions. - **NAND gate:** A combination of an AND gate and a NOT gate. - **NOR gate:** A combination of an OR gate and a NOT gate. ## Exclusive OR - **XOR gate:** It is a diagram of an XOR gate with a truth table below. - The output is TRUE if only one input is TRUE. ## SSI, MSI, VLSI, LSI, Devices - **Basic building blocks** are joined together to create **more complex blocks**. - The complexity of the logic circuit is described based on the packing of the devices onto silicon. - **Small Scale Integration (SSI):** Devices with a few transistors on a single chip. - **Medium Scale Integration (MSI):** Devices with hundreds of transistors on a single chip. - **Large Scale Integration (LSI):** Devices with thousands of transistors on a single chip. - **Very Large Scale Integration (VLSI):** Devices with millions or billions of transistors on a single chip. ## Truth Tables - **Truth tables** are used to represent the logic functions of gates. - Shows the relationship between the input and output states of the gate. - It includes tables showing how AND, OR, NOT, NAND, NOR, and XOR gates work. ## Types of Memory - **ROM (Read Only Memory):** Data is permanently stored and cannot be modified. - **RAM (Random Access Memory):** Data is volatile, meaning it is lost when the power is turned off. - RAM includes: - **SRAM (Static RAM):** Uses latches to store data. - **DRAM (Dynamic RAM):** Uses capacitors to store data, and data needs to be refreshed periodically. - **EPROM (Erasable Programmable Read-Only Memory):** UV Light erasable ROM. - **E2PROM (Electrically Erasable Programmable Read-Only Memory):** Slow high voltage erasable ROM. - **FLASH ROM:** Low-voltage erasable ROM, provides a balance between the performance of SRAM and the affordability of DRAM. ## Memory Hierarchy - A pyramid diagram showing the memory hierarchy in a CPU. - The hierarchy is based on the speed and capacity of each memory type. - **On CPU:** - **Registers:** Fastest memory, but very small. - **Cache:** Small, but faster than main memory. - **Primary Storage:** - **Main Memory:** Larger than cache, but slower. - **Secondary Storage:** - **Flash Disk:** Relatively fast and large capacity. - **Traditional Disk:** Slower than flash disk, massive capacity. - **Remote Secondary Storage:** Slowest, but has massive capacity. ## Virtual Memory - A diagram showing the interaction between the CPU, MMU, memory, and disk controller. - The CPU sends virtual addresses (logical addresses) to the MMU (Memory Management Unit). - The MMU translates it into physical addresses and sends it to the memory for access. ## Virtual Memory - It is a diagram showing how virtual memory works. - The virtual memory space can be larger than the physical memory space. - It uses a page table to map virtual addresses to physical addresses. ## Virtual Memory - A diagram to visualize the workings of virtual memory. - The logical memory space (virtual) is mapped to the physical memory space (real). - The page table is used to translate virtual addresses to physical addresses. - **Fragmentation:** The fragmentation of memory (unused spaces) will affect performance. ## Memory - Design and Performance - **Factors influencing memory performance:** - **Access Time:** Speed at which data can be read from or written to memory. - **Data Bus Size:** Width of the data path, determining how much data can be transferred at once. - **Cost per Gigabyte:** The cost of memory per unit of storage. - **Cooling Requirements:** Heat produced by the memory. - **Availability:** How readily the memory module is available in the market. - **Compatibility with Motherboard:** Ensuring compatibility between the memory and the motherboard. ## RAMBUS - **RAMBUS** is a type of memory technology. - It is a diagram showing a RAMBUS chip. - **One major development** was the total redesign of DDR memory. - **Changes:** - A new protocol-based interface (RAM bus controller). - It changed the electronic voltage levels of logic '0' and logic '1' to improve speed. ## Memory - RAMBUS changed the electronic voltage levels of logic '0' and logic '1' (threshold levels) - It reduces the time for electronics to reach logic '1', leading to faster RAMBUS threshold levels. ## RAMBUS problems - If we reduce the logic threshold, then the logic levels are more prone to interference from noise. - This can cause data problems. - RAMBUS is installed in matched pairs to balance the bus system. - This is done to reduce the effect of electronic noise. ## Light and Color - By combining lights of different wavelengths, we can see **different colours**. - The colors are different from any of the constituent colored lights. - **In physics and light, the three primary colours are:** - Red - Green - Blue (RGB) - **Additive color mixing:** Combining light of different wavelengths is known as additive color mixing. It defines the RGB color model. - **White:** Produced by combining red, green, and blue in equal proportions. ## Pixels and Colour displays - Digital images consist of a large number of discrete small areas, each of which has a **specific colour.** - **Pixel (Picture Element):** A small area that comprises a digital image. - **RGB colour model:** Each pixel is composed of three small areas, one for each primary colour. - The colour of the pixel is determined by the degree to which each area glows. - **Dot pitch:** Distance between pixels. ## Display standards - Over the years, a number of display standards have evolved. - **The most important ones are:** - VGA (Video Graphics Adaptor) - SVGA (Super VGA) - XVGA (Extended Graphics Array) - WXGA (Wide Extended Graphics Array) - HDMI (High-Definition Multimedia Interface) - Ultra HDMI (4K/8K) - **Display standard:** Identifies a series of video display modes, which defines: - **Display resolution:** Number of pixels on the screen. - **Range of colours:** Total number of colours available to define a pixel color. ## Terminology - **Resolution:** Number of pixels on the screen (X and Y). - **X:** Number of horizontal pixels - **Y:** Number of vertical pixels - **Various standards exist:** - **VGA:** (Lowest standard) 640x480 - **SVGA:** 800x600, 1024x768 - **XVGA:** 1024x768 - **WXGA:** 1280x720 - **HDMI:** 1920×1200 - **8k HDMI:** 7680x4320 -**Dot pitch:** Distance between pixels - typically 0.26mm. ## Terminology (Continued) - **Refresh rate:** Frequency of repainting the screen. - **100Hz:** Repainting the screen 100 times per second. - **Dot frequency:** Number of pixels output to the screen per second. - It is calculated by multiplying the size of the display by the refresh rate. - **Aspect ratio:** Ratio of the width to the height (4:3 or 16:9). - **Size of screen:** Diagonal of the display. ## Another Terminology: Colour Depth - **Colour depth:** Number of bits used to represent the range of colours in a display. - **8-bit:** Represents 28 = 256 different colours. - Part of the VGA standard. - **16-bit:** Represents 216 = 65,536 different colours. - Known as "High Colour" and is available in SVGA. - **24-bit:** Represents 224 = (approx.) 16 million different colours. - Known as "True Colour" – defined in the SVGA standard. - **30/36/48-bit:** Represents 248 = (approx.) 281.5 trillion colours. - Known as "Deep Colour" – defined in the HDMI 1.3 standard. ## Another Terminology: Colour Depth - **8-bit or 256 color displays:** Each screen pixel is represented by eight bits of memory. - The 256 colors are referenced to a “palette” or “index” (color lookup table, or CLUT). - The main point for eight-bit images is they can never contain more than 256 colors. - **Bit depth and color graphics files:** In their uncompressed states, eight-bit or 256-color image files dedicate eight bits to each color pixel in their respective images. ## Another Terminology: Color Depth - **24-bit “true color” displays:** Each screen pixel is represented by three groups of eight bits for a total of 24 bits. - A color image is typically represented by a bit depth ranging from 8 to 24 or higher. - **24-bit image:** The bits are divided into three groupings: 8 for red, 8 for green, and 8 for blue. - Combinations of these bits are used to represent other colors. - A 24-bit image offers 16.7 million (224) color values. ## Memory Requirements - **VGA example with a color depth of 8:** - Resolution = 640 x 480 = 307200 pixels. - Each pixel needs 8 bits (1 byte) = 300 kilobytes (307200/1024=300). - 8 bits color depth = 256 colors. ## Pixel data to RGB colour mapping: Direct representation - **Pixel data:** The number used to represent pixel data is composed of three numbers, one for each RGB colour. - **24-bit colour depth:** Consists of three 8-bit (1 byte) values representing RGB colour combinations. - This gives 256 colour values for each RGB colour. - **16-bit colour depth:** Consists of 3 fields for each RGB colour: - Red (5 bits), Green (6 bits), and blue (5 bits). - It gives 65,536 = 32x64x32 colour values for each RGB colour. ## Components of a Liquid Crystal Display (LCD) - A diagram of a liquid crystal display (LCD). - **Backlight:** Provides the source of light. - **Horizontal Polarising Filter:** Polarises the light horizontally. - **Active Transistor Matrix:** Controls the liquid crystal cell's voltage. - **Liquid Crystal:** The material that changes the polarization of light. - **RGB Colour Filters:** Filters light into its red, green, and blue components. - **Vertical Polarising Filter:** Allows only vertically polarized light to pass through. - **Process:** 1. **Light from the backlight passes through the horizontal polarising filter.** 2. **A charge is applied to a liquid crystal cell, changing the intensity of the RGB colour.** ## Simple graphics card components and operation - **Graphics card:** It processes video image data, sends it to Image Frame Buffer, converts RGB numerical values to voltage levels, and sends it to the display device synchronized to the dot clock. - **Problem:** How does the graphics card handle high-speed video games with lots of pixels? ## Speed / Memory Improvements: Coprocessors & GPUs - **The CPU** was responsible for performing the calculations needed to produce pixel colour values. - **Pixel value data:** Sent over the external bus to the graphics card frame buffers. - **The graphics card:** It took time for the calculations to be completed. - **Transfer** of pixel colour values to the graphics card had an impact on CPU performance. ## Speed / Memory Improvements: Coprocessors & GPUs - **GPU Co-processors (graphics accelerators):** Powerful and fast CPUs that were introduced onto graphics cards. - They are dedicated to performing the pixel colour calculations. - **The main CPU:** Still has to specify the information about the nature of the image to be produced ## Lets shrink the data - **Data compression:** Used to reduce the amount of data required to send or store an image. - This improves the throughput of images in the system. - **Data compression algorithms:** Reduce data size while maintaining acceptable levels of quality. - **Lossless:** Original values can be fully recovered when data is decompressed. - **Lossy:** Compression reduces data size at the expense of some quality degradation when the image is decompressed. ## Floating Point Numbers - **IEEE754 standard:** Represents floating point numbers in a standard format. - **Write the number in the format:** - **S:** Sign bit (0 = positive, 1 = negative). - **E:** Exponent (8-bit single precision, 11-bit double precision). - **B:** Exponent Bias (127 for single precision, 1023 for double precision). - **M:** Mantissa (23 bits for single precision, 52 bits for double precision). - Stored in memory with the least significant byte first (little endian format). ## Using Text - **Telex (1926):** Original Telex required characters and control codes to be sent, such as "a" and BELL. - **ASCII:** To save text on a computer, we use ASCII (American Standard Code for Information Interchange). ## Extended ASCII and Unicode - **ASCII:** Extended to include European characters. - **Unicode:** Defined to allow font, characters, symbols, and more. - Different formats: 32bit, 16 bit, 8 bit UTF-64, UTF-128, UTF-256, UTF-384, UTF-512 etc. ## Computer Misuse Act 1990 - It governs how individuals can lawfully access data on a machine. - **Unauthorised access:** - Unauthorised access to computer material. - Unauthorised access with intent to commit further offenses. - Unauthorised access with intent to impair, or with recklessness as to impairing, operation of computer, etc. ## Computer Misuse Act 1990 - **The Computer Misuse Act:** Protects personal data held by organisations from unauthorized access and modification. - **Illegal activities:** - **Unauthorised access:** Entering a computer system without permission (hacking). - **Unauthorised access with intent:** Entering a computer system to steal data or destroy a device or network (e.g., planting a virus). - **Unauthorised modification:** Modifying or deleting data, introducing malware or spyware onto a computer (electronic vandalism). - **Making, supplying, or obtaining anything:** Using it in computer misuse offenses. - **Offences:** Hacking, computer fraud, blackmail, and viruses. ## Data Protection Act 1998 - **UK Legislation:** Sets out guidelines on handling personal information. - **Appropriate measures:** Safeguarding personal information during examinations. - **Exemptions:** - Prevention/detection of criminal activities. - Assessment/collection of tax duties. - Safeguarding national security. ## Environmental Issues To Consider - **Main areas of concern:** - Usage of Earth's natural resources. - Consumption of energy. - Waste from the manufacturing process. - Waste from redundant/old technology. - Creation of a disposable society. - Environmental benefits from computing.