Quiz-1: Refer to Lecture-3 Module 1 swap (int* V, int k) { temp = V[k]; /* temp in $t0 */ V[k] = V[k+1]; V[k+1] = temp; } Write the swap() function using special registers required for accessing parameters passed to this function. Use “t” registers for any needed temporary registers.
Q: DumpSec is a tool used by system administrators performing information assurance on a Microsoft®…
A: As per the Bartleby guideline, we can only provide one answer in case of multiple questions so will…
Q: What is DSL technology? What are the services provided by the telephone companies using DSL?…
A:
Q: CHALLENGE ACTIVITY Write three statements to print the first three elements of array runTimes.…
A: 1) We have Java program that declare an array of 5 elements 2) It uses scanner object to read 5…
Q: What happens if an attacker attempts to alter the Tag (the MAC) and the ciphertext in transit while…
A: The answer to the question is given below:
Q: Describe and discuss the difference between public and private IP addressing. Give one example of a…
A: In this question we need to explain difference between private and public IP addressing with one…
Q: e between a primary server and a
A: The primary servers are claimed and overseen by unambiguous domains. These servers give legitimate…
Q: What is NAT? How can NAT help in address depletion?
A: Answer:
Q: The minimum number of columns in a datagram network is two; the minimum number of columns in a…
A:
Q: Why are watchdog timers required in such a large number of embedded systems?
A: Computer hardware and software are combined in an embedded system that is intended to accomplish a…
Q: à Can a switching table in a virtual-circuit network have two entries with the same input port…
A:
Q: MTP stands for
A: MTP in computer networks stands for Media Transfer Protocol. Let's learn what is it.
Q: Using java or c++ complete the task below: You are to create a 2D Bow and Arrow and shoot the arrow…
A: Code is given below public void prepareArrow() { // get the touch point on the screen…
Q: How to protect information security in banks
A: Information security means providing the security to the data or information using many cyber…
Q: Using the domain name www.practice.com, construct the URL for a file called history.html in a folder…
A: The DNS will fetch or access Domain Name i.e www.practice.com Then it will Go to the Root directory…
Q: In electronics, a digital-to-analog converter (DAC, D/A, or D-to-A) is a system that converts a…
A: Algorithm - Take input from user. Now use the below logic - return round(5*value/1023, 2)Display…
Q: elaborate on the use of bubble sort and insertion sort in programming
A: The simple sorting algorithm known as "bubble sort" compares nearby pairs of items in a list and…
Q: What happens if an attacker attempts to alter the Tag (the MAC) and the ciphertext in transit while…
A: The question has been answered in step2
Q: Write a Java program that uses a LOOP to sum the elements of the following words array: arrayD WORD…
A: I have tried to write an Assembly code for the given problem statement.…
Q: How to protect information security in banks
A: Information Security Respond as if the network had already been compromised. Adopting this mindset…
Q: This assignment is specifically designed to help you practice writing short Java programs and…
A: In this problem we need to debug and resolve the issues that is avaialble in the code. So I have…
Q: . Do port addresses need to be unique? Why or why not? Why are port addresses shorter than IP…
A:
Q: An entry in the switching table of a virtual-circuit network is normally created during the setup…
A: A VC is also known as virtual circuit.
Q: Write a C++ program that displays the results of the expressions 3.0*5.0,7.1 * 8.3 - * .2.2, and 3.2…
A: cout from standard iostream library is used to display the result on the terminal screen. For…
Q: Derive a learning algorithm for sphere trees to ellipsoid trees.
A:
Q: What is the basis of classification for the four types of links defined by OSPF?
A: The answer to the question is given below:
Q: Contrast and compare distance vector routing with link state routing.
A: The solution for the above given question is given below:
Q: The annual snake festival is upon us and all the snakes of the kingdom have gathered to participate…
A: Algorithm: The first line contains a single integer, R, which denotes the number of reports to be…
Q: 1. Why do OSPF messages propagate faster than RIP messages?
A:
Q: Use VLSM to subnet the 128.153.0.0/22 network based on the following requirements shown on the…
A: VLSM happens when an internetwork involves more than one veil for various subnets of a solitary…
Q: There are exactly N people living in a certain parallel universe. The Ith of these N people claim to…
A: Input-Output Format: The first line of input will contain a single integer T, denoting the number of…
Q: Briefly define subnetting and supernetting. How do the subnet mask and supernet mask differ from a…
A: Subnetting Subnetting is the process used to create sub-networks inside a network. Subnetting…
Q: Write a java method that takes four integers as arguments (int a, int b, int c, int d), that prints…
A: The above question is solved in step 2 :-
Q: What happens if an attacker attempts to alter the Tag (the MAC) and the ciphertext in transit while…
A: The answer is
Q: A research project is designed so that only one person collects data on all 50 participants. Could…
A: According to the information given:- We have to choose the correct option to satisfy the statement.
Q: The minimum number of columns in a datagram network is two; the minimum number of columns in a…
A: The answer to the question is given below:
Q: derive the weight update equations when Per perceptron is used to estimate Q.
A: Introduction: A weight represents the strength of the link between units. If the magnitude of the…
Q: The annual snake festival is upon us and all the snakes of the kingdom have gathered to participate…
A: Input-Output Format: The first line contains a single integer, R, which denotes the number of…
Q: 3.Write 4 examples for Web applications.
A: 1. Gmail is a web application Explanation:- It is the web application through which we send emails…
Q: 1. A common starting point for a for loop usually involves declaring and initializing a variable…
A: The question has been answered in step2
Q: The file P02_18.xlsx contains daily values of the S&P Index from 1970 to mid-2015. It also contains…
A: Since there are multiple sub-parts, first three sub-parts are solved as per the Expert guidelines.…
Q: Can a screenshot of the code in coral language be added to answer?
A: So, the exact same code I run on an online coral simulator and it worked so nicely. Here is the…
Q: size, approximately how big is o(n) compared to n?
A: The answer is
Q: What kind of arithmetic is used to add data items in checksum calculation?
A: The kind of arithmetic is used to add data items for the checksum calculation are:
Q: Use Heun’s method in either Matlab or Excel, with a step size h = 0.1 to solve the following initial…
A: The answer is written in step 2
Q: track is 1000, and rotation speed of disk is 1500 rps but the average time required to move the
A: The answer is
Q: Transcribe in digital format the following text
A: Digital Format Now, P1 - 1 + P2 - 1 = P1 + P2 - 2 = P - 2⇒P1 - 12 + P2 - 12 + 2 * P1 - 1 * P2 - 1 =…
Q: Sort a singly linked sequential list using bubble sort algorithm.
A: # Represent a node of the singly linked listclass Node: def __init__(self, data):…
Q: An entry in the switching table of a virtual-circuit network is normally created during the setup…
A: A virtual-circuit network is a connection-oriented network, which means that before data is…
Q: what is the 8085 Assembly Language Instruction That do the follwing Call a Function conditionally on…
A: The answer to the question is given below:
Q: Write a c++program that includes a function which requires 4 input parameters. After calculation,…
A: ANSWER:
Quiz-1: Refer to Lecture-3 Module 1
swap (int* V, int k) {
temp = V[k]; /* temp in $t0 */
V[k] = V[k+1];
V[k+1] = temp;
}
Write the swap() function using special registers required for accessing parameters passed to this function. Use “t” registers for any needed temporary registers.
Step by step
Solved in 2 steps
- 4-Write MIPS assembly for the following function. Assume N is passed to your function in register $a0. Your output should be in register $v0 at the end of your function. Note: You must implement this function recursively. The purpose of this assignment is to learn how to manipulate the stack correctly in MIPS.int Myfun (int N){ if (N<4) return 1; return ( 4* Myfun(N-3)+ 2*Myfun(N-2)+ Myfun(N-1)+N );}Please explain each instruction with a comment. Please submit your source code and a screenshot that shows the registers with correct output value for N=4, i.e., Myfun(4) returns 11.4-Write MIPS assembly for the following function. Assume N is passed to your function in register $a0. Your output should be in register $v0 at the end of your function. Note: You must implement this function recursively. The purpose of this assignment is to learn how to manipulate the stack correctly in MIPS.int Myfun (int N){ if (N<4) return 1; return ( 4* Myfun(N-3)+ 2*Myfun(N-2)+ Myfun(N-1)+N );}Please explain each instruction with a comment. Please submit your source code and a screenshot that shows the registers with correct output value for N=4, i.e., Myfun(4) returns 11 I need to print 11 inside MARS IDE. The MIPS code that the other expert sent is printing 56 in MARS IDE.instruction is in the first picture please give me only implementation of int L1lookup(u_int32_t address) and int L2lookup(u_int32_t address) cacheSim.h #include<stdlib.h>#include<stdio.h>#define DRAM_SIZE 1048576typedef struct cb_struct {unsigned char data[16]; // One cache block is 16 bytes.u_int32_t tag;u_int32_t timeStamp; /// This is used to determine what to evict. You can update the timestamp using cycles.}cacheBlock;typedef struct access {int readWrite; // 0 for read, 1 for writeu_int32_t address;u_int32_t data; // If this is a read access, value here is 0}cacheAccess;// This is our dummy DRAM. You can initialize this in anyway you want to test.unsigned char * DRAM;cacheBlock L1_cache[2][2]; // Our 2-way, 64 byte cachecacheBlock L2_cache[4][4]; // Our 4-way, 256 byte cache// Trace points to a series of cache accesses.FILE *trace;long cycles;void init_DRAM();// This function print the content of the cache in the following format for an N-way cache with M Sets// Set 0…
- Hi there, any help with the following would be greatly appreciated. Context in the image:Assume a register-based protocol for the function call. Show how this is achieved. You can assume– call-by-value;– variable v is stored in register $s0;– variable f is stored in register $s1.Explain if a stack frame is required, and justify your answer.Microprocessor lab tasks - Solve the problems in assembly language using emu8086 solution format .MODEL SMALL .STACK 100H .DATA ; DEFINE YOUR VARIABLES HERE .CODE MAIN PROC MOV AX, @DATA MOV DS, AX ; YOUR CODE STARTS HERE ; YOUR CODE ENDS HERE MOV AX, 4C00H INT 21H MAIN ENDP END MAIN Collapse :white_tick: 1 Problems : Task 01 a program that takes in 3 digits as input from the user and finds the maximum Sample input: 1st input: 1 2nd input: 2 3rd input: 3 Sample Output: 3 Task 02 Take two digits as input from the user and multiply them. If the result is divisible by 2 and 3 both, print "Divisible". Otherwise, print "Not divisible" Sample input: 1st input: 5 2nd input: 6 Result is 30 Sample Output: Divisible Sample input: 1st input: 5 2nd input: 2 Result is 10 Sample Output: Not divisiblePROGRAM 9: hasDuplicatesWrite an HLA Assembly language program that implements a function which correctly identifies whether two or more parameters have identical values and returns a boolean value in AL. Return 1 in AL when two or more parameters are identical; 0 otherwise. In order to receive full credit, you should be preventing register corruption by preserving and then restoring the value of any register your function touches. This rule applies to every register except for EAX which is being used to pass an answer back to the calling code. This function should have the following signature:procedure hasDuplicates( x: int16; y: int16; z: int16 ); @nodisplay; @noframe; Feed Me x: 5Feed Me y: 13Feed Me z: 10AL = 0 Feed Me x: 35Feed Me y: 5Feed Me z: 5AL = 1 Feed Me x: 5Feed Me y: 5Feed Me z: 5AL = 1
- The array sum function below is called on an array of length four starting at address B. List, in order, the data addresses referenced by this function during execution. add1: add $v0, $0, $0beq1: beq $a1, $0, jr1addi1: addiu $a1, $a1, -1lw1: lw $t0, 0($a0)add2: add $v0, $v0, $t0addi2: addiu $a0, $a0, 4beq2: beq $0, $0, beq1jr1: jr $raWrite MIPS assembly for the following function. Assume N is passed to yourfunction in register $a0. Your output should be in register $v0 at the end of yourfunction. Note: You must implement this function recursively. The purpose of thisassignment is to learn how to manipulate the stack correctly in MIPS. int Myfun (int N){ if (N<3) return 1; return ( 2* Myfun(N-1)+ Myfun(N-2));}Please explain each instruction with a comment. Please submit your source codeand a screenshot that shows the registers with correct output value for N=3, i.e.,Myfun(3) returns 3 and Myfun(4) returns 7.MODEL SMALL .STACK 100H .DATA ; The string to be printed STRING DB 'This is a sample string', '$' .CODE MAIN PROC FAR MOV AX,@DATA MOV DS,AX ; call reverse function CALL REVERSE ; load address of the string LEA DX,STRING ; output the string ; loaded in dx MOV AH, 09H INT 21H ; interrupt to exit MOV AH, 4CH INT 21H MAIN ENDP REVERSE PROC ; load the offset of ; the string MOV SI, OFFSET STRING ; count of characters of the; ;string MOV CX, 0H LOOP1: ; compare if this is; ;the last character MOV AX, [SI] CMP AL, '$' JE LABEL1 ; else push it in the; ;stack PUSH [SI] ; increment the pointer; ;and count INC SI INC CX JMP LOOP1 LABEL1: ; again load the starting; ;address of the string MOV SI, OFFSET STRING LOOP2: ;if count not equal to zero CMP CX,0 JE EXIT ; pop the top of…
- implement cache memory code in c++ pleaseImplement nibble_swap() function. Take in 4 byte integer and returns integer with swapped nibbles in first two bytes. Use a 3 bit register. The template below is for your reference. The code in the Assembly code portion needs to be completed in Assembly x86-64 #include extern "C" int nibble_swap(int var); int main(int avgc, char** avgs) { int v = nibble_swap(0xCAFEBABA); //answer: 0xACEFABAB printf("Swapped Variable is : 0%X \n", v); return 0; } ----------------Assembly Code --------------------------- ;yasm -f elf64 var.asm section .text global start : ;put ur code here ret25: . Find the time delay in the following program if the crystal frequency is 1 MHz. Do not ignore the time delay due to the first and last instruction. DELAY: LDI R16, 30 AGAIN: LDI R17, 35 HERE: NOP NOP DEC R17 BRNE HERE DEC R16 BRNE AGAIN RET 26: Write a program to display 2 on 7 segment. A 7 segment is connected to PortD.