logo

Crowdly

Browser

Add to Chrome

CA & OS (Computer Architecture) - EFREI - Fall 2026

Looking for CA & OS (Computer Architecture) - EFREI - Fall 2026 test answers and solutions? Browse our comprehensive collection of verified answers for CA & OS (Computer Architecture) - EFREI - Fall 2026 at moodle.lab.ii.agh.edu.pl.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

Consider following declaration:

.data

val:    .word 0xABCD

         .long 0xdeafbeef

         .word -157

What value you will receive when you try to read .long from address (val+4)?

0%
0%
0%
0%
View this question

Consider .quad 0x231acadbeef9800 .

What is the most significatnt byte (MSB) and least significant byte (LSB) of this value?

0%
0%
100%
0%
0%
0%
View this question

Le nombre 32 bits 0xb0e0f0a0 sera représenté en mémoire sur un ordinateur x86 à l'adresse @a comme suit :

0%
0%
0%
0%
View this question

This exercise focuses on how different types of data are arranged in memory.

The x86 memory organization is called little endian. It means that the least significant byte (LSB) of a multi-byte variable will be placed at a lower memory address. For a review, a slide from the lecture:

So, let's start with some basics. Which byte sequence would you rather find in a memory dump if the machine you're working with is little-endian and the memory contains a 32-bit variable which has the value of 0x01020304 in hexadecimal?

0%
0%
0%
0%
0%
0%
View this question

Consider a processor in which the execution of each instruction is

divided into 4 phases.  What will be the

theoretical maximum speedup of program execution if the processor's

instructions can be executed in a pipeline?

❌
✅
❌
❌
View this question

The user program consists of 25 instructions, each of which is executed

in one clock cycle, and 10 instructions, each of which executes in 5 clock

cycles.

The average cycles per

instruction (

CPI) for that program is:

✅
❌
❌
❌
View this question

In this section, you will evaluate how long it takes to execute different types of the instructions of the MIPS computer.

Number of clock cycles for dadd instruction (integer addition)

Load and execute in step mode following program:

        .text

main:    dadd

r1,r0,r1 ; r1 = r0+r1 

         nop

         syscall 0

As a result of the execution you should receive clock cycle diagram of the execution similar to this on the image:

Clock cycle diagam of execution of dadd instruction.

Analyze this clock cycle diagram of execution of the program and answer the question: 

How many clock cycles does the execution of the instruction dadd r1,r0,r1 take (each box in clock cycle diagram represents one clock tick )?

0%
0%
0%
100%
View this question

In this section, you will evaluate how long it takes to execute different types of the instructions of the MIPS computer.

Number of clock cycles for dadd instruction (integer addition)

Load and execute in step mode following program:

        .text

main:    dadd

r1,r0,r1 ; r1 = r0+r1 

         nop

 

       halt

As a result of the execution you should receive clock cycle diagram of the execution similar to this on the image:

Clock cycle diagram foo dadd insdtruction.

Analyze this clock cycle diagram of execution of the program and answer the question: 

How many clock cycles does the execution of the instruction dadd r1,r0,r1 take (each box in clock cycle diagram represents one clock tick )?

❌
❌
❌
✅
View this question
W-A-W hazard

This type of hazard may occur when two adjacent instructions (i) and (j) save the result of their execution to the same resource (register, memory cell) and the time of the execution of the earlier instruction (i) is longer than the time of the execution instruction (j). It may cause an erroneous result of executing this sequence of instructions to be written into the resource. The typical way to remove such a dependency is to delay the completion of the execution instruction (j) until the execution of the instruction (i) is completed. 

To illustrate this problem, the following code will be used:

;WinMIPS64 WAW hazard example

    .data

A:    .double 15.0

B:    .double 5.0

C:    .double 4.4

D:    .double 1.0

E:    .double 3.14

res:    .double 0.0

    

    .text

main:    l.d f2,A(r0)

    l.d f3,B(r0)

    l.d f4,C(r0)

    l.d f5,D(r0)

    l.d f6,E(r0)

    nop

    mul.d f6,f2,f4

    sub.d f6,f2,f3

    add.d f3,f6,f4

    s.d f3,res(r0)

    halt

Very important note! : Before you execute this program, be sure that the data forwarding mechanism is disabled.  If  data forwarding is enabled the MIPS hardware cannot detect, signal and prevent WAW hazard. 

Execute the example program. Analyze the clock cycle diagram and find the instruction that causes  WAW stall.

Mark the instruction that caused the WAW hazard.

❌
❌
❌
✅
❌
View this question
Structural hazard

A structural hazard occurs when two or more instructions that are in different phases of the execution request access to the same hardware resource (memory, execution unit, etc.). In MIPS it can be easily observed when you are using the  floating point division unit. The program below can be used to illustrate that situation.

    .data

A:    .word 3

v:    .double

0.0

x:    .double 10.0

y:    .double

5.0

z:    .double 0.0

    

 

  .text

main:    l.d f2,x(r0)      ;f2=x

   

l.d f3,y(r0)      ;f3=y

    

    div.d

f5,f3,f2    ;f5=x/y

    div.d f6,f2,f3  

 ;f6=y/x

    add.d f8,f5,f6  

 ;f8=(x/y)+(y/x)

    

    add.d

f4,f3,f3

    mul.d f7,f13,f2

    mul.d

f13,f2,f4

    mul.d f9,f4,f13

 

  

    s.d f8,z(r0)

    s.d f9,v(r0)

    halt

Analyze that program and manually calculate how many clock cycles are needed to execute it on a sequential processor. 

Let assume that the execution of any instruction takes 5 clock cycles,

the execution of div.d instruction takes additional 23 clock cycles,

mul.d takes additional 6 clock cycles, add.d takes additional 3 clock cycles.

How many clock cycles are needed to execute this program on a sequential processor?

View this question

Want instant access to all verified answers on moodle.lab.ii.agh.edu.pl?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome