Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Samenvatting

Summary cos2621 assignment 1 2022 solutions 100%

Beoordeling
-
Verkocht
2
Pagina's
7
Geüpload op
06-06-2022
Geschreven in
2021/2022

solutions for assignment 1 cos2621 solutions

Instelling
Vak

Voorbeeld van de inhoud

Cos2621 assignment 1 2022



Question 1 [10]

(a) The following table reflects the contents of a part of memory in a one‐address machine

with an accumulator:

Address Contents

00 20

20 30

30 40

40 50

50 60

60 70

What values do the following instructions load into the accumulator?



LOAD IMMEDIATE 20: Immediate addressing. The value to be used forms part of the

instruction. In this instance, the value 20 will be loaded into the accumulator.

LOAD DIRECT 20: Direct addressing. The instruction contains the address where the value is

to found. Address 20 contains the value 30, thus the value 30 will be loaded into the

accumulator.

LOAD INDIRECT 20: Indirect addressing. The instruction contains the address where the

address of the value to be used, is to be found. Address 20 contains the address of the value to

be used, ie address 30. Address 30 contains 40, thus the value 40 will be loaded into the

Accumulator.



b) Give examples of Intel x86 instructions in which the following addressing modes are

used:

Immediate addressing mov al,3

Direct addressing mov al,[temp]

Stack addressing push ax (pop ax)

Indexed addressing mov al,[si] (mov [di],al)

Base‐addressing mov al,[bp]

, Register indirect addressing mov al,[bp] (mov al,[si], mov [di],al)



Question 2 [11]

(a) Briefly discuss the concepts of (i) error correcting‐codes and (ii) error‐detecting codes.

(i) Error‐correcting codes are used when an error is detected in the error‐detecting

process. The number of bit errors in a word plays an important role. The

Hamming code is often used for error‐correction. Parity bits are used in this

process. By a process of elimination (see Stallings , fig 5.8) errors can be

corrected. For a detailed description of this process, refer to Stallings, 9th

edition, p 193)

(ii) Error‐detecting codes use parity bits to detect hardware failures and soft errors.



b) What is the distinction between spatial locality and temporal locality?

Spatial locality refers to the tendency of execution to involve a number of clustered

memory locations. A program also tends to access data locations sequentially.

Temporal locality refers to the tendency for a processor to access memory locations

that have been used recently, eg when a loop is executed, the processor executes the

same instructions repeatedly.



c) Briefly describe the cache organisation of the Pentium 4.

- L1 instruction cache (on-chip): 12K in size and holds micro-operations. Sits between the

instruction decode logic and the execution core.

- L1 data cache (on-chip): 16Kb, 4-way set-associative organisation. Uses a writeback

policy.

- L2 cache of 256Kb: Feeds both L1 data and instruction caches. Its organisation is 8- way

set-associative.

- L3 cache: on-chip (8-way set-associative).

Memory subsystem: This unit contains both the L2 and L3 caches and the system bus. The

bus is used to access main memory when the L1 and L2 caches have a cache miss.



Question 3 [9]

Geschreven voor

Instelling
Vak

Documentinformatie

Geüpload op
6 juni 2022
Aantal pagina's
7
Geschreven in
2021/2022
Type
SAMENVATTING

Onderwerpen

$9.50
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
elenaprowriter University of South Africa (Unisa)
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
104
Lid sinds
4 jaar
Aantal volgers
71
Documenten
22
Laatst verkocht
3 maanden geleden

3.5

13 beoordelingen

5
3
4
4
3
4
2
1
1
1

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen