Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Consider a hypothetical machine with three instructions 0001 = Load AC from memory 0010 = Store AC to memory 0101 = Add to AC

image text in transcribed

1. Consider a hypothetical machine with three instructions 0001 = Load AC from memory 0010 = Store AC to memory 0101 = Add to AC from memory Consider the 16 bits instruction format as 4 bits for opcode and 12 bits for address Consider a program that adds the contents of the memory word at address 940H to the contents of the memory word at the address 941H and stores the result in the later location. The address of the first instruction is 300H. Write hex code for this program. Follow the execution of this program using the Figure below: - Fetch stage Execute stage Memory CPU registers Memory CPU registers 300 1 9 4 0 3 0 0 PC 3 0 1PC 301 5 9 4 1 AC 301 5 9 4 1 O O O 3 AC 302 2 9 4 1 1 9 4 0 IR 302 2 9 4 1 1 9 4 O IR 940 0 0 0 941 0 0 0 3 2 Step 1 Memory 3001 9 4 0 301 5 9 4 1 302 2 9 4 1 940 0 0 0 3 941 0 0 0 2 Step 2 CPU registers Memory 3 0 1PC 300 1 9 4 0 O 0 0 3] AC 301 5 9 4 1 5 9 4 1 IR 3022 9 4 1 CPU registers 3 0 2PC 0 0 0 5 AC 5 9 4 1 IR 3 + 2 = 54 940 0 0 0 3 941 0 0 0 2 Step 3 Memory 3001 94 0 301 5 9 4 1 302 2 9 4 1 940 0 0 0 3 941 0 0 0 2 Step 4 CPU registers | Memory 3 0 2 PC 300 1 9 4 0 O O O 5 AC 301 5 9 4 1 2 9 4 1 IR 302 2 9 4 1 CPU registers 3 0 3 PC O O O 5 AC 2 9 4 1 IR 940 0 0 0 941 0 0 0 Step 5 3 2 940 0 0 0 941 O O O Step 6 3 5 Example of Program Execution (contents of memory and registers in hexadecimal)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Medical Image Databases

Authors: Stephen T.C. Wong

1st Edition

1461375398, 978-1461375395

More Books

Students also viewed these Databases questions

Question

Calculate the missing values for the promissory notes described

Answered: 1 week ago

Question

d. What language(s) did they speak?

Answered: 1 week ago