Question: You're tasked to write a LC-3 program to determine if a number is stored in at memory location x30FF is even or odd. In order

You're tasked to write a LC-3 program to determine if a number is stored in at memory location x30FF is even or odd. In order to complete this task you must first copy the contents of memory location x30FF to a register using a data movement instruction. To determine if a value is even or odd, you only need to check to see if the LSB (bit 0) is 0 (even) or 1 (odd). R7 = 1 if odd and R7 = 0 if even. Fill in the missing pieces of the program.

NOTE: First answer is 6 bits and second is 4 bits.

R0: x30FF R1: x0001, R7:x0000

RO: X30FF R1: x0001, R7:x0000 x30000 001 x30010 1010100101 o0001 x3002 ZZZ

RO: X30FF R1: x0001, R7:x0000 x30000 001 x30010 1010100101 o0001 x3002 ZZZ 1110 00010

Step by Step Solution

3.34 Rating (154 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Greetings Instructions required LDR R2R00 0110 010 000 000000 This instruction load ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!