Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  The memory locations 1000, 1001 and 1020 have... Start Learning for Free
The memory locations 1000, 1001 and 1020 have data values 18, 1 and 16 respectively before the following program is
executed.
MOVI               Rs, 1                ; Move immediate
LOAD               Rd, 1000 (Rs)  ; Load from memory
ADDI                Rd, 1000          ; Add immediate
STOREI           0 (Rd), 20         ; Store immediate
Which of the statements below is TRUE after the program is executed ?
  • a)
    Memory location 1000 has value 20
  • b)
    Memory location 1020 has value 20
  • c)
    Memory location 1021 has value 20
  • d)
    Memory location 1001 has value 20
Correct answer is option 'D'. Can you explain this answer?
Verified Answer
The memory locations 1000, 1001 and 1020 have data values 18, 1 and 16...
D) Memory location 1001 has value 20.
Rs  1 (Immediate Addressing)

Rd  1 (Indexed Addressing, value at memory location 1+1000 = 1001 is loaded to Rwhich is 1)
( Rbecomes 1+1000)
store in address  1001   20
View all questions of this test
Most Upvoted Answer
The memory locations 1000, 1001 and 1020 have data values 18, 1 and 16...
Explanation:

The given program executes the following steps:

1. MOVI Rs, 1 - Move immediate value 1 to register Rs
2. LOAD Rd, 1000 (Rs) - Load the value at memory location 1001 (contents of Rs + 1000) into register Rd. So, Rd now contains 18.
3. ADDI Rd, 1000 - Add immediate value 1000 to the value in register Rd. So, Rd now contains 1018.
4. STOREI 0 (Rd), 20 - Store immediate value 20 in the memory location whose address is the sum of the value in register Rd and the immediate value 0. So, memory location 1018 (contents of Rd) now contains 20.

Therefore, the memory locations have the following values after the program is executed:

- Memory location 1000 has value 18
- Memory location 1001 has value 1
- Memory location 1018 has value 20

Option D is the correct answer, as memory location 1001 was not modified in the program, but memory location 1018 (contents of Rd after ADDI instruction) was modified to contain the value 20.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

