









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
All notes available from computer architecture...
Typology: Study notes
1 / 17
This page cannot be seen from the preview
Don't miss anything!
Functional Units---A computer consists of five functionally independent main parts: input, memory, arithmetic and logic, output, and control units.
Computers accept coded information through input units. The most common input device is the keyboard. Whenever a key is pressed, the corresponding letter or digit is automatically translated into its corresponding binary code and transmitted to the processor.Many other kinds of input devices for human-computer interaction are available, including the touchpad,mouse, joystick, and trackball. These are often used as graphic input devices in conjunction with displays.Microphones can be used to capture audio input which is then sampled and converted into digital codesfor storage and processing.Similarly, cameras can be used to capture video input.Digital communication facilities, such as the Internet, can also provide input to a computer from othercomputers and database servers.
device, the processor processes it. The CPU is called the brain of the computer because it is the control center of the computer. It first fetches instructions from memory and then interprets them so as to know what is to be done. If required, data is fetched from memory or input device. Thereafter CPU executes or performs the required computation and then either stores the output or displays on the output device. The CPU has three main components which are responsible for different functions – Arithmetic Logic Unit (ALU), Control Unit (CU) and Memory registers Arithmetic and Logic Unit (ALU) : The ALU, as its name suggests performs mathematical calculations and takes logical decisions. Arithmetic calculations include addition, subtraction, multiplication and division. Logical decisions involve comparison of two data items to see which one is larger or smaller or equal.
classes of storage, called primary and secondary. Primary Memory ---- also called main memory, is a fast memory that operates at electronic speeds. Programs must be stored in this memory while they are being executed. The memory consists of a large number of semiconductor storage cells, each capable of storing one bit of information. These cells are rarely read or written individually.Instead, they are handled in groups of fixed size called words. The memory is organized so that one word can be stored or retrieved in one basic operation. The number of bits in each word is referred to as the word length of the computer, typically 16, 32, or 64 bits.To provide easy access to any word in the memory, a distinct address is associated with each wordlocation. Addresses are consecutive numbers, starting from 0, that identify successive locations.Instructions and data can be written into or read from the memory under the control of the processor. A memory in which any location can be accessed in a short and fixed amount of time after specifying its address is called a random-access memory (RAM). The time required to access one word is called the memory access time. This time is independent of the location of the word being accessed. It typically ranges from a few nanoseconds (ns) to about 100 ns for current RAM units Cache Memory--As an adjunct to the main memory, a smaller, faster RAM unit, called a cache, is used to hold sections of a program that are currently being executed, along with any associated data.
The cache is tightly coupled with the processor and is usually contained on the same integrated- circuit chip. The purpose of the cache is to facilitate high instruction execution rates.At the start of program execution, the cache is empty. As execution proceeds, instructions are fetched into the processor chip, and a copy of each is placed in the cache. When the execution of an instruction requires data, located in the main memory, the data are fetched and copies are also placed in the cache. If these instructions are available in the cache, they can be fetched quickly during the period of repeated use. Secondary Storage--Although primary memory is essential, it tends to be expensive and does not retain information when power is turned off. Thus additional, less expensive, permanent secondarystorage is used when large amounts of data and many programs have to be stored, particularly for information that is accessed infrequently. Access times for secondary storage are longer than for primary memory. The devices available are including magnetic disks, optical disks (DVD and CD), and flash memory devices.
example of such adevice is a printer. Most printers employ either photocopying techniques, as in laser printers, or ink jet streams. Such printers may generate output at speeds of 20 or more pages per minute. However, printers are mechanical devices, and as such are quite slow compared to the electronic speed of a processor.Some units, such as graphic displays, provide both an output function, showing text and graphics, and an input function, through touchscreen capability. The dual role of such units is the reason for using the single name input/output (I/O) unit in many cases.
perform input and output operations. The operation of these units must be coordinated in some way. This is the responsibility of the control unit. The control unit is effectively the nerve center that sends control signals to other units and senses their states.I/O transfers, consisting of input and output operations, are controlled by program instructions thatidentify the devices involved and the information to be transferred.Control circuits are responsible for generating the timing signals that govern the transfers. They determine when a given action is to take place. Data transfers between the processor and the memory are also managed by the control unit through timing signals. A large set of control lines (wires) carries the signals used for timing and synchronization of events in all units. The operation of a computer can be summarized as follows:
2. Instruction Execution Cycle The instruction execution cycle (or fetch-decode-execute cycle) is the fundamental process by which a CPU executes instructions. It consists of a series of steps that are repeated for each instruction in a program. The cycle includes these steps: 1. Fetch : The CPU retrieves the instruction from memory at the address pointed to by the Program Counter (PC). It places the instruction in the Instruction Register (IR) and increments the PC. 2. Decode : The control unit decodes the instruction in the IR to determine which operation to perform and the operands needed. 3. Execute : The decoded instruction is executed by the CPU. This might involve arithmetic or logical operations, memory access, or control instructions. 4. Writeback : Any results generated by the operation are written back to the appropriate destination, such as a register or memory location. Each of these steps requires different parts of the CPU, such as the ALU, registers, and control unit. This cycle repeats for each instruction, allowing the CPU to carry out the instructions in a program sequentially (or out-of-order in modern processors with optimized pipelines). 3. RTL (Register Transfer Language) Interpretation of Instructions Register Transfer Language (RTL) is a symbolic notation used to describe the low-level operations performed by the CPU as it executes instructions. RTL describes how data moves between registers, memory, and the ALU, and is particularly useful for understanding the exact operations at each stage of the instruction cycle. For example: An instruction like ADD R1, R2, R3 (add contents of R2 and R3, store in R1) might have the following RTL interpretation: o R1 ← R2 + R RTL statements describe the transfers and transformations on data at the register level, revealing what each part of the CPU does for a given instruction. RTL helps computer architects understand and design the internal data flow of the CPU, providing a foundation for hardware implementation and optimization. Register Transfer language: Digital systems are composed of modules that are constructed from digital components, such as registers, decoders, arithmetic elements, and control logic The modules are interconnected with common data and control paths to form a digital computer system
The operations executed on data stored in registers are called microoperations A microoperation is an elementary operation performed on the information stored in one or more registers Examples are shift, count, clear, and load Some of the digital components from before are registers that implement microoperations The internal hardware organization of a digital computer is best by specifying The set of registers it contains and their functions The sequence of microoperations performed on the binary information stored The control that initiates the sequence of microoperations Use symbols, rather than words, to specify the sequence of microoperations The symbolic notation used is called a register transfer language A programming language is a procedure for writing symbols to specify a given computational process Define symbols for various types of microoperations and describe associated hardware that can implement the microoperations Register Transfer Designate computer registers by capital letters to denote its function.The register that holds an address for the memory unit is called MAR.The program counter register is called PC.IR is the instruction register and R1 is a processor register .The individual flip-flops in an n-bit register are numbered in sequence from 0 to n-
4. Addressing Modes Addressing modes specify how the CPU should interpret the operands of an instruction. They determine how the CPU locates data in memory or registers, offering flexibility and efficiency in programming. Common addressing modes include: 1. Immediate Addressing : The operand is specified directly within the instruction itself. Useful for constants. o Example: MOV R1, #5 (move the value 5 directly into R1). 2. Direct Addressing : The operand is located at a specific memory address, which is provided within the instruction. o Example: MOV R1, 0x1000 (move the data at address 0x1000 into R1). 3. Indirect Addressing : The address of the operand is specified in a register, which indirectly points to the actual data location. o Example: MOV R1, [R2] (move data at the address stored in R2 into R1). 4. Register Addressing : The operand is located in a register specified by the instruction. o Example: ADD R1, R2, R3 (add values in R2 and R3, store in R1).
instruction set architecture (isa) defines the set of operations a cpu can perform, forming the basis of the cpu’s design and affecting both the software that can run on it and the hardware’s complexity. different cpus, such as those from intel, arm, and mips, offer distinct instruction sets. this case study explores these three architectures—x86 (intel and amd), arm (widely used in mobile and embedded systems), and mips (common in academic and embedded environments)—to illustrate the diversity in cpu instruction sets and their impacts on performance, power consumption, and application.
feature x86 (intel/amd) arm mips branch prediction advanced moderate simple power efficiency moderate high moderate typical applications desktops, servers mobile, embedded embedded, education Data representation: signed number representation, fixed and floating point representations, character representation
Two’s complement is the most widely used method for representing signed integers in modern computers due to its efficient handling of addition, subtraction, and zero representation.
Computer arithmetic – integer addition and subtraction, ripple carry adder, carry look ahead adder.. Integer Addition and Subtraction Computers perform integer arithmetic using binary numbers, specifically two’s complement representation for signed integers. In two’s complement, positive and negative numbers are represented in a way that simplifies addition and subtraction, enabling the same circuitry to handle both operations without distinguishing between positive and negative signs explicitly. Binary Addition: Binary addition operates similarly to decimal addition, with bitwise addition using the following basic rules: 0 + 0 = 0 1 + 0 = 1 0 + 1 = 1 1 + 1 = 0 with a carry of 1 In cases where two bits add up to 2 in binary (i.e., 10), the 0 is placed in the sum, and 1 is carried to the next higher bit. This carry propagation can potentially slow down the operation, especially for large binary numbers. Binary Subtraction: Binary subtraction is typically performed by adding the two’s complement of the subtrahend (the number being subtracted) to the minuend (the number being subtracted from). To find the two’s complement:
Each bit position is handled by one full adder. The carry output from each full adder is passed as the carry input to the next higher bit position. This process continues until the final full adder produces the sum and final carry-out for the most significant bit. For example, adding two 4-bit binary numbers 1101 and 1011:
o Uses Booth’s algorithm , which reduces the number of additions by encoding consecutive 1s in the multiplier. Instead of adding multiple times for consecutive bits, Booth’s algorithm only adds or subtracts the multiplicand when necessary. o Useful for signed binary numbers and reduces computation by skipping certain bits.
o The IEEE 754 standard defines single-precision (32-bit) and double-precision (64-bit) formats. o The 32-bit format includes 1 sign bit, 8 bits for the exponent (biased by 127), and 23 bits for the mantissa (or fraction), which gives it a wide dynamic range. Operations : o Addition and Subtraction : Align exponents, then perform addition or subtraction on the mantissas, adjusting the result if necessary to maintain normalized form. o Multiplication and Division : Multipliers involve adding exponents and multiplying mantissas, while division subtracts exponents and divides mantissas.