7.7 LAB: Multiplications and divisions using shift operations - bitwise operations Shifting a positive integer left by i bits gives the same result as multiplying the same integer by 2'. Nx 22N<> i Given an integer N stored at memory address 2000, write a program that stores the result of N x 8 at memory address 2004 and the result of N/16 at memory address 2008. Use the '+' button under the Memory display to initialize the memory at address 2000. Ex: If the content at memory address 2000 is initialized in the simulator as 64, the data memory will contain: Addresses Data 2000 64 2004 512 2008 4 Note: Shift-right performs an integer division; therefore, digits after the decimal point are ignored. 591212.3550840.qx3zqy7 LAB ACTIVITY 7.7.1: LAB: Multiplications and divisions using shift operations - bitwise operations Assembly Line 1 Type your code here. Line 2 // Do not initialize memory here. Line 3 // Use the + button under the Memory display Line 4 ENTER SIMULATION STEP RUN Registers Memory x8 2000 2000 64 + 0/10 Load default template...
7.7 LAB: Multiplications and divisions using shift operations - bitwise operations Shifting a positive integer left by i bits gives the same result as multiplying the same integer by 2'. Nx 22N<> i Given an integer N stored at memory address 2000, write a program that stores the result of N x 8 at memory address 2004 and the result of N/16 at memory address 2008. Use the '+' button under the Memory display to initialize the memory at address 2000. Ex: If the content at memory address 2000 is initialized in the simulator as 64, the data memory will contain: Addresses Data 2000 64 2004 512 2008 4 Note: Shift-right performs an integer division; therefore, digits after the decimal point are ignored. 591212.3550840.qx3zqy7 LAB ACTIVITY 7.7.1: LAB: Multiplications and divisions using shift operations - bitwise operations Assembly Line 1 Type your code here. Line 2 // Do not initialize memory here. Line 3 // Use the + button under the Memory display Line 4 ENTER SIMULATION STEP RUN Registers Memory x8 2000 2000 64 + 0/10 Load default template...
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter12: Points, Classes, Virtual Functions And Abstract Classes
Section: Chapter Questions
Problem 23SA
Related questions
Question
Don't use ai to answer I will report you answer

Transcribed Image Text:7.7 LAB: Multiplications and divisions using shift operations -
bitwise operations
Shifting a positive integer left by i bits gives the same result as multiplying the same integer by 2'.
Nx 22N<<i
Likewise, shifting a positive integer right by i bits gives the same result as dividing the same integer by 2'.
N÷2N>> i
Given an integer N stored at memory address 2000, write a program that stores the result of N x 8 at memory address 2004 and the result
of N/16 at memory address 2008. Use the '+' button under the Memory display to initialize the memory at address 2000.
Ex: If the content at memory address 2000 is initialized in the simulator as 64, the data memory will contain:
Addresses Data
2000
64
2004
512
2008
4
Note: Shift-right performs an integer division; therefore, digits after the decimal point are ignored.
591212.3550840.qx3zqy7
LAB
ACTIVITY
7.7.1: LAB: Multiplications and divisions using shift operations - bitwise operations
Assembly
Line 1 Type your code here.
Line 2 // Do not initialize memory here.
Line 3 // Use the + button under the Memory display
Line 4
ENTER SIMULATION
STEP
RUN
Registers
Memory
x8
2000
2000
64
+
0/10
Load default template...
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps

Recommended textbooks for you

C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning

C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr

Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning

C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning

C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr

Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning

Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage