Computer Memory and IO Modules/Central Processing Unit Lecture PDF
Document Details
MIT
Raymond M. Cruz
Tags
Summary
This document covers various aspects of computer memory and I/O modules, including internal memory (RAM, ROM, etc.), external memory (hard drives, SSDs, etc.), and I/O modules. It is an educational resource on computer science and architecture.
Full Transcript
Computer Memory / IO Modules / Central Processing Unit Raymond M. Cruz, MIT Internal Memory Internal memory, also called "main or primary memory" refers to memory that stores small amounts of data that can be accessed quickly while the computer is running. Internal Memory R...
Computer Memory / IO Modules / Central Processing Unit Raymond M. Cruz, MIT Internal Memory Internal memory, also called "main or primary memory" refers to memory that stores small amounts of data that can be accessed quickly while the computer is running. Internal Memory Random access memory (RAM) is the primary internal memory of the central processing unit (CPU). Your electronic device uses it for storing temporary data. It does this by providing applications with a place to store data you're actively using so that it can quickly access the data. Internal Memory Dynamic random access memory (DRAM) is one of the two specific types of RAM seen in modern devices, such as laptops, desktops, portable devices and gaming systems. It's the more affordable of the two types of RAM and produces high-capacity memory. Internal Memory Static random access memory (SRAM) is the second type of RAM and stores data as long as there is power in the system, unlike DRAM which is refreshed much more frequently. Because it holds power longer, it's more expensive than DRAM, which typically makes it not as widely used. Users generally use SRAM for cache memory, which makes it a faster form of memory than DRAM. Internal Memory Read-only memory (ROM) is another type of primary internal memory, but unlike RAM, ROM is non-volatile and stores data permanently. It does not depend on the device to be turned on in order to save data. Internal Memory Programmable read-only memory (PROM) is a type of ROM that begins as memory with no data on it. A user can write data onto the chip using a special device called a PROM programmer. Internal Memory Erasable programmable read-only memory (EPROM) is another type of ROM chip that users can write data on as well as erase old data and reprogram it. You can erase the current data by using ultraviolet (UV) light in the form of a quartz crystal window at the top of the chip. Internal Memory Electrically erasable programmable read-only memory (EEPROM) is the final type of non-volatile ROM chip that usually replaces the need for PROM or EPROM chips. This type of memory also allows users to erase and reprogram data onto the chip, but does so using an electric field and is much quicker at erasing data than the EPROM. Internal Memory Cache memory is an internal high-speed semiconductor memory that stores instances of data frequently used by the CPU. It provides access to the CPU, so when the CPU requests data or programs the cache memory can transfer them to the CPU almost instantly. Cache memory usually sits between the CPU and RAM and serves as a buffer between the two. External Memory External memory, also known as secondary memory, is memory not directly connected to the CPU that you can attach or remove as needed. There are many types of external memory that individuals use in their devices. Examples include external hard drives, flash drives, memory cards and compact discs (CDs). You can store data from a computer onto external memory, remove it from the device and connect it with another compatible device to transfer data. External Memory Optical drive memory is an external memory that can both store and read data using light. The most common types are CDs, DVDs and Blu-ray discs. To access the contents on an optical drive, you place the disc inside the computer and the computer spins the disc. External Memory Magnetic storage devices have a coating of magnetic material where it encodes data as an electric current. This type of memory uses magnetic fields to magnetize small sections of a metal spinning disk. External Memory Solid-state drives are a form of external memory made up of silicon microchips. They're similar to magnetic storage devices because you can remove them from the device you're storing or extracting data from, but solid- state drives are more modern. External Memory Virtual memory is another type of secondary memory in the form of a hard drive or solid-state drive that enables a computer to compensate for shortages of physical memory by transferring data from RAM to disk storage. External Memory RAID (redundant array of independent disks) is a way of storing the same data in different places on multiple hard disks or solid-state drives (SSDs) to protect data in the case of a drive failure. External Memory Magnetic tape contains thin plastic ribbon is used for storing data. It is a sequential access memory. So the data read/write speed is slower. It is mainly used for data backups. External Memory Magnetic Disk contains circular disk made of metal or plastic. Both sides of the disk are usually used for storing data. The disk is coated with magnetic oxide. The disk is divided into multiple concentric circles known as tracks and tracks are divided into sectors in which data are stored. I/O MODULES I/O modules are a key component of industrial networking, ensuring connectivity and control of systems, processes, and devices. Ensure data collection from peripheral devices and legacy equipment that is not compatible with desired industrial protocols. Without Input/Output modules, organizations would be unable to exchange data between peripheral devices and their network. Learn more about the role of Input/Output modules within a connected factory environment. WHAT ARE THE CORE FUNCTIONS OF AN I/O MODULE? Detecting Errors: I/O modules have the ability to detect errors and report them to the CPU. One way that I/O modules detect errors is with the parity bit method. Processor Communication: This critical function of an I/O module involves a few components: Command Decoding: Receive and decode commands sent from the processor. Data Exchange: Exchange data between peripherals, processors, and the main memory. Status Reporting: Communicate the status of peripherals to the processor. Address Decoding: Organizes each of the peripherals connected to the I/O module by managing their unique addresses. Buffering Data: With data buffering, I/O modules can manage the transfer speed of data sent by the processor to peripheral devices. This compensates for the latency of peripheral devices. WHAT ARE THE CORE FUNCTIONS OF AN I/O MODULE? Device Communication: I/O modules can facilitate communication between connected peripheral devices. Control and Timing: I/O modules are designed to manage the data transactions between the internal system and peripheral devices. WHAT ARE THE DIFFERENT TYPES OF I/O COMMUNICATION TECHNIQUES? Programmed I/O: In this case, the transfer of data from an I/O device to the memory will require the CPU to initiate a program. The CPU remains in a loop until the I/O device is prepared to make the data transfer. Interrupt Driven I/O: In this case, the CPU offers a read command to the I/O device and once the I/O device is prepared to transfer data, it sends an interrupt signal to the processor. Upon this event, the CPU then checks the status of the device and will write that information into the memory if it is ready. Direct Memory Access (DMA): In this communication technique, the I/O device can both send and receive data directly from the memory, bypassing the CPU altogether and enhancing the speed of memory operations. WHAT ARE THE 3 CATEGORIES OF INPUT/OUTPUT? Sensory Input Digital Input Analog Input Control Output Direct Digital Output Modulated Digital Output Analog Output Data Transfer Parallel Serial What is a Central Processing Unit (CPU)? The Central Processing Unit (CPU) is the primary component of a computer that acts as its “control center.” The CPU, also referred to as the “central” or “main” processor, is a complex set of electronic circuitry that runs the machine’s operating system and apps. The CPU interprets, processes and executes instructions, most often from the hardware and software programs running on the device. Computer arithmetic is a field of computer science that investigates how computers should represent numbers and perform operations on them. 4 Basic Operations of Computer Arithmetic Addition (Getting the Sum) Subtraction (Getting the difference) Multiplication (Getting the product ) Division (Getting the quotient) What is an arithmetic-logic unit (ALU)? An arithmetic-logic unit is the part of a central processing unit that carries out arithmetic and logic operations on the operands in computer instruction words. Function of the Arithmetic Logic Unit The Arithmetic Logic Unit, commonly known as ALU, is a crucial component in any computer system. It is responsible for performing both arithmetic and logical operations. It takes in two input values, known as operands, and processes them using predetermined instructions or operations. The result is then stored in a designated memory. Arithmetic operations include addition, subtraction, multiplication, and division, whereas logical operations involve bitwise operations such as AND, OR, NOT, and XOR. Function of the Arithmetic Logic Unit Arithmetic Circuit: Responsible for arithmetic operations like addition, subtraction, multiplication, and division. Logic Circuit: Responsible for logical operations like AND, OR, NOT, and XOR. Registers: These are used to store the input, output, and intermediate results. Control Unit: This component determines which operation to carry out and controls the flow of data. Integer Representation Representing integer numbers refers to how the computer stores or represents a number in memory. The computer represents numbers in binary (1's and 0's). However, the computer has a limited amount of space that can be used for each number or variable. Integer Representation Size Size Unsigned Range Signed Range Bytes (8-bits) 2828 0 to 255 -128 to + 127 Words (16-bits) 216216 0 to 65,535 -32768 to +32,767 -2,147,483,648 to Double-words (32-bits) 232232 0 to 4,294,967,295 +2,147,483,647 Quadword 264264 0 to 264264 - 1 -(263263) to 263263 - 1 -(21272127) Double quadword 21282128 0 to 21282128 - 1 to 21272127 - 1 End