Computer Organization and Architecture Assignment 2: MARIE & ISA
VerifiedAdded on 2021/06/17
|10
|718
|42
Homework Assignment
AI Summary
This document presents a comprehensive solution to a Computer Organization and Architecture (COA) assignment. The solution includes a MARIE program designed to calculate the Fibonacci sequence, addressing limitations based on input values. It then delves into instruction set architecture (ISA) concepts, calculating the possible number of zero-address instructions based on the given parameters. Furthermore, the solution provides code examples demonstrating the implementation of arithmetic operations using 3-address, 2-address, 1-address, and 0-address machines. The assignment concludes with a bibliography of relevant sources used for research and problem-solving.

Running head: COMPUTER ORGANIZATION AND ARCHITECTURE
Assignment 2: MARIE and ISA
Name of the Student
Name of the University
Author’s Note
Assignment 2: MARIE and ISA
Name of the Student
Name of the University
Author’s Note
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

1
COMPUTER ORGANIZATION AND ARCHITECTURE
Table of Contents
Answer 1:.........................................................................................................................................2
Answer 2:.........................................................................................................................................5
Answer 3:.........................................................................................................................................6
Bibliography....................................................................................................................................8
COMPUTER ORGANIZATION AND ARCHITECTURE
Table of Contents
Answer 1:.........................................................................................................................................2
Answer 2:.........................................................................................................................................5
Answer 3:.........................................................................................................................................6
Bibliography....................................................................................................................................8

2
COMPUTER ORGANIZATION AND ARCHITECTURE
Answer 1:
1.a.
MARIE program to calculate Fib (n) where user inputs is n is given below:
ORG 100
INPUT
STORE N
STORE Ctr
Loop1 CLEAR
LOAD Ctr
SUBT C1
STORE Ctr
LOAD F2
ADD F1
STORE F3
LOAD F1
STORE F2
LOAD F3
STORE F1
COMPUTER ORGANIZATION AND ARCHITECTURE
Answer 1:
1.a.
MARIE program to calculate Fib (n) where user inputs is n is given below:
ORG 100
INPUT
STORE N
STORE Ctr
Loop1 CLEAR
LOAD Ctr
SUBT C1
STORE Ctr
LOAD F2
ADD F1
STORE F3
LOAD F1
STORE F2
LOAD F3
STORE F1
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

3
COMPUTER ORGANIZATION AND ARCHITECTURE
LOAD Ctr
SKIPCOND 400
JUMP Loop1
LOAD Ctr
OUTPUT
LOAD N
OUTPUT
LOAD F1
OUTPUT
HALT
N DEC 0
Ctr DEC 0
C1 DEC 1
F1 DEC 0
F2 DEC 1
F3 DEC 0
COMPUTER ORGANIZATION AND ARCHITECTURE
LOAD Ctr
SKIPCOND 400
JUMP Loop1
LOAD Ctr
OUTPUT
LOAD N
OUTPUT
LOAD F1
OUTPUT
HALT
N DEC 0
Ctr DEC 0
C1 DEC 1
F1 DEC 0
F2 DEC 1
F3 DEC 0
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

4
COMPUTER ORGANIZATION AND ARCHITECTURE
1.b. If n is greater than 24 the program would not produce the correct result and this can be
checked by gradually increasing the value and comparing the output with the correct value.
The correct value of n for which the MARIE program can produce the correct result is the
value less than or equal to 24. This is because the threshold limit is crossed for storing the values
in the registers.
COMPUTER ORGANIZATION AND ARCHITECTURE
1.b. If n is greater than 24 the program would not produce the correct result and this can be
checked by gradually increasing the value and comparing the output with the correct value.
The correct value of n for which the MARIE program can produce the correct result is the
value less than or equal to 24. This is because the threshold limit is crossed for storing the values
in the registers.

5
COMPUTER ORGANIZATION AND ARCHITECTURE
Answer 2:
The possible number of instruction set for 11 bits address = 211
= 2048
Number of encoding expended by the two-address instructions = 6 × 24 × 24
= 1536
Number of encoding taken by the one-address instructions = 30 × 24
= 480
COMPUTER ORGANIZATION AND ARCHITECTURE
Answer 2:
The possible number of instruction set for 11 bits address = 211
= 2048
Number of encoding expended by the two-address instructions = 6 × 24 × 24
= 1536
Number of encoding taken by the one-address instructions = 30 × 24
= 480
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

6
COMPUTER ORGANIZATION AND ARCHITECTURE
Therefore the possible number of zero-address instructions = 2048 − (1536 + 480)
= 32 instructions.
Answer 3:
For 3 Address Machine
ADD R1, B, C
SUBT R2, D, E
MUL A, R1, R2
For 2 address Machine
LOAD R1, B
ADD R1, C
LOAD R2, D
SUBT R2, E
MULT R2, R1
STORE A, R2
For 1 address machine
LOAD B
ADD C
STORE TEMP
COMPUTER ORGANIZATION AND ARCHITECTURE
Therefore the possible number of zero-address instructions = 2048 − (1536 + 480)
= 32 instructions.
Answer 3:
For 3 Address Machine
ADD R1, B, C
SUBT R2, D, E
MUL A, R1, R2
For 2 address Machine
LOAD R1, B
ADD R1, C
LOAD R2, D
SUBT R2, E
MULT R2, R1
STORE A, R2
For 1 address machine
LOAD B
ADD C
STORE TEMP
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

