Chapter 4

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

What is the function of an I/O interface?

Input and output (I/O) devices allow us to communicate with the computer system. These devices are not connected directly to the CPU. Instead, there is an interface that handles the data transfers. This interface converts the system bus signals to and from a format that is acceptable to the given device. The CPU communicates to these external devices via I/O registers.

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

A bus can be point-to-point, connecting two specific components. A bus can be multipoint (referred to as common pathway), as well, that connects a number of devices, requiring these devices to share the bus.

What is Memory interleaving

A single memory module causes sequentialization of access (only one memory access can be performed at a time). Memory interleaving, which splits memory across multiple memory modules (or banks), in which multiple banks can be accessed simultaneously, can be used to help relieve this. Each bank, when accessed, will return a word the size of the addressable unit for that architecture.

Explain the functions of all of MARIE's registers.

AC: The accumulator, which holds data values. This is a general-purpose register, and it holds data that the CPU needs to process. Most computers today have multiple general-purpose registers. MAR: The memory address register, which holds the memory address of the data being referenced. MBR: The memory buffer register, which holds either the data just read from memory or the data ready to be written to memory. PC: The program counter, which holds the address of the next instruction to be executed in the program. IR: The instruction register, which holds the next instruction to be executed. InREG: The input register, which holds data from the input device. OutREG: The output register, which holds data for the output device.

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

Although MARIE allows for subroutines (programs can branch to various sections of code, execute the code, and then return), MARIE has no mechanism to support the passing of parameters. Programs can be written without parameters, but we know that using them not only makes the program more efficient (particularly in the area of reuse), but also makes the program easier to write and debug. To allow for parameters, MARIE would need a stack, a data structure that maintains a list of items that can be accessed from only one end. A pile of plates in your kitchen cabinet is analogous to a stack: You put plates on the top and you take plates off the top (normally). For this reason, stacks are often called last-in-first-out structures. The operations made on stacks are popping (removing) and pushing (adding). A stack pointer keeps track of the location to which items should be pushed or popped.

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.

An assembler's job is to convert assembly language (using mnemonics) into machine language (which consists entirely of binary values). Assemblers take a programmer's assembly language program, which is really a symbolic representation of the binary numbers, and convert it into binary instructions, or the machine code equivalent. The assembler reads a source file (assembly program) and produces an object file (the machine code).

Why is a bus often a communications bottleneck?

At any one time, only one device (be it a register, the ALU, memory, or some other component) may use the bus. However, this sharing often results in a communications bottleneck.

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

Bit is the smallest unit of memory. It can have either value 1 or value 0. Byte is the collection of bits. It consists of 8 bits, which allows having 2^828 different values. Word is the collection of bytes. For example, 32-bit is a 4-byte word.

What is a Bus Cycle?

Bus cycle is the time between two ticks of the bus clock. Each type of transfer occurs within a bus cycle.

What is the function of a CPU?

CPU - central processing unit is responsible for fetching program instructions, decoding each instruction that is fetched, and performing the indicated sequence of operations on the correct data. Main tasks of CPUs: Fetch, decode, and perform instructions

Datapath

Datapath is a network of storage units (registers) and arithmetic and logic units (for performing various operations on data) connected by buses (capable of moving data from place to place) where the timing is controlled by clocks.

What is the significance of RTN?

During the execution of instructions, such as Load, at the component level "mini-instructions" are being executed. These mini-instructions are called microoperations and specify the elementary operations that can be performed on data stored in registers. The symbolic notation used to describe the behavior of microoperations is called register transfer notation (RTN) or register transfer language (RTL). The significance of RTN is that using it the behavior of microoperations can be shown in a symbolic way. For instance, Load X The LOADLOAD instruction loads the contents of memory location X into the AC. However, the address X must first be placed into the MAR. Then the data at location M[MAR] (or address X) is moved into the MBR. Finally, this data is placed in the AC.

What is an opcode

Each instruction for MARIE consists of 16 bits. The most significant 4 bits, bits 12 through 15, make up the opcode that specifies the instruction to be executed (which allows for a total of 2^4=1624=16 instructions).

