Computer Architectures II

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall with Kai
GameKnowt Play
New
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/99

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

100 Terms

1
New cards

T/F: Compilers perform the translation of a program written in high-level language, such as C++ or Java into instructions that the hardware can execute

True

2
New cards

T/F: Assembly language is another name of machine language.

False

3
New cards

T/F: A high-level programming language is portable language such as C++ or Java that is composed of words and algebraic notation that can be translated by a compiler into assembly language.

True

4
New cards

T/F: A datapath is the component of the processor that performs arithmetic operations.

True

5
New cards

T/F: A control is the component of the processor that commands the datapath, memory, and I/O devices according to the instructions of the program.

True

6
New cards

T/F: Dynamic random access memory (DRAM) is a memory built as an integrated circuit; it provides random access at any location.

True

7
New cards

T/F: Static random access memory (SRAM) is a memory built as an integrated circuit, but faster and less dense than DRAM.

True

8
New cards

Instruction set architecture (ISA) is an abstract interface between the:

(a) Compiler and assembler.

(b) Hardware and the lowest-level software.

(c) Operating system and the user-program.

(d) Internet and the CPU.

(b) Hardware and the lowest-level software

9
New cards

Application binary interface (ABI) is the user portion of the instruction set plus the operating system interfaces used by:

(a) application programmers

(b) the compier

(c) the operating system

(d) none of the above

(a) application programmers

10
New cards

The main memory or the primary memory is the memory that is used to hold programs while they are:

(a) terminated.

(b) running

(c) queued.

(d) None of the above.

(b) running

11
New cards

Yield is the percentage of good dies from the total number of dies on:

(a) the chip

(b) the computer

(c) the wafer

(d) None of the above

(c) the wafer

12
New cards

CPU execution time for a program is equal to CPU clock cycles for a program divided by:

(a) clock cycle

(b) clock rate

(c) instruction count

(d) None of the above

(b) clock rate

13
New cards

T/F: The term clock cycles per instruction (CPI) is the average number of clock cycles each instruction takes to execute.

True

14
New cards

T/F: The compiler's role can be very simple and can hardly affect the CPI in any ways.

False

15
New cards

T/F: Asserted and deasserted signals are not always complementing each other.

False

16
New cards

T/F: Truth table can completely describe any sequential logic function.

False

17
New cards

T/F: In Boolean algebra, all variables have the values 0 or 1 and, in typical formulations, there are only two operations.

False

18
New cards

T/F: NOR and NAND gates are inverted OR and AND gates.

True

19
New cards

T/F: Multiplexer can have only two inputs and one output since its output is one of the inputs that is selected by a control.

False

20
New cards

T/F: The logical representation that employs a logical OR in terms joined using the AND operator is called Sum of Product.

True

21
New cards

T/F: Clocks are needed in sequential logic to decide when an element that contains state should be updated.

True

22
New cards

T/F: ALU is the device that can only perform the arithmetic operation like addition and subtraction and Logic gates the components can perform logical operations like AND and OR.

False

23
New cards

T/F: In edge triggered methodology either the rising edge or the falling edge of the clock is active and cause state changes to occur.

True

24
New cards

How many voltage levels are there in digital electronic?

(a) Five

(b) Two

(c) Four

(d) Eight

(e) All of the above

(b) Two

25
New cards

Logic blocks without memory are called:

(a) Deasserted

(b) Asserted

(c) Combinational

(d) Complementary

(e) All of the above

(c) Combinational

26
New cards

The result of NOT operator is 1 only if the input is:

(a) Asserted

(b) Sequential

(c) Logical

(d) Deasserted

(e) All of the above

(d) Deasserted

27
New cards

Which of the following gates are called universal gates?

(a) OR and NOR

(b) AND and OR

(c) AND and NAND

(d) NAND and NOR

(e) OR and NAND

(d) NAND and NOR

28
New cards

The computer ___________ provides a continuous stream of pulses to the computer processor.

(a) clock

(b) storage

(c) network

(d) None of the above

(a) clock

29
New cards

T/F: A latch is a temporary storage device that has two stable states (bistable).

True

30
New cards

T/F: A control signal is a signal that is used for multiplexor selection or for directing the operation of a functional unit.

True

31
New cards

T/F: Datapath is the hardware that performs all the required operations, for examples ALU, registers, and internal buses.

True

32
New cards

T/F: A program counter (PC) is only incremented after an arithmetic-logical instruction.

False

33
New cards

T/F: The register file (RF) is a hardware device that has one read port and two write ports.

False

34
New cards

T/F: The register number inputs are 6-bits wide to specify one of the 32 registers.

False

35
New cards

T/F: When the RegWrite is deasserted, data can be read or written on the WriteData input.

False

36
New cards

T/F: After an instruction fetch program counter always incremented by 1.

True

37
New cards

T/F: In case of branch taken, the branch target address becomes the new PC.

True

38
New cards

T/F: The value stored into a destination register comes from the ALU for R type instructions and load instruction.

False

