1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Brrunno [24]
3 years ago
7

Convert the following MIPS assembly code snippet into machine language (hex). Write the code in a memory arrangement (address -

content, see Q2 for example) sequentially starting from memory address 0x0000_F000. Show your work step-by-step.
add $s0, $s0, $s1
lw $s0, 0x20($t7)
addi $30, $30, -10
ori $s1, $a0, 100
j 0x400C
Computers and Technology
1 answer:
Snezhnost [94]3 years ago
4 0

Answer:

Check the exlanation

Explanation:

1) add $s0,$s0,$s1 \rightarrow R-format

   

opcode                 rs        rt      rd          shamt      function

000000            $s0       $s1    $s0        00000    100000

000000            10000  10001  10000    00000  100000

  = 0X42118020

2) lw $s0,0X20($t7)\rightarrow I-format

opcode                     rs      rt            offset

100000                  $s0     $t7          0X20

100000               10000    01111       0000000000010000

  = 0X820F0010

3) addi $s0,$s0,-10 \rightarrow I-format

opcode             rs           rt            offset

001000            $s0         $s0       -10

001000             10000   10000    1111111111110110

= 0X2210FFF6

4) ori $s1,$a0,100 \rightarrow I-format

opcode             rs        rt            offset

001101             $s0     $a0         100

001101            10000  00100    0000000001100100

= 0X36040064

5) j 0X400C \rightarrow J-format

opcode  rs

000010  0X400C

000010  0000000000100000000001100

= 0X0800400C

You might be interested in
Which method is an easy way to find a short description of a function?
yuradex [85]

Answer:

A...In the Insert Function dialog box, click the function name to get a short description.

Explanation:

would be A

6 0
2 years ago
Read 2 more answers
Information in​ folders, messages,​ memos, proposals,​ emails, graphics, electronic slide​ presentations, and even videos create
valkas [14]

Answer:

The answer is "Unstructured"

Explanation:

In comparison, unstructured information applies to information, which doesn't suit the conventional column and rows concerning databases properly. It is also known as sources, that include mails, audio and video files, web pages and posts in  communication networks.

  • This tracks and communicates on travel and object flow-through sensors and much more.
  • These types of data are used in both companies and organizations.
5 0
3 years ago
Create a macro named mReadInt that reads a 16- or 32-bit signed integer from standard input and returns the value in an argument
timofeeve [1]

Answer:

;Macro mReadInt definition, which take two parameters

;one is the variable to save the number and other is the length

;of the number to read (2 for 16 bit and 4 for 32 bit) .

%macro mReadInt 2

mov eax,%2

cmp eax, "4"

je read2

cmp eax, "2"

je read1

read1:

mReadInt16 %1

cmp eax, "2"

je exitm

read2:

mReadInt32 %1

exitm:

xor eax, eax

%endmacro

;macro to read the 16 bit number, parameter is number variable

%macro mReadInt16 1

mov eax, 3

mov ebx, 2

mov ecx, %1

mov edx, 5

int 80h

%endmacro

;macro to read the 32 bit number, parameter is number variable

%macro mReadInt32 1

mov eax, 3

mov ebx, 2

mov ecx, %1

mov edx, 5

int 80h

%endmacro

;program to test the macro.

;data section, defining the user messages and lenths

section .data

userMsg db 'Please enter the 32 bit number: '

lenUserMsg equ $-userMsg

userMsg1 db 'Please enter the 16 bit number: '

lenUserMsg1 equ $-userMsg1

dispMsg db 'You have entered: '

lenDispMsg equ $-dispMsg

;.bss section to declare variables

section .bss

;num to read 32 bit number and num1 to rad 16-bit number

num resb 5

num1 resb 3

;.text section

section .text

;program start instruction

global _start

_start:

;Displaying the message to enter 32bit number

mov eax, 4

mov ebx, 1

mov ecx, userMsg

mov edx, lenUserMsg

int 80h

;calling the micro to read the number