7
COMPUTER ORGANIZATION AND ARCHITECTURE
LOAD D
SUBT E
MULT TEMP
STORE A
For the 0 address machine
PUSH B
PUSH C
ADD
PUSH D
PUSH E
SUB
MULT
STORE A
COMPUTER ORGANIZATION AND ARCHITECTURE
LOAD D
SUBT E
MULT TEMP
STORE A
For the 0 address machine
PUSH B
PUSH C
ADD
PUSH D
PUSH E
SUB
MULT
STORE A

8
COMPUTER ORGANIZATION AND ARCHITECTURE
Bibliography
Asghar, Z., & Ali, U. (2016). COMPARATIVE ANALYSIS OF MULTIPROCESSOR
ARCHITECTURE. International Journal of Advanced Research in Computer Science
and Electronics Engineering (IJARCSEE), 5(12), pp-131.
Dekeyser, J. L., & Aljendi, A. S. (2015, June). Adopting new learning strategies for computer
architecture in higher education: case study: building the S3 microprocessor in 24 hours.
In Proceedings of the Workshop on Computer Architecture Education (p. 6). ACM.
Farooq, S. M., & Basha, S. S. (2016, January). A study on Fibonacci series generation
algorithms. In Advanced Computing and Communication Systems (ICACCS), 2016 3rd
International Conference on (Vol. 1, pp. 1-5). IEEE.
Levy, H. M. (2014). Capability-based computer systems. Digital Press.
Null, L., & Lobur, J. (2014). The essentials of computer organization and architecture. Jones &
Bartlett Publishers.
Prinz, P., Crawford, T., Hennessy, J. L., & Patterson, D. A. (2018). Computer Architecture: A
Quantitative Approach.
Skiba, M. A., Sikkema, A. P., Fiers, W. D., Gerwick, W. H., Sherman, D. H., Aldrich, C. C., &
Smith, J. L. (2016). Domain organization and active site architecture of a polyketide
synthase C-methyltransferase. ACS chemical biology, 11(12), 3319-3327.
Tanenbaum, A. S. (2016). Structured computer organization. Pearson Education India.
COMPUTER ORGANIZATION AND ARCHITECTURE
Bibliography
Asghar, Z., & Ali, U. (2016). COMPARATIVE ANALYSIS OF MULTIPROCESSOR
ARCHITECTURE. International Journal of Advanced Research in Computer Science
and Electronics Engineering (IJARCSEE), 5(12), pp-131.
Dekeyser, J. L., & Aljendi, A. S. (2015, June). Adopting new learning strategies for computer
architecture in higher education: case study: building the S3 microprocessor in 24 hours.
In Proceedings of the Workshop on Computer Architecture Education (p. 6). ACM.
Farooq, S. M., & Basha, S. S. (2016, January). A study on Fibonacci series generation
algorithms. In Advanced Computing and Communication Systems (ICACCS), 2016 3rd
International Conference on (Vol. 1, pp. 1-5). IEEE.
Levy, H. M. (2014). Capability-based computer systems. Digital Press.
Null, L., & Lobur, J. (2014). The essentials of computer organization and architecture. Jones &
Bartlett Publishers.
Prinz, P., Crawford, T., Hennessy, J. L., & Patterson, D. A. (2018). Computer Architecture: A
Quantitative Approach.
Skiba, M. A., Sikkema, A. P., Fiers, W. D., Gerwick, W. H., Sherman, D. H., Aldrich, C. C., &
Smith, J. L. (2016). Domain organization and active site architecture of a polyketide
synthase C-methyltransferase. ACS chemical biology, 11(12), 3319-3327.
Tanenbaum, A. S. (2016). Structured computer organization. Pearson Education India.
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

9
COMPUTER ORGANIZATION AND ARCHITECTURE
Veldhorst, M., Eenink, H. G. J., Yang, C. H., & Dzurak, A. S. (2017). Silicon CMOS
architecture for a spin-based quantum computer. Nature communications, 8(1), 1766.
Wang, S., & ZHANG, C. (2016). Computer architecture.
COMPUTER ORGANIZATION AND ARCHITECTURE
Veldhorst, M., Eenink, H. G. J., Yang, C. H., & Dzurak, A. S. (2017). Silicon CMOS
architecture for a spin-based quantum computer. Nature communications, 8(1), 1766.
Wang, S., & ZHANG, C. (2016). Computer architecture.
1 out of 10
Related Documents

Your All-in-One AI-Powered Toolkit for Academic Success.
+13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
Copyright © 2020–2025 A2Z Services. All Rights Reserved. Developed and managed by ZUCOL.