39
New cards

T/F: The store instruction moves a word into a register from memory, and the load instruction moves word from a register into memory.

False

40
New cards

How many outputs are there in the Register File?

(a) 2

(b) 4

(c) 6

(d) 8

(a) 2

41
New cards

Which one of the following is correct for a load instruction?

(a) MemtoReg should be reset to cause the instruction from CPU to be received from the register file.

(b) MemtoReg should be set to cause the correct register destination to be sent to the register file.

(c) MemtoReg should be set to cause the data from memory to be sent to the register file.

(d) We do not care about the setting of MemtoReg for loads.

(c) MemtoReg should be set to cause the data from memory to be sent to the register file.

<p>(c) MemtoReg should be set to cause the data from memory to be sent to the register file.</p>
42
New cards

The memory instructions use the ________ to do the address calculation.

(a) Adder

(b) ALU

(c) Register

(d) Multiplexer

(b) ALU

43
New cards

The arithmetic-logical instructions use the ALU, with the inputs coming from

(a) 2 registers

(b) 3 registers

(c) 4 registers

(d) 6 registers

(a) 2 registers

44
New cards

T/F: Suppose a CPU contains 8 registers. Within a machine-language instruction, at least 3 bits would be required to uniquely identify one of the registers.

True

45
New cards

T/F: For load word and store word instructions, we use the ALU to compute the memory address by adding destination register value.

False

46
New cards

T/F: A don't-care term in a truth table indicates that the output does not depend on the value of the input corresponding to that column.

True

47
New cards

T/F: The opcode for R-Format instructions is always 0.

True

48
New cards

T/F: We can generate the 3-bit ALU control input using a small control unit.

False

49
New cards

T/F: The two source registers are always specified by the rs and rd fields, at positions 25:21 and 20:16 for the R-Type instructions.

False

50
New cards

T/F: The 16-bit off set for branch equal instruction and R format instruction is always in position 15:0.

False

51
New cards

T/F: We can only write on register file when data is available at write data port and RegDst is asserted and MemWrite is asserted.

False

52
New cards

T/F: The jump instruction looks somewhat like a branch instruction but computes the target PC differently.

True

53
New cards

T/F: The PC does not require a write control since it is written once at the end of every clock cycle.

True

54
New cards

For the R-type instructions, the ALU has to perform one of the five actions (AND,OR, subtract, add, or set on less than), depending on the value of ________.

(a) the 6-bit opcode

(b) the 5-bit source register rs

(c) the 5-bit destination register rd

(d) the 6-bit funct field

(d) the 6-bit funct field

55
New cards

For evaluating branch equal result, the ALU must perform a ________ operation.

(a) addition

(b) subtraction

(c) multiplication

(d) division

(b) subtraction

56
New cards

The value of 2 bit ALU op for R-format instruction is:

(a) 00

(b) 01

(c) 10

(d) 11

(c) 10

57
New cards

Shift left 2 is important in the calculation of PC value in a __________ instruction.

(a) load

(b) store

(c) branch

(d) add

(c) branch

58
New cards

The single-cycle design will work correctly, but it would not be used in modern designs because it is _________.

(a) slow

(b) error-prone

(c) inefficient

(d) hard to implement in hardware

(c) inefficient

59
New cards

T/F: The pipelining would decrease the time to complete an instruction on the datapath.

False

60
New cards

T/F: The situations in pipelining is called clock-cycle error then the next instruction cannot execute in the following clock cycle.

False

61
New cards

T/F: MIPS instruction set was designed to be pipelined, making it fairly easy for designers to avoid structural hazards.

True

62
New cards

T/F: Data hazards occur when the pipeline must be stalled because one step must wait for another to complete.

True

63
New cards

T/F: Pipeline stall is also called bubble. A stall initiated in order to resolve a hazard.

True

64
New cards

T/F: Load-use data hazard is a specific form of data hazard in which the data being loaded by a store instruction has not yet become available when it is needed by another instruction.

False

65
New cards

T/F: The shading on the right half of the register file or memory means the element is written in that stage, and shading of the left half means it is read in that stage.

False

66
New cards

T/F: Forwarding cannot prevent all pipeline stalls.

True

67
New cards

T/F: Branch prediction is a solution of control hazard.

True

68
New cards

MIPS instruction set architecture was designed for pipelined execution because:

(a) MIPS instruction are the same length

(b) MIPS has only a few instruction formats

(c) Memory operands in MIPS only appear in loads and store

(d) All of the above

(d) All of the above

69
New cards

Data hazards can be resolved by _________.

(a) forwarding

(b) bypassing

(c) reordering code

(d) all of the above

(d) all of the above

70
New cards

Control hazards are also called __________ hazards.

(a) load

(b) store

(c) branch

(d) jump

(c) branch

71
New cards

A method of resolving a data hazard by retrieving the missing data element from internal buffers rather than waiting for it to arrive is called __________.

(a) register retrieving

(b) bypassing

(c) data mining

(d) memory research

(b) bypassing