mReadInt num, 4

;Printing the display message

mov eax, 4

mov ebx, 1

mov ecx, dispMsg

mov edx, lenDispMsg

int 80h

;Printing the 32-bit number

mov eax, 4

mov ebx, 1

mov ecx, num

mov edx, 4

int 80h

;displaying message to enter the 16 bit number

mov eax, 4

mov ebx, 1

mov ecx, userMsg1

mov edx, lenUserMsg1

int 80h

;macro call to read 16 bit number and to assign that number to num1

;mReadInt num1,2

;calling the display mesage function

mov eax, 4

mov ebx, 1

mov ecx, dispMsg

mov edx, lenDispMsg

int 80h

;Displaying the 16-bit number

mov eax, 4

mov ebx, 1

mov ecx, num1

mov edx, 2

int 80h

;exit from the loop

mov eax, 1

mov ebx, 0

int 80h

Explanation:

For an assembly code/language that has the conditions given in the question, the program that tests the macro, passing it operands of various sizes is given below;

;Macro mReadInt definition, which take two parameters

;one is the variable to save the number and other is the length

;of the number to read (2 for 16 bit and 4 for 32 bit) .

%macro mReadInt 2

mov eax,%2

cmp eax, "4"

je read2

cmp eax, "2"

je read1

read1:

mReadInt16 %1

cmp eax, "2"

je exitm

read2:

mReadInt32 %1

exitm:

xor eax, eax

%endmacro

;macro to read the 16 bit number, parameter is number variable

%macro mReadInt16 1

mov eax, 3

mov ebx, 2

mov ecx, %1

mov edx, 5

int 80h

%endmacro

;macro to read the 32 bit number, parameter is number variable

%macro mReadInt32 1

mov eax, 3

mov ebx, 2

mov ecx, %1

mov edx, 5

int 80h

%endmacro

;program to test the macro.

;data section, defining the user messages and lenths

section .data

userMsg db 'Please enter the 32 bit number: '

lenUserMsg equ $-userMsg

userMsg1 db 'Please enter the 16 bit number: '

lenUserMsg1 equ $-userMsg1

dispMsg db 'You have entered: '

lenDispMsg equ $-dispMsg

;.bss section to declare variables

section .bss

;num to read 32 bit number and num1 to rad 16-bit number

num resb 5

num1 resb 3

;.text section

section .text

;program start instruction

global _start

_start:

;Displaying the message to enter 32bit number

mov eax, 4

mov ebx, 1

mov ecx, userMsg

mov edx, lenUserMsg

int 80h

;calling the micro to read the number

mReadInt num, 4

;Printing the display message

mov eax, 4

mov ebx, 1

mov ecx, dispMsg

mov edx, lenDispMsg

int 80h

;Printing the 32-bit number

mov eax, 4

mov ebx, 1

mov ecx, num

mov edx, 4

int 80h

;displaying message to enter the 16 bit number

mov eax, 4

mov ebx, 1

mov ecx, userMsg1

mov edx, lenUserMsg1

int 80h

;macro call to read 16 bit number and to assign that number to num1

;mReadInt num1,2

;calling the display mesage function

mov eax, 4

mov ebx, 1

mov ecx, dispMsg

mov edx, lenDispMsg

int 80h

;Displaying the 16-bit number

mov eax, 4

mov ebx, 1

mov ecx, num1

mov edx, 2

int 80h

;exit from the loop

mov eax, 1

mov ebx, 0

int 80h

7 0
3 years ago
A user logs into Active Directory on a workstation and the user home directory does not redirect to a network share on a file se
inysia [295]

Answer:

gpresult

Explanation:

Group Policy provides the system administrator with settings that would be necessary to manage the different user accounts available in an organization. It also controls their work environment centrally by configuring the user Operating System (OS), applications and user accounts.

Group policy settings or configurations are referred to as Group Policy Objects (GPOs). These objects can be linked to organizational units (OUs), domains or sites.

