
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
- Translate the following code segment into MARIE's assembly language:
1) A + B (can use user input)
2) A+ B -D + C
where:
A = hex 012F
B = hex 011C'
D = dec 14
C = dec 82
3) cin >> X; cin >> Y; cout << X; cout << Y; Z = X + Y; cout << Z; X = 0; Y = 0; cout << X; cout << Y;
Expert Solution

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

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Which of the following snippets of MIPS assembly code implements the following C++ code fragment: if (x > y) z = x - y else z = y - x You may assume that x, y, and z map to the registers $t0, $t1, and $t2. ble $t0, $t1, foo sub $t2, $t0, $t1 b bar foo: sub $t2, $t1, $t0 bar: bgt $t0, $t1 sub $t2, $t0, $t1 b bar else: sub $t2, $t1, $t0 bar: ble $t0, $t1, foo sub $t2, $t0, $t1 foo: sub $t2, $t1, $t0 bgt $t0, $t1, foo sub $t2, $t0, $t1 b bar foo: sub $t2, $t1, $t0 bar:arrow_forwardWhat is the assembly language statement of this machine language code 8B7164H? Select the correct response: MOV SI, [BX + DI + 64H] MOV[BX + DI + 46H], SI MOV[BX + DI + 64H], CX MOV CX, [BX + DI + 46H]arrow_forwardWhich of the following segments of C code best describes what the following MIPS assembly code does? la $t0, x lw $t1, 0($t0) la $t2, y lw $t3, 0($t2) li $t4, 42 l1: bne $t4, $t1, l2 addu $t1, $t1, $t3 l2: sw $t1, 0($t0) Group of answer choices a) while (x==42) { x=x+y; } b) if (x==42) { x=x+y; } c) while (x!=42) { x=x+y; } d) if (x!=42) { x=x+y; } e) x=x+y;arrow_forward
- Convert the following into Pep/9 assembly language: #include <iostream> using namespace std; int num int main() { cin >> num; num = num % 16; cout << "num=" << num << endl; return 0; } Hint for the %16 part: 0 % 16 = 01 % 16 = 12 % 16 = 2...14 % 16 = 1415 % 16 = 1516 % 16 = 017 % 16 = 1...30 % 16 = 1431 % 16 = 1532 % 16 = 0... Convert all the results to binary. What do they all have in common?arrow_forwardE In the following code block(Reference:Q11), you will a set of assembly instructions with corresponding line numbers (line numbers are for informational purpose only and they are not part of the source code). 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 mov edx, 5 dec ecx jmp LABEL1 mov eax, 1 LABEL1: mul edx jmp ecx mov edx, 0678h sub edx, eax jmp DWORD PTR [edx] neg ebx add ecx, ebx mov eax, 0 For each of the conditions/scenario listed below, indicate the corresponding line number (that cause or is associated with the condition/scenario). Enter 0 (Zero) if the condition is not caused by the block of code. 1) Memory indirect jump: type your answer... type your answer... type your answer... type your answer... 2) Register indirect jump: 3) Relative short jump: type your answer... 5) Two's complement type your answer... 4) Relative near jump: 6) Unreachable codearrow_forwardConvert the following into Pep/9 assembly language: #include <iostream> using namespace std; int num int main() { cin >> num; num = num % 16; cout << "num=" << num << endl; return 0; } Hint for the %16 part: 0 % 16 = 01 % 16 = 12 % 16 = 2...14 % 16 = 1415 % 16 = 1516 % 16 = 017 % 16 = 1...30 % 16 = 1431 % 16 = 1532 % 16 = 0... Convert all the results to binary. What do they all have in common?arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education