72
New cards

ALU operations always take place in _________ stage of instruction cycle.

(a) EX

(b) ID

(c) IF

(d) all of the above

(a) EX

73
New cards

T/F: Pipelining is a technique that exploits parallelism among the instructions in a sequential instruction stream.

True

74
New cards

T/F: Pipelining does reduce the time it takes to complete an individual instruction, also called latency.

False

75
New cards

T/F: The division of an instruction into n-stages means n-stage pipeline.

True

76
New cards

T/F: Each step of the instruction can be mapped onto the datapath from right to left, however two exceptions to this.

False

77
New cards

T/F: The pipeline registers separate each pipeline stage. They are labeled by the stages that separate them.

True

78
New cards

T/F: The memory access stage is only active in load instruction.

False

79
New cards

T/F: Allowing jumps, branches, and ALU instructions to take fewer stages than the five required by the load instruction will increase pipeline performance under all circumstances.

False

80
New cards

T/F: The pipeline registers are updating during each clock cycle in pipelined approach.

True

81
New cards

T/F: The ALU control is only operated by 2 bits ALU op for all MIPS instructions.

False

82
New cards

T/F: In a single-cycle implementation, we assume that the PC is written 6 times in each clock cycle.

False

83
New cards

Only control lines that are set in memory access stage are:

(a) MemRead, MemWrite, and RegWrite

(b) MemRead, MemWrite, and Branch

(c) MemWrite, MemRead, and RegDst

(d) Branch, MemRead and RegWrite

(b) MemRead, MemWrite, and Branch

84
New cards

The registers must be wide enough to _____________.

(a) store only 32-bits data

(b) store all the data corresponding to the lines

(c) store only 8 bits data

(d) store only control signals

(a) store only 32-bits data

85
New cards

Two control lines for Write Back are ___________.

(a) MemtoReg and MemWrite

(b) MemtoReg and MemRead

(c) MemtoReg and RegWrite

(d) MemWrite and RegWrite

(c) MemtoReg and RegWrite

86
New cards

Execution and address calculation stage only uses 4 bits control lines that are ____________.

(a) RegDst, ALUSrc, Branch, and ALUOp

(b) ALUOp, RegDest, and ALUSrc

(c) ALUSrc, JumpTarget, ALUOp, and RegDest

(d) ALUOp, ALUSrc and RegWrite

(b) ALUOp, RegDest, and ALUSrc

87
New cards

T/F: Three common types of hazards are data hazards, structural hazards, and control hazards (branching hazards).

True

88
New cards

T/F: The control values for the last three stages are created during the instruction decode stage and then placed in the MEM/WB pipeline register.

False

89
New cards

T/F: Structural hazards arise because there are too many duplications of resources.

False

90
New cards

T/F: Data hazard is caused by data dependencies in pipelined datapath.

True

91
New cards

T/F: In case of branch-not-taken prediction designed processor, if branch is not taken, then our pipeline will function properly, and we have no stalls at all.

True

92
New cards

T/F: Target address is computed at the end of MEM stage of a branch instruction. If at the time we find out that the branch is taken, we must flush out all instructions in branch not taken prediction pipeline.

False

93
New cards

T/F: In MIPS architecture, a branch delay slot is filled by a bubble which does not affect the branch.

False

94
New cards

T/F: As a processor designer attempts to incorporate both longer pipelines and issuing multiple instructions per clock cycle in a processor, the branch delay becomes longer, and a single delay slot is insufficient.

True

95
New cards

Hazards are problems with the instruction pipeline when the _______ instruction cannot execute the following clock cycle.

(a) previous

(b) next

(c) first

(d) last

(b) next

96
New cards

Suppose processor A executes instructions in the following 4 stages IF&ID - 30ns, EX - 30ns, MEM - 40ns, WB - 20ns. The performance ratio of unpipelined vs pipelined implementation of processor A is __________. (Assuming no stalls)

(a) 5/2

(b) 3/2

(c) 3/1

(d) 4/3

(b) 3/2

97
New cards

How many states are there in a 2-bit prediction scheme?

(a) 2

(b) 4

(c) 8

(d) All of the above

(b) 4

98
New cards

Control hazards can be resolved by _______.

(a) dynamic prediction

(b) predict not taken

(c) predict taken

(d) all of the above

(d) all of the above

99
New cards

A small memory that contains one or more bits indicating whether the branch was recently taken or not is called ___________.

(a) branch target buffer

(b) correlating predictor

(c) tournament branch predictor

(d) branch prediction buffer

(d) branch prediction buffer

100
New cards

Match the words and definitions:

1. Data Hazards

2. Structural Hazards

3. Control Hazards

(a) Hardware cannot support certain combinations of instructions (two instructions in the pipeline require the same resource).

(b) Instruction depends on result of prior instruction still in the pipeline.

(c) Caused by delay between the fetching of instructions and decisions about changes in control flow (branches and jumps).

Data Hazards - (b)

Structural Hazards - (a)

Control Hazards - (c)