There are various group policy commands such as;

  1. rstrui (System Restore tool will run),
  2. runas (using different permission to run a tool or program),
  3. tasklist (currently running programs are shown
  4. gpupdate (Group policies are refreshed)
  5. gpresult (group policy configurations are displayed for verification)

gpresult command can be used to verify the group policy configurations for adjustment or optimization. The technician can start troubleshooting from viewing the active settings, then running the rstrui to start the System Restore utility to restore the computer to an earlier date

6 0
2 years ago
2) [13 points] You’ve been hired by Banker Bisons to write a C++ console application that determines the number of months to rep
Paha777 [63]

Answer:

Check the explanation

Explanation:

CODE:

#include <iostream>

#include <iomanip>

using namespace std;

double getLoanAmount() { // functions as per asked in question

double loan;

while(true){ // while loop is used to re prompt

cout << "Enter the car loan amount ($2,500-7,500): ";

cin >> loan;

if (loan>=2500 && loan <= 7500){ // if the condition is fulfilled then

break; // break statement is use to come out of while loop

}

else{ // else error message is printed

cout << "Error: $"<< loan << " is an invalid loan amount." << endl;

}

}

return loan;

}

double getMonthlyPayment(){ // functions as per asked in question

double monthpay;

while(true){ // while loop is used to re prompt

cout << "Enter the monthly payment ($50-750): ";

cin >> monthpay;

if (monthpay>=50 && monthpay <= 750){ // if the condition is fulfilled then

break; // break statement is use to come out of while loop

}

else{ // else error message is printed

cout << "Error: $"<< monthpay << " is an invalid monthly payment." << endl;

}

}

return monthpay;

}

double getInterestRate(){ // functions as per asked in question

double rate;

while(true){ // while loop is used to re prompt

cout << "Enter the annual interest rate (1-6%): ";

cin >> rate;

if (rate>=1 && rate <= 6){ // if the condition is fulfilled then

break; // break statement is use to come out of while loop

}

else{ // else error message is printed

cout << "Error: "<< rate << "% is an invalid annual interest rate." << endl;

}

}

return rate;

}

int main() {

cout << setprecision(2) << fixed; // to print with 2 decimal places

int month = 0; // initializing month

// calling functions and storing the returned value

double balance= getLoanAmount();

double payment= getMonthlyPayment();

double rate= getInterestRate();

rate = rate /12 /100; // as per question

// printing as per required in question

cout << "Month Balance($) Payment($) Interest($) Principal($)"<< endl;

while(balance>0){ // while the balance is more than zero

month = month + 1; // counting Months

// calculations as per questions

double interest = balance * rate;

double principal = payment - interest;

balance = balance - principal;

// printing required info with proper spacing

cout <<" "<< month;

cout <<" "<< balance;

cout <<" "<< payment;

cout <<" "<< interest;

cout <<" "<< principal << endl;

}

cout << "Months to repay loan: " << month << endl; // displaying month

cout << "End of Banker Bisons";

Kindly check the output in the attached image below.

5 0
3 years ago
Other questions:
  • 1. Mobile devices have a _________ viewport that displays a web page content that fits within a mobile screen.
    11·1 answer
  • A technology company only hires applicants who are under the age of 30. This company could face possibly _________ consequences
    9·2 answers
  • What is the name used for the integrated program development environment that comes with a Python installation?
    5·1 answer
  • Which software can managers use to discuss financial performance with the help of slides and charts?
    7·2 answers
  • Which describes which CTSO each student should join?]
    7·1 answer
  • Explain motherboard in detail
    14·2 answers
  • Assume that you have the business data in various sources such as Excel, .csv, text files and Access, Oracle databases. Write th
    9·1 answer
  • Classroom content transaction <br> examples use of IT
    8·1 answer
  • A computer game allows a player to repeat a level until they run out of lives. Which two of the following loops would work corre
    8·2 answers
  • What should you do if a headset plugged into your computer is not working properly.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!