The memory locations 1000, 1001 and 1020 have data values 18, 1 and 16 respectively before the following program isexecuted.MOVI Rs, 1 ; Move immediateLOAD Rd, 1000 (Rs) ; Load from memoryADDI Rd, 1000 ; Add immediateSTOREI 0 (Rd), 20 ; Store immediateWhich of the statements below is TRUE after the program is executed ?a)Memory location 1000 has value 20b)Memory location 1020 has value 20c)Memory location 1021 has value 20d)Memory location 1001 has value 20Correct answer is option 'D'. Can you explain this answer?
Question Description
The memory locations 1000, 1001 and 1020 have data values 18, 1 and 16 respectively before the following program isexecuted.MOVI Rs, 1 ; Move immediateLOAD Rd, 1000 (Rs) ; Load from memoryADDI Rd, 1000 ; Add immediateSTOREI 0 (Rd), 20 ; Store immediateWhich of the statements below is TRUE after the program is executed ?a)Memory location 1000 has value 20b)Memory location 1020 has value 20c)Memory location 1021 has value 20d)Memory location 1001 has value 20Correct answer is option 'D'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about The memory locations 1000, 1001 and 1020 have data values 18, 1 and 16 respectively before the following program isexecuted.MOVI Rs, 1 ; Move immediateLOAD Rd, 1000 (Rs) ; Load from memoryADDI Rd, 1000 ; Add immediateSTOREI 0 (Rd), 20 ; Store immediateWhich of the statements below is TRUE after the program is executed ?a)Memory location 1000 has value 20b)Memory location 1020 has value 20c)Memory location 1021 has value 20d)Memory location 1001 has value 20Correct answer is option 'D'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for The memory locations 1000, 1001 and 1020 have data values 18, 1 and 16 respectively before the following program isexecuted.MOVI Rs, 1 ; Move immediateLOAD Rd, 1000 (Rs) ; Load from memoryADDI Rd, 1000 ; Add immediateSTOREI 0 (Rd), 20 ; Store immediateWhich of the statements below is TRUE after the program is executed ?a)Memory location 1000 has value 20b)Memory location 1020 has value 20c)Memory location 1021 has value 20d)Memory location 1001 has value 20Correct answer is option 'D'. Can you explain this answer?.
Solutions for The memory locations 1000, 1001 and 1020 have data values 18, 1 and 16 respectively before the following program isexecuted.MOVI Rs, 1 ; Move immediateLOAD Rd, 1000 (Rs) ; Load from memoryADDI Rd, 1000 ; Add immediateSTOREI 0 (Rd), 20 ; Store immediateWhich of the statements below is TRUE after the program is executed ?a)Memory location 1000 has value 20b)Memory location 1020 has value 20c)Memory location 1021 has value 20d)Memory location 1001 has value 20Correct answer is option 'D'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of The memory locations 1000, 1001 and 1020 have data values 18, 1 and 16 respectively before the following program isexecuted.MOVI Rs, 1 ; Move immediateLOAD Rd, 1000 (Rs) ; Load from memoryADDI Rd, 1000 ; Add immediateSTOREI 0 (Rd), 20 ; Store immediateWhich of the statements below is TRUE after the program is executed ?a)Memory location 1000 has value 20b)Memory location 1020 has value 20c)Memory location 1021 has value 20d)Memory location 1001 has value 20Correct answer is option 'D'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of The memory locations 1000, 1001 and 1020 have data values 18, 1 and 16 respectively before the following program isexecuted.MOVI Rs, 1 ; Move immediateLOAD Rd, 1000 (Rs) ; Load from memoryADDI Rd, 1000 ; Add immediateSTOREI 0 (Rd), 20 ; Store immediateWhich of the statements below is TRUE after the program is executed ?a)Memory location 1000 has value 20b)Memory location 1020 has value 20c)Memory location 1021 has value 20d)Memory location 1001 has value 20Correct answer is option 'D'. Can you explain this answer?, a detailed solution for The memory locations 1000, 1001 and 1020 have data values 18, 1 and 16 respectively before the following program isexecuted.MOVI Rs, 1 ; Move immediateLOAD Rd, 1000 (Rs) ; Load from memoryADDI Rd, 1000 ; Add immediateSTOREI 0 (Rd), 20 ; Store immediateWhich of the statements below is TRUE after the program is executed ?a)Memory location 1000 has value 20b)Memory location 1020 has value 20c)Memory location 1021 has value 20d)Memory location 1001 has value 20Correct answer is option 'D'. Can you explain this answer? has been provided alongside types of The memory locations 1000, 1001 and 1020 have data values 18, 1 and 16 respectively before the following program isexecuted.MOVI Rs, 1 ; Move immediateLOAD Rd, 1000 (Rs) ; Load from memoryADDI Rd, 1000 ; Add immediateSTOREI 0 (Rd), 20 ; Store immediateWhich of the statements below is TRUE after the program is executed ?a)Memory location 1000 has value 20b)Memory location 1020 has value 20c)Memory location 1021 has value 20d)Memory location 1001 has value 20Correct answer is option 'D'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice The memory locations 1000, 1001 and 1020 have data values 18, 1 and 16 respectively before the following program isexecuted.MOVI Rs, 1 ; Move immediateLOAD Rd, 1000 (Rs) ; Load from memoryADDI Rd, 1000 ; Add immediateSTOREI 0 (Rd), 20 ; Store immediateWhich of the statements below is TRUE after the program is executed ?a)Memory location 1000 has value 20b)Memory location 1020 has value 20c)Memory location 1021 has value 20d)Memory location 1001 has value 20Correct answer is option 'D'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev