Chapter 4 - Review of Essential Terms and Concepts

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

What is an opcode?

Opcode: the Instruction Set Architecture (ISA) of a machine specifies the instructions that the computer can perform and the format of each instruction. The ISA is essentially an interface between the software and the hardware. Each instruction of MARIE consists of 16 bits. The most significant bits (12-15) specify the opcode. The opcode specifies the instruction to be executed. The least significant bits (0-11) form the address. MARIE's Instruction format: (see attached image) The opcode essentially determines the operation to be performed on the data present at the address specified by the bits 0-11. It also specifies where the result is to be stored.

What is the difference between a point-to-point bus and a multipoint bus.

A set of wires connecting multiple subsystems within the system is called a bus. Two specific components can be connected by a point-to-point bus. A dedicated connection between the two can be offered. This it is faster, but more expensive. The bus can also connect multiple devices interacting with each other, This is a common pathway that the bus is shared in this case. This is also referred a multipoint bus. This type of connection is no doubt cost-efficient but could give a lower performance.

Why is a bus often a communications bottleneck?

A shared but common data path connecting multiple subsystems within the system is called a bus. There are multiple lines which allow the parallel movement of bits. But only one device may use the bus at any given point in time. The sharing of the bus among the devices could lead to bottlenecks. The length of the bus, coupled with the number of devices sharing it, affect its speed.

What is a stack? Why is it important for programming?

A stack is not very uncommon that the program needs to branch out mid-way and complete another more urgent task before returning too its original one. Sometimes, there might even be a series of such branching, where the control jumps from an already branched out path to another. In all such cases, the control needs to pass back to the portion of code it was previously processing so that the previous tasks are not left incomplete. The Stack is an effective way of ensuring this. It is a data structure similar to a list that enables one to store values sequentially, but retrieve the values in a reversed sequence of the one they were stored in. Hence the last value stored onto the stack would be the first one retrieved. Whenever a task or program is interrupted, it simply stored the value of the Program Counter (PC) onto the stack. The Program Counter contains the address of the memory location of the instruction currently being serviced. When the branched task is completed, the program retrieves the latest value of the Program Counter from the stack and resumes the functioning of the original task.

Is a micro operation the same thing as a machine instruction?

Actually a set of machine-level instructions used by the system components that actually constitute the instruction set presented for MARIE. At the component level, each instruction involves multiple operations and sub-operations though all the instructions appear to be very simplistic. One example is the "Load" instruction. The contents of a given memory location are first loaded into the AC register. A range of sub-operations or "mini-instructions" however are being executed at the component Level: i) the value of MAR is updated with the address of the instruction. ii) the value of MBR is updated with data in memory at this location. iii) the value of AC is finally updated with the value of MBR These mini-instructions are termed as micro operations. These specify the basic operations that can be performed on data in stored registers.

How do system clocks and bus clocks differ?

An internal clock is present in every computer which regulates how quickly an instruction executes. Every system component is synchronized by the clock. The CPU requires a fixed number of clocks to execute each instruction. Main difference between system clocks and bus clocks as follows: •The system clock regulates the CPU and other components (including the buses). there are however, some bus clocks which regulate themselves or, in other words, function according to their own clocks. Bus clocks are generally slower than system clocks. This difference in pace often cause's bottlenecks.

Explain how an assembler works, including how it generates the symbol table, what it does with source and object code, and how it handles labels.

Converting assembly language into machine language which can be immediately interpreted by the compiler is the assembler's primary function. The symbolic representation of the programmer is converted into binary instructions in this case. The assembler accepts input in the form of assembly code and the produces and output as the object file (machine code). In order to denote a particular location and assign it a meaning in the context of the code programmers use tables. these helped simplify the test of writing programs even further. The effort of the assembler, however, is now increased and it now needs to traverse the code twice to make the source code. The assembler builds a set of correspondences called a symbol table on the first pass. Each label is mapped to its corresponding memory location. The symbol table built in the first pass is used by the assembler on the second pass, to replace the labels with addresses and create the corresponding machine languages.

Explain the difference between byte addressable and word addressable.