Compare CISC machines to RISC machines.

Each member of the x86 family of Intel architectures is known as a CISC (complex instruction set computer) machine, whereas the Pentium family and the MIPS architectures are examples of RISC (reduced instruction set computer) machines. Virtually all new instruction sets (for any architectures) since 1982 have been RISC or some sort of combination of CISC and RISC.

How do system clocks and bus clocks differ?

Generally, the clock is referred to as the system clock, or the master clock that regulates the CPU and other components. However, certain buses also have their own clocks. Bus clocks are usually slower than CPU clocks, causing bottleneck problems.

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

In 4K words of main memory, addresses must have 12 bits, because: K = 1000 4K = (2^2) (2^10) 2 + 10 = 12 (the sum of the powers) Thus the sum of the powers is the length of the address.

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

In memory-mapped I/O, the registers in the interface appear in the computer's memory map and there is no real difference between accessing memory and accessing an I/O device. Clearly, this is advantageous from the perspective of speed, but it uses up memory space in the system. With instruction-based I/O, the CPU has specialized instructions that perform the input and output. Although this does not use memory space, it requires specific I/O instructions, which implies that it can be used only by CPUs that can execute these specific instructions.

What are the four types of bus arbitration?

In systems with more than one master device, bus arbitration is required. Bus arbitration schemes must provide priority to certain master devices and, at the same time, make sure lower-priority devices are not starved out. Bus arbitration schemes fall into four categories: Daisy chain arbitration: This scheme uses a "grant bus" control line that is passed down the bus from the highest priority device to the lowest priority device. (Fairness is not ensured, and it is possible that low-priority devices are "starved out" and never allowed to use the bus.) This scheme is simple but not fair. Centralized parallel arbitration: Each device has a request control line to the bus and a centralized arbiter selects who gets the bus. Bottlenecks can result using this type of arbitration. Distributed arbitration using self-selection: This scheme is similar to centralized arbitration but instead of a central authority selecting who gets the bus, the devices themselves determine who has highest priority and who should get the bus. Distributed arbitration using collision detection: Each device is allowed to make a request for the bus. If the bus detects any collisions (multiple simultaneous requests), the device must make another request. (Ethernet uses this type of arbitration.)

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

Internal bus (called the system bus) that connects the CPU, memory, and all other internal components. External buses (sometimes referred to as expansion buses) connect external devices, peripherals, expansion slots, and I/O ports to the rest of the computer. Expansion buses are slower but allow for more generic connectivity. Local buses, data buses that connect a peripheral device directly to the CPU. These high-speed buses can be used to connect only a limited number of similar devices.

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

Microoperations are the "mini-instructions" that are being executed during the execution of other instructions. They specify the elementary operations that can be performed on data stored in registers. The mnemonic instructions are referred to as assembly language instructions. The machine language is derived from the assembly language. It is a low-level programming language that can be used to directly interact with the hardware, however, it is not comprehensively used by programmers nowadays. The assembly language instructions are written by a programmer, while the microopertions are done by the hardware itself during the execution of the instructions.

Explain the difference between byte addressable and word addressable.

Some machines may have a word size that is larger than a single byte. For example, a computer might handle 32-bit words but still employ a byte-addressable architecture. In this situation, when a word uses multiple bytes, the byte with the lowest address determines the address of the entire word. It is also possible that a computer might be word addressable, which means each word (not necessarily each byte) has its own address, but most current machines are byte-addressable (even though they have 32-bit or larger words).

Where are registers located?

Step 2 The register is a hardware device that stores binary data. Registers are located on the processor so information can be accessed very quickly.

What is a Bus ?

The CPU communicates with the other components via a bus. A bus is a set of wires that acts as a shared but common datapath to connect multiple subsystems within the system. It consists of multiple lines, allowing the parallel movement of bits. Buses are low cost but very versatile, and they make it easy to connect new devices to each other and to the system.

How does the ALU know which function to perform?

