7. Write the following code segment in MARIE's assembly language: if X > 2 then { Y=X+X; } else { Y = Y + 2; } X=X+Y;
Q: What is the behavior of the xor command for multiple inputs?
A: XOR gate: XOR stands for Exclusive-OR gate. It is a logic gate. Example: A B A XOR B 0 0 0 0…
Q: A mouse push event and a mouse click event are distinguished from one another by the order in which…
A: One of the most distinguishing features between the two is that the mouse push event comes before…
Q: Question 3 How would I do this? Ensure you have DFS installed on any two servers. Enable…
A: Prerequisites: This tutorial comprises hands-on demonstrations. You can follow along by having the…
Q: Determine whether (3 , 5) -< (4, 8), whether (3 , 8) -< (4, 5), and whether (4, 9) -< (4, 1 1) in…
A: Definition: R should be considered a relation on A. R is a partial order iff then. It is referred to…
Q: Write a program c++ that prints a receipt with the following information. Let the program has the…
A: Your C++ program is given below as you required with an output.
Q: What are the responsibilities of data link layer?
A:
Q: draw class diagram, sequence diagram and collaboration diagram for "A WOMEN MENSURATION CYCLE…
A: class diagram, sequence diagram and collaboration diagram are used to develop software. Class…
Q: Explain in your own words why it is important to design information security into applications…
A: In this question we need to explain why it is necessary to design information security into…
Q: 3. In what order are keys printed if we further modify TRAVERSE as follows: TRAVERSE (root) 1: if…
A: In this question we have been given a Binary Search Tree (BST) and we need to determine the order of…
Q: Define what is a state?
A: Define what is a state answer in below step.
Q: We have a hash map that was not constructed correctly, with all of the values being placed into the…
A: INTRODUCTION: Graphs are data structures made up of nodes, each of which stands for a particular…
Q: The load balancer redirects traffic to the remaining online servers if a single node goes _________.
A: Solution: The answer is down. The load balancer redirects traffic to the remaining online servers…
Q: Distinguish between band FM and wide band FM.(Dec'13)
A: Introduction: In contrast to private signals that are sent to specific receivers, broadcasting is…
Q: With reference to AM define modulation index (or) depth of modulation.
A: Amplitude Modulation, AM Index & Modulation Depth Modulation Index and Modulation Depth are key…
Q: in matlab Given the number of elements of a vector, the starting element, and the last element,…
A: Mat lab: Millions of engineers and scientists worldwide use MATLAB® to analyze and design the…
Q: Tell me the difference between Scenario and Use Case and Test Case? Or difference between Scenario…
A: The process of creating a set of instructions that tells a computer how to perform a task is known…
Q: EXERCISE 1: Compare two random numbers Write code to pick two random numbers. Output a message only…
A: Logic import random initialize num1 = random.random(), num2 = random.random() check if num1 is…
Q: Mention the types of errors. ..
A: The above question that is mention types of errors is answered in below step.
Q: Write a switch statement that checks origLetter. If 'a' or 'A', print "Alpha". If 'b' or 'B', print…
A: Please find the answer below :
Q: MCQ: 1. Which one is not a programming language a. C++ b. Python c. Fortom d. Swift e. Java Script…
A: 1. which one is not a programming language. Answer :- fortom
Q: Write the structure of memory hierarchy..
A: Memory: Five major hierarchies based on use and speed can be created within the computer memory.…
Q: Distinguish between band FM and wide band
A: We need to distinguish between band FM and wide Band FM.
Q: ▾ Problem 1 Write a generator for the Fibonacci Numbers Build a generator that returns the Fibonacci…
A: Python Code
Q: Using the IEEE 745 floating point standard (shown below), represent the number -239.375 as a 32-bit…
A: The complete answer is below:
Q: how to use and gain access to cloud-hosted applications and services.
A: This statement explains how cloud-based services and applications are used: Hosting Network apps and…
Q: efine DTE ar
A: Lets see the solution.
Q: What type of operating system structure is MINIX 3? Explain its advantages or disadvantages and…
A: Definition: Open-source operating system Minix 3 is made to be very dependable, adaptable, and…
Q: getting this issue: Library.java:118: error: class, interface, or enum expected import…
A: Here i discuss about why this error occured.…
Q: Algorithm for Hertel–Mehlhorn method for convex partition. Convex-Partition(P) in: polygon P out:…
A: Definition: Convex shapes are simpler to algorithmic than concave ones. Because not every…
Q: 3. Enumeration by CodeChum Admin Have you ever answered a test question that tells you to enumerate…
A: Introduction: Step 1 Start Step 2 class Step 3 Get the String List Step 4 Convert a String List to a…
Q: Contains iterative and non-iterative searches, authoritative and root servers, and DNS records.
A: Definition: DNS is sometimes described as the internet's equivalent of the phone book. When you…
Q: In cell D7, enter a formula without using a function that multiples the Monthly_Payment (cell D6) by…
A: The formulas for option a and b are given in the below step I cannot provide any output screenshot…
Q: Distinguish between band FM and wide band FM.(Dec'13)
A: Introduction FM broadcasting: Applying frequency modulation, FM broadcasting is a type of radio…
Q: Write code for determining the index of a value in an OrderedVector. Be aware that if the value is…
A: Here, we provide the code for finding a value's index within an OrderedVector. Be careful that the…
Q: When working with 1024K words, how many address bits are required?
A: GIVEN: A software programme called a database management system (DBMS) is used to store and retrieve…
Q: What are the advantages of QPSK as compared to BPSK?
A:
Q: a desktop computer's operating system's capabilities?
A: Introduction: A computer's operating system serves as a link between users and the hardware.…
Q: what is LAN?
A:
Q: Modify the Student class presented above as follows. ✓ Each student object should contain the scores…
A: The c++ program is given below:
Q: Draw and explain the block diagram of Mealy model
A: Here we have given diagram with explanation on Mealy model. You can find the solution in step 2.
Q: Vrite an if-else statement to describe an object. Print "Balloon" if isBalloon is true and isRed is…
A: Java Java is a popular object-oriented programming language and software platform that powers…
Q: Gartner lists 15 “critical capability areas”. Select one BA Platform and explain how that platform…
A: Definition: The Gartner Magic Quadrant announcement is a tremendously exciting moment for…
Q: lease answer::---8
A: From question we need to code in Matlab (how to find largest and smallest integer normally and in…
Q: Distinguish between band FM and wide band FM.(Dec'13)
A: The question is to distinguish between band FM and wide band FM.
Q: Define what is a state?
A: The condition of a program with relation to inputs that have been stored is referred to as its state…
Q: sing a class, write a C++ program to find the Sum of odd numbers between 1 and 100.
A: Given To know about the sum of odd number in C++. programming language.
Q: Is it consistent to say that a hash table of size m always contains the same number of linked lists?…
A: Introduction: Hashing is utilised to distinguish the single item from a collection of related…
Q: What do you understand by "Human Error" in Database Administration
A: Here in this question we have asked about human error in database administration.
Q: What is the primary advantage of DBPSK and what is its disadvantage?
A:
Q: A = 0, B = 1, ... , Z = 25
A: The answer is
Step by step
Solved in 2 steps
- please modify the c language program into a pep 9 assembly language #include <stdio.h> int num, answer; int divide ( int numer, int denom ) { int quotient, remain; remain = numer; quotient = 0; while ( remain >= denom ) { remain -= denom; quotient++; } // end for return quotient; } // end of divide( ) int modulus ( int n, int d ) { int quot, rem; rem = n; quot = 0; while ( rem >= d ) { rem -= d; quot++; } // end for return rem; } // end of modulus( ) int main() { printf("? "); scanf("%d", &num); answer = divide(num, 20); printf("%d / 20 = %d\n", num, answer); answer = modulus(num, 20); printf("%d mod 20 = %d\n", num, answer); answer = divide(num, 35); printf("%d / 35 = %d\n", num, answer); answer = modulus(num, 35); printf("%d mod 35 = %d\n", num, answer); return 0; } // end of mainTranslate the following C program to Pep/9 assembly language. #include int inpNum, sum, count, min; int main() { sum = 0; count = 0; min = 32767; printf("? "); scanf("%d", &inpNum); while (inpNum != 0 ) { sum += inpNum; count++; if (inpNum < min) { min = inpNum; } printf("? "); scanf("%d", &inpNum); } // end while printf("Sum printf("Count printf("Min } // end of main = = %d\n", sum); = %d\n", count); %d\n", min);MIPS Programming Assignment Part I Rewrite C statements int i = 11; int j = 10; int A[] = { 0x11, 0x22, 0x33 }; int B[] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8 }; B[ 8 ] = A[ i - j ]; in MIPS assembly. Assume that addresses of variables i, j, A, and B are loaded into the registers $s3, $s4, $s6, and $s7, respectively: .data i: .word 11 j: .word 10 A: .word 0x11, 0x22, 0x33 B: .word 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8 .text la $s3, i # load address of i la $s4, j # load address of j la $s6, A # load address of A la $s7, B # load address of B When you finished programming, add a comment at the end of your code which specifies what value is assigned to the location of B[8] after the program executes. Part IIWrite MIPS Assembly program that allows the user to enter a string of text. Determine whether the entered string is a palindrome (a word or a phrase that reads the same backward as forward, like "kayak" and "level") and print the result on the screen.
- Translate the following C program to Pep/9 assembly language. #include <stdio.h> int myAge; void putNext(int age) {int nextYr;nextYr = age + 1;printf("Age: %d\n", age);printf("Age next year: %d\n", nextYr);} int main () {scanf("%d", &myAge);putNext(myAge);putNext(64);return 0;}Translate the following c++ code into pep9 assembly language #include using namespace std; int square(int n){ int i; int sq; sq = 0; for (i = 0; i < n; i++){ sq = sq + n; } return sq; } int main (){ int num; cout << "Enter a number: "; cin >> num; cout << num << " squared = " << square(num) << endl; return 0; }Write a Pep/9 assembly language program that corresponds to the following C program: int num1; int num2; int main () { scanf("%d %d", &num1, &num2); printf("%d\n%d\n", num2, num1); return 0; }
- TASM/Assembly Language Convert the following C codes into its equivalent assembly code: c. if (al>bl) && (bl=cl) x=1; d. if (al > bl) || (bl > cl) x=1;Please can you convert this part of a c program to pep 9 assembly language void findLog ( int *result, int num, int b ) { int k; num--; *result = 0; while (num > 0) { *result = *result + 1; num = divide(num, b); } // end while } // end of findLog( )Convert the following c++ code into pep9 assembly language #include <iostream> using namespace std; int times(int mpr, int mcand) { int prod = 0; while (mpr != 0) { if (mpr % 2 == 1) prod = prod + mcand; mpr /= 2; mcand *= 2; } return prod; } int main(){ int n, m; cout << "Enter two numbers: "; cin >> n >> m; cout << "Product: " << times(n, m) << endl; return 0; } Submit: pep source code and as well as the screenshot of pep9 assembly code running in the pep stimulator.
- Example: The Problem Input File Using C programming language write a program that simulates a variant of the Tiny Machine Architecture. In this implementation memory (RAM) is split into Instruction Memory (IM) and Data Memory (DM). Your code must implement the basic instruction set architecture (ISA) of the Tiny Machine Architecture: //IN 5 //OUT 7 //STORE O //IN 5 //OUT 7 //STORE 1 //LOAD O //SUB 1 55 67 30 55 67 1 LOAD 2- ADD 3> STORE 4> SUB 5> IN 6> OUT 7> END 8> JMP 9> SKIPZ 31 10 41 30 //STORE O 67 //OUT 7 11 /LOAD 1 //OUT 7 //END 67 70 Output Specifications Each piece of the architecture must be accurately represented in your code (Instruction Register, Program Counter, Memory Address Registers, Instruction Memory, Data Memory, Memory Data Registers, and Accumulator). Data Memory will be represented by an integer array. Your Program Counter will begin pointing to the first instruction of the program. Your simulator should provide output according to the input file. Along with…Take the following program and translate it into PEP/9 assembly language: #include <iostream> using namespace std; int fib(int n) { int temp; if (n <= 0) return 0; else if (n <= 2) return 1; else { temp = fib(n – 1); return temp + fib(n-2); } } int main() { int num; cout << "Which fibonacci number? "; cin >> num; cout << fib(num) << endl; return 0; } You must use equates to access the stack and follow the call to the function as discussed in the book (pass the parameter, return address, return a value and so on). There are NO global variables in the resulting code (except a global message of "Range num? "). It must be able to do sum a range greater than 2. comments would be appreciatedQ: CONVERT FOLLOWING C CODE INTO ARM ASSEMBLY CODE #include<stdio.h>int main() {int i, space, rows = 8, star=0; for(i = 0; i < rows-1; i++) {for(space = 1; space < rows-i; space++) {printf(" ");}for (star = 0; star <= 2*i; star++) {if(star==0 || star==2*i)printf("*");elseprintf(" ");}printf("\n");}for(i=0; i<2*rows-1; i++){printf("*");}return 0;}