Differences: • Memory is basically a matrix of bits. A bit can store either a 0 or 1. •a byte is composed of 8 bits and hence has a capacity of storing up to 2^8 different values. •Each individual byte contains a unique address is byte addressable •A word is a collection of bytes and hence the length of a word would be in multiples of 8 bits. The common size is 32bits (or 4 bytes). •Each word contains its individual address is word addressable.

What does the control unit do?

Ensures the operations execute in the correct order and also that the right data is where and when it needs to be. The correct data being acted upon by the right operations is thus the ultimate responsibility of the control unit.

What are the four types of bus arbitration?

In cases where there Is more than one master device, arbitration is necessary. It must be ensure that while the priority is provided to the few important devices, the other are not left completely unserviced. Bus arbitration falls into the following four broad categories. 1. Daisy Chain arbitration: A control line is trickled down from the highest to the lower priority device in this scheme. This scheme is not fair since there lies a possibility that a device with a lower priority never gets control of the bus. 2. Centralized Parallel arbitration: A centralized mediator selects who gets the bus. While this is a more inclusive form of arbitration where every device gets a chance, it's prone to bottle-necking due to the decision-making computation by the arbiter. 3. Distributed arbitration using self-selection: This scheme is similar to centralized arbitration but instead of a central authority making the selection, the drives themselves determine who has the highest priority. 4. Distributed arbitration using collision detection: Every device can make a request for the bus. In case of any collisions, the device must make another request.

What is the function of an I/O interface?

Input and Output (I/O) devices enable users to communicate with the computer system. I/O is basically the transfer of data between primary memory and various I/O peripheral devices. It is important to not that these devices are not connected directly to the CPU. Every system possesses an I/O interface which handles the data transfers. This interface the system bus signals are converted to and from a format that is acceptable to the give device by this interface. I/O registers are intermediary storage devices used by the CPU to communicate with the I/O devices.

Explain the steps of the fetch-decode-execute cycle.

Instruction Cycle The fetch-decode-execute cycle represents the steps that a computer follows to run a program. It is also called as instruction cycle. Each instruction cycle consists three phases. They are: 1. Fetch: The CPU first fetches an instruction by transferring it from the main memory to the instruction register. 2. Decode: Decodes the instruction by determining the opcode and accordingly fetching necessary data for carrying out the operation. 3. Execute: Finally executes the instruction by performing the operation(s) indicated by the instruction.

Describe how an interrupt works, and name four different types.

Interrupts are basically events that alter (or interrupt) the normal flow of execution in the system. An interrupt can be triggered by a variety of reasons. 1. I/O Requests: When an input/output device requests permission to read or transfer data to the memory. 2. Arithmetic Errors: When operations that are not mathematically valid are performed such as division and zero and square root of a negative number. 3. Hardware Malfunction: The failure of any part of the system is another event likely to trigger an interrupt to inform the processor that the particular device is no longer operational. 4. User-defined break points: The user would sometimes not require traversing all the given paths in a program while tracking for errors. He might only need to examine certain portions for which purpose he will define when the traversal needs to be interrupted to jump a new location.

How does a maskable interrupt differ from a non maskable interrupt?

Makasble Interrupts versus Non-maskable Interrupts: Events that modify the normal flow of execution in the system are called interrupts are basically classification of interrupts is generally done on the basis of how they are initiated or handled. Both, the system and a user can initiate an interrupt. System initiated interrupts can be of two types: maskable or unmaskable. Maskable interrupts are those that can be disabled or ignored since they are normally of a lower priority. Unmaskable interrupts, on the other hand, cannot be ignored since they are critical and of a higher priority.

Explain the difference between data buses, address buses, and control buses.

Lines used for passing data along are termed data bus. The key information that needs to be moved from one location to the next is contained in these. The data is passed in binary form from one registers to the next or from a registers to the ALU and back. They are chronologically managed by a clock. Often, the bus is shared among more than two devices. Here, it needs to be determined which device would take control of the bus to begin to transfer information. The control lines send pulses which act as signals to authorize devices to take control of a bus. Clock synchronization signals, interrupts and acknowledgements for bus requests are also passed. Address lines determine where in memory does the data need to be read from or written too. Finally, the power lines provide the electrical power needed fro the overall functioning.

Explain how each instruction in MARIE works.

MARIE Instructions: The Instruction Set Architecture (ISA) of a machine specifies the instructions that the computer can perform and the format of each instruction. The ISA is essentially an interface between the software and the hardware. Each instruction of MARIE consists of 16 bits. The most significant bits (12-15) specify the opcode. The opcode specifies the instruction to be executed. the least significant bits (0-11) form the address. (See attached image to see MARIE's Instruction Format) MARIE'S Instruction Set consists of the following instructions: •Load: This instruction is specified by the opcode 0001. The format of the instruction is LOAD X. The value at the address specified by X is then loaded into the accumulator (AC). •Store: This instruction is specified by the opcode 0010. The format of the instruction is STORE X. The value of the accumulator (AC) is then stored at the address specified by X. •Add: This instruction is specified by the opcode 0011. The format of the instruction is ADD X. The value at the address specified by X is then added to that of the accumulator (AC) and the result is stored back into AC. •Subt: This instruction is specified by the opcode 0100. The format of the instruction is SUBT X. The value at the address specified by X is then added to that of the accumulator (AC) and the result is stored back into AC. •Input: this instruction is specified by the opcode 0101. The format of the instruction is INPUT. This accepts a value typed from a keyboard which is loaded into the accumulator (AC). •Output: This instruction is specified by the opcode 0110. The format of the instruction is OUTPUT. The value of the accumulator (AC) is output to the display. •Halt: This instruction is specified by the opcode 0001. The format of the instruction is LOAD X. The value at the address specified by X is then loaded into the accumulator (AC). •Skipcond: this instruction is specified by the opcode 1000. The format of the instruction is SKIPCOND. the next instruction is skipped on condition. •Jump X: This instruction is specified by the opcode 1001. The format of the instruction is JUMP X. The value at the address specified by X is then loaded into the Program Counter (PC), which determines the address from which the next instruction is to be read.

Explain the difference between clock cycles and clock frequency.

Main differences between clock cycles and clock frequency as follows: •There is an internal clock in every computer regulating how soon instructions can be executed. All of the components in the system are synchronized by the clock. •A faded number of clock cycles are required by the CPU to execute each instruction. Other, the performance of instruction execution is measured in clock cycles (not seconds). •The clock frequency is measured in gigahertz (GHz). This is basically the number of clock ticks in a second. •The clock cycle time, on the other hand is the time between two consecutive ticks.

List and explain the two types of memory interleaving and the differences between them

Memory Interleaving Sequentialization of access is cause by a single memory module. The processor can only perform one memory access at a time. This can be relieved by splitting memory across multiple memory modules in a method called memory interleaving. There are two types of memory interleaving. They are: 1. Low-ordered interleaving and 2. High-order interleaving 1. Low-order interleaving: The low-order bits of the address are used to select the bank. Low-order interleaved memory places consecutive addresses of memory in different memory models. The right-most bits are used to determine the module while the left-most select the offset within the module. Hence, in the case that we have a byte-addressable memory consisting of 8 modules of 2 bytes each, hence totally 16 bytes of memory, they would be arranged as follows: (see attached image) 2. High order interleaving: The high-order bits of the address are used. This type of interleaving distributes the address so that each module contains consecutive address. In this case, the leftmost bits select the module while the right-most selects the offset within the module. Hence, in the case that we have a byte-addressable memory consisting of 8 modules of 2 bytes each, hence totally 16 bytes of memory, they would be arranged as follows.

Why is it that if MARIE has 4K words of main memory, addresses must have 12 bits?

Memory is built from random access memory (RAM) chips. Memory is often referred to using the notation length X width (LxW). In the case of Marie, the notational length is 4K; the width however is just one. While determining the number of bits, we need to convert the memory into powers of 2. So, (4K • 1) = 2^2 • 2^10 • 2^0. The sum of the powers is then the length of the memory address. Hence, the addresses of MARIE would have 10 + 2 + 0 = 12 bits.

How does a microoperation differ from a regular assembly language instruction?

Microoperations are also called mini instructions and specify the elementary operations that can be performed on data stored in registers. Whereas an assembly language instruction uses symbolic instruction to represent the numerical data from which the machine language program is derived. Assembly language is a programming language, but does not offer a large variety of data types or instructions for the programmer. Assembly language programs represent a lower level method of programming.

How does a machine language differ from an assembly language? Is the conversion one-to-one (one assembly instruction equals one machine instruction)?

Most people prefer (if not all) prefer the use of instruction names like mnemonics for writing programs since they resemble natural language a lot more. The binary form of reference is not only cumbersome but also difficult to memorize. In the instruction set of MARIE as we see, each instruction has an equivalent 4 bit opcode. this opcode is the machine instruction, while the corresponding mnemonics are the assembly language instructions. Further, these is a direct 1 to 1 mapping between each opcode and its corresponding assembly language mnemonic, so there is no ambiguity involved.

What is the significance of RTN?

Register Transfer Notation: The symbolic notation used to describe the behavior or micro-operations is called. the basic functions being performed by the instructions are thus denoted by an illustrative language to convey to the reader the intended outcome. The actual data stored at location X in memory is represented y M[X]. The sign (<-) is used to indicate a transfer of information. Although the transfer of information from one register to another actually consists of a transfer to a bus first and then another from the bus to the destination register, these details are avoided for clarity proposes.

What is a bus cycle?

Sending an address (for read/write), transferring data to and from between memory and registers are mainly what functions a bus performs. They also read and write from the variety of I/O peripheral devices. It is not possible to carry out these activities concurrently. Distinct time slots must be assigned to the operations. A bus cock defines the timesloh which is basically the time between two ticks of the clock.

Why is a bus protocol important?

The bus can sometimes connect multiple devices interacting with each other thereby acting as a common pathway. In this scenario, the bus is shared. In order to coordinate the sharing of the bus, the bus protocol is essential. Lines used for passing data along are termed data bus, while the lines that pass signals to authorize the various devices to take control of the bus are called control lines. Address lines determine the location on the memory to or from which data must be written or read. Further, the power lines provide the electrical power needed for the overall functioning. The bus protocol performs the administrative functions across all the aspects of the microprocessor.

Explain the difference between memory-mapped I/O and instruction-based I/O.

The conversion of system bus signals to and from a format that is acceptable to the given device is accomplished by the I/O interface. The CPU then communicates to these devices via I/O registers. This exchange of data happens in the below formats. •Memory-mapped I/O: In this format, the registers in the interface appear in the computers memory map and there is no real difference between accessing memory and accessing the I/O device. The advantage is that it's fast but it takes up too much memory space. •Instruction-based I/O: Dedicated instructions perform the input and output functions in this format. This format requires specific I/O instructions, although this does not take up memory space. This implies it can be used only by CPU's that can execute these specific instructions. Notifying the CPU that input or output is available for use is the major significance of such instructions.

What is an embedded system? How does it differ from a regular computer?

The good thing with embedded systems is not only do they consume less memory but they are quick in response also. Here, the computer is integrated into a device that is typically not a computer. Embedded systems are often found in environments where there are deadlines. they need to be reactive. The systems are much focused. Either a Single instruction or a very specific set of instructions are to be performed by them Examples of embedded systems are witnessed in everyday life: •Automobiles: Automatic door-locks, Engine Control. •Medical Instruments: MRI scanners, heart-rate monitors. •Consumer Electronics: Mobile phones, Tablet computers. •Consumer Products: Dishwashers, Washing Machines. The software used lies at the very heart of any embedded system. Very strict response parameters are set for the operation of a software program.

Why is address alignment important?

The issue of alignment arises if architecture is byte addressable but the instruction set architecture word is large that one byte. Suppose we wish to read a 32-bit word on a byte-addressable machine. It needs to be determined that the word is stored on a natural alignment boundary. Even the access must start on that boundary and, for 32-bit words; this is accomplished by requiring the address to be a multiple of 4. There are a few instructions performing unaligned access that are allowed by some architecture.

What is the difference between synchronous buses and non-synchronous buses?

The main difference between synchronous and non-synchronous buses has specific standards for connectors, timing and signaling specifications and exact protocols for use. •Data is propagated along the synchronous buses. •The system clock controls the buses. A data transfer can only occur only at a tick of the clock, which synchronizes all devices that use the bus. •The system is thus very reliant on the right working of the clock. Deviations in the performance of clock make the system prone to malfunctioning. These deviations are minimized by keeping the length of the bus minimal. •The limitation on the bus length is that the time taken for information to traverse the bus should be greater than the bus cycle time. •Control lines dictate the functioning in asynchronous buses. Timing is enforced by means of a detailed handshaking protocol. The protocol basically involves a request followed by the servicing of the requested concluded by an acknowledgement that the request has been serviced. The advantage of the use of a protocol is that they are able to scale better with technology and can hence support a wider variety of devices.

How does the ALU know which function to perform?

There are generally two data inputs and one data output in the ALU. The Status register is affected by the outcome of the operations performed by this component of the processor. The ALU is interacted by the Control Unit on which instructions to execute. This is accomplished through pulses or signals. The operations are the appropriately organized chronologically to avoid concurrency.

Compare CISC machines to RISC machines.

There are two contemporary computer architectures that basically define the guiding philosophies behind those in use today. Though these philosophies are similar in some aspects, they are fundamentally different. They are the complex instruction set computer (CISC) and reduced instruction set computer (RISC). CISC: This is the guiding philosophy behind the x86 family of Intel architectures. A large number of instructions of variable length with complex layouts are the defining characteristic of CISC machines. For execution of a single instruction, multiple operations are performed by these instructions. Significant bandwidth is take up with the execution of CISC instructions and this slows down the system to a large extent. RISC: this is the guiding philosophy behind the Pentium architecture. The goal is to decompose instructions to the most basic level possible so they can execute faster. This is despite already having a reduced instruction set. Just one operation of uniformed size is perfumed by an instruction. All arithmetic operations are restricted to register-register type only and variety of layouts is also limited.

Hoe does Intel's architecture differ from MIPS?

There are two contemporary computer architectures that basically define the guiding philosophies behind those in use today. Though these philosophies are similar in some aspects, they are fundamentally different. They are the complex instruction set computer (CISC) and reduced instruction set computer (RISC). The Intel x86 architectures is examples of the former, while the MIPS of the latter.

Explain the difference between hardwired control and microprogrammed control.

To invoke particular instructions at given times, we need to assert lines on various digital components in order to select them. Certain control signals are required for this purpose. Fo a device to perform its given task, the control needs to activate it. There are two basic methods by which control lines can be set. Hardwired Control: The control lines are directly connected to the actual machine instructions in this type of control. The instructions are divided into fields such as opcode and address in the case of MARIE. Each field comprises of bits which are directly linked to control lines that trigger various digital components. Microprogrammed Control: Software consisting of microinstructions which, in turn, carry out an instruction's micro operations is employed by this type of control.

What is the function of the CPU?

To retrieve program instructions, understand and decipher them and perform the indicated sequence of operations on the correct data. The CPU is divided into data path and control unit. The data path is basically an intricate interconnection of arithmetic and logic units (ALU) and storage units which are connected by buses whose timings of data transfer are controlled by the CPU clock. The control unit is oversees the chronological ordering of operations and makes sure that the appropriate data are at the right place at the right time.

Where are registers located, and what are the different types?

Types of register: The basic functions performing registers are Accumulator, general purpose, status, and the pointer. Each register performs specific functions. The most important CPU registers are, •Memory Address Register (MAR) •Memory Buffer Register (MBR) •I/O Address Regster (I/O AR) •I/O Buffer Register (I/O BR) •Program Counter (PC) •Instruction Register (IR) •Accumulator Register (AC) •Stack Control Register (SCR) •Flag Register (FR) •Data Register(DR)

How does interrupt-driven I/O work?

contingencies must always be set up in any situation. The computer's way of doing this is by providing a way for the fetch-decode-execute cycle to be interrupted. these interrupts may occur for many reasons and the main aim of all is to interrupt the normal flow of the cycle and instead instruct the computer to break away and perform another task. Any peripheral on the system including I/O devices, memory and hard drive can generate hardware interrupts. Traps or exceptions by the various software applications can generate software interrupts. Interrupt handlers support both software and hardware interrupts. There are designed instructions provided by the assembly languages for working with hardware and software interrupts. Software interrupts are more popular with programmers for I/O. MARIE avoids the use of interrupts for I/O thereby simplifying the process for the programmer.

What purpose does a data path serve?

the CPU is categorized into datapath and control unit. The data path is an intricate interconnection of arithmetic and logic units and storage units which are connected by buses. The storage units are realized by means of registers. The arithmetic and logic unit mathematically works on the data present in the registers. Finally, the buses transfer the data to the arithmetic and logic unit and back and also between the registers. The bus transfers the data according to clock pulses which ensure that transfer among the various devices is constantly in sync.

Name three different types of buses and where you would find them.

•In the computer system, the CPU moves the data on the pathways. •That pathway interconnects to all the other components on the motherboard. The pathways that interconnect is called as 'buses'. In the system, there are internal buses and external buses. •Internal buses carry the data within the components on the motherboard. •External buses carry the data to other devices and the peripherals attached to the motherboard. In the Internal bus, it connects all the internal components of the computer system. These are memory bus, backplane bus, or system bus in the computer system. •Processor-memory buses are very fast, but small in length. They are synchronized in terms of both timing and width with the machines memory to extract most bandwidth. The design of these buses serves to a very particular goal. External buses carry the data to other devices: •The length of the I/O buses is mostly larger than the processor-memory buses. They can connect with devices in which they spread across a range of bandwidths and are compatible with different architecture. •The third type of bus is said to be backplane buses. These are so named because they integrated into the body of the machine and serve as a one-point contact between the processor, I/O devices, and the memory. THREE DIFFERENT TYPES OF BUSES: There are three types of buses are used to transfer some information from the processor to the memory: •Data bus •Address bus •Control Bus These buses interconnect the pathways to all the other components on the motherboard. The layout of the buses in the computer structure is called as bus architecture. Data bus: •It is the most common type of bus. It transfers the data in the compute system to all the other components on the motherboard. •It transfers the data between the memory, the CPU, and the peripheral devices. •In this kind of buses, it is a very common pathway. •The speed of data transmission is affected by the number of lines in the data bus. •Here, the data bus is bi-directional. •CPU can read and write data using the data buses. Address Bus: •Each component in the computer system has its unique IDs called as the address •To access every character in the memory rapidly, the compute must have access to it. •Each character in the memory has its own address number. To communicate, The address bus is used specify that component address. •Here, the address is unidirectional. •It transfers the memory location address from the main memory to the processor through the address bus. Control bus: •The control bus ranges the activity of the computer system •It transfers the information at the speed of a billion characters per second. •It reads, writes, and performs the actions and after execution, the result will be sent back to the memory. •It controls the data direction in the process instructions. •Here, the control bus is bi-directional. •It transmits the control signal to read and write data in the process of execution.

What is the difference between a byte and a word? What distinguishes each?

•Memory can be envisioned as a matrix of bits. A bit can store either 0 or 1. •A byte contains 8 bits and hence can store up to 2^8 different values. •A word is a collection of bytes and hence the length of a word would be in multiples of 8 bits. The common size of word is 32bits (or 4 bytes). The main distinguishes is CPU can handle number of bits at once place. Normally, memory is byte addressable which means that every byte has its own distinct address. In the case where a word uses multiple bytes, the byte with the lowest address in the word determines the address of the entire word.

Explain the functions of all of MARIE's registers.

•PC (Program Counter): It holds the address of the next instruction to be executed in the program or it holds the address of the next instruction to be executed in the program or it holds the address of the next instructions be executed in the program. •IR (Instruction Memory): It holds the next instruction to be executed. •InREG (Input Register): It holds data from the input device. •OutReg (Output Register): It holds data for the output device.


Kaugnay na mga set ng pag-aaral

Chapter 45: Disorders of the Female Reproductive System

View Set

13. Cell Phone and Mobile Device Forensics

View Set

AP government 1st amendment terms

View Set

Ch 9: Recovery Framework for Mental Health Nursing

View Set

Chapter 3: Medical, Legal, and Ethical Issues

View Set