The arithmetic logic unit (ALU) carries out the logic operations (such as comparisons) and arithmetic operations (such as add or multiply) required during the program execution. Generally, an ALU has two data inputs and one data output. The ALU knows which operations to perform because it is controlled by signals from the control unit.

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

The binary instructions are called machine instructions. The corresponding mnemonic instructions are what we refer to as assembly language instructions. There is a one-to-one correspondence between assembly language and machine instructions. When we type in an assembly language program, we need an assembler to convert it to its binary equivalent.

Why is a bus protocol important?

The bus protocol (set of usage rules) is crucial because of sharing. A typical bus consisting of data lines, address lines, control lines, and power lines. Often the lines of a bus dedicated to moving data are called the data bus. These data lines contain the actual information that must be moved from one location to another. Control lines indicate which device has permission to use the bus and for what purpose (reading or writing from memory or from an input/output [I/O] device, for example). They also transfer acknowledgments for bus requests, interrupts, and clock synchronization signals. Address lines indicate the location (e.g., in memory) that the data should be either read from or written to. The power lines provide the electrical power necessary.

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

The fetch-decode-execute cycle represents the steps that a computer follows to run a program. The CPU fetches an instruction (transfers it from main memory to the instruction register), decodes it (determines the opcode and fetches any data necessary to carry out the instruction), and executes it (performs the operation[s] indicated by the instruction). A large part of this cycle is spent copying data from one location to another. When a program is initially loaded, the address of the first instruction must be placed on the PC.

Is a microoperation the same thing as a machine instruction?

The instructions in binary are called the machine language. Programmers code the instructions and they are converted into the machine language. The microoperation is the name of "mini-instructions" that are being executed during the execution of the instructions programmers code.

Explain the difference between hardwired control and microprogrammed control.

There are two methods by which control lines can be set: Hardwired control directly connects the control lines to the actual machine instructions. The instructions are divided into fields, and bits in the fields are connected to input lines that drive various digital logic components. Microprogrammed control employs software consisting of microinstructions that carry out an instruction's microoperations. Step 2 2 of 2 The manner in which these control signals are produced is what distinguishes hardwired control from microprogrammed control. In hardwired control, timing signals from the clock are ANDed using combinational logic circuits to raise and lower signals. Hardwired control results in very complex logic, in which basic logic gates are responsible for generating all control words. For a computer with a large instruction set, it might be virtually impossible to implement hardwired control. In microprogrammed control, instruction microcode produces the necessary control signals.

Explain the difference between clock cycles and clock frequency.

clock cycle is the time between clock ticks. clock frequency is the number of electrical pulsations emitted each second.

Explain the differences between data buses, address buses, and control buses?

data - convey bits Address- location of destination or source of data Control - direction and when each device can access

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

low-order interleaving: the low-order bits of the address are used to select the bank; high-order interleaving: the high-order bits of the address are used.

How does a maskable interrupt differ from a nonmaskable interrupt?

maskable can be ignored, non maskable cannot

what are the different types of registers?

n modern computer systems, there are many types of specialized registers: registers to store information; registers to shift values; registers to compare values; registers that count. Types of registers: scratchpad: stores temporary values; index: controls program looping; stack pointer: manages stacks of information for processes; status (or flag): holds the status or mode of operation (such as overflow, carry, or zero conditions) general-purpose: registers available to the programmers.

Describe how an interrupt works and name four different types.

stops execution of a program to execute higher priority program maskable: can be disabled or ignored; nonmaskable: a high-priority interrupt that cannot be disabled and must be acknowledged synchronous: occurs at the same place every time a program is executed asynchronous: occurs unexpectedly


Set pelajaran terkait

Algorithms & Data Structures,ata Structures and Algorithms Midterm, Data Structures and Algorithms FINAL, Data Structure And Algorithms, Data Structures and Algorithms, Algorithms & Data Structures, Dictionary of Algori

View Set

Psych - Ch. 16 Therapy - Prep: Learning Curve

View Set

Amazon Cloud Practitioner Quiz Questions

View Set