+1-415-315-9853

info@mywordsolution.com

## Engineering

 Civil Engineering Chemical Engineering Electrical & Electronics Mechanical Engineering Computer Engineering Engineering Mathematics MATLAB Other Engineering Digital Electronics Biochemical & Biotechnology

Part A:  Bitwise Logical and Shift Operations

Create a SPARC assembly language program that extracts a bit-field from the contents of register %l0. The position of the rightmost bit of the field is indicated in register %l1, and the number of bits in the field is indicated in register %l2. The extracted field should be put into register %l3, right-shifted so that field starts at bit 0; any bits outside of the extracted field should be set to 0. Structure your program so that it operates on 3 separate inputs, each with different input data, field positions, and field widths. Your TA will provide the inputs to work with. Do not hard code any bit masks; your program should create them using the appropriate bitwise operations. Optimize your program, eliminating nop instructions where possible. Do not use m4.

Use printf() to display in hexadecimal the contents of registers %l0, %l1, %l2 before each extraction, and %l3 afterwards. Also run your program in gdb, displaying the contents of registers %l0, %l1, %l2 before each extraction, and %l3 afterwards. Capture the gdb session using script. On a separate piece of paper, show the bit pattern for each hexadecimal number for the registers %l0 and %l3, circling the extracted field.

Part B:  Integer Multiplication using Add and Shift Operations

prepare a SPARC assembly language program that implements the following integer multiplication algorithm:

negative = multiplier >= 0 ? 0 : 1;
product = 0;
for (i = 0; i < 32; i++) {
if (multiplier & 1)
product += multiplicand;
(product and multiplier registers combined as a unit) >> 1;
}
if (negative)
product -= multiplicand;

Structure your program so that it shows 3 different multiplications: the first should multiply two positive numbers together, the second should multiply a positive number by a negative number, and the third should multiply two negative numbers together. Your TA will provide the input data to work with. Since we don’t yet know how to create subroutines, you can simply cut and paste the multiplication code to do each multiplication.

Use printf() to display in hexadecimal the contents of the product, multiplier and multiplicand registers before and after each multiplication. Optimize your program, eliminating nop instructions where possible. Do not use m4. Also run the program in gdb, displaying the contents of key registers as the program executes; you should show that the algorithm is working as expected. Capture the gdb session using script. On a separate piece of paper, show the bit pattern (binary number) for each hexadecimal number, and its decimal equivalent (in other words, show the binary and decimal values of the multiplier, multiplicand, and product).

Other Requirements
:

Make sure your code is properly formatted into columns, is readable and fully documented, and includes identifying information at the top of each file. You must comment each line of assembly code. Your code should also be well designed: make sure it is well organized, clear, and concise. Your TA will specify the inputs to use for the above two programs.

Computer Engineering, Engineering

• Category:- Computer Engineering
• Reference No.:- M91804

Have any Question?

## Related Questions in Computer Engineering

### Blackjack twenty-one is a casino game played with cards the

Blackjack (twenty-one) is a casino game played with cards. The goal of the game is to draw cards that total as close to 21 points as possible without going over. All face cards count as 10 points, aces count as 1 or 11, ...

### Powerpoint presentationin this presentation you will

PowerPoint Presentation In this presentation, you will describe the different data types and give examples of each. Conduct a brief research on the Internet about different data types. This research should supplement you ...

### The wolf sheep simple model explores two animal species

The Wolf Sheep Simple model explores two animal species interacting, but most ecologies have many more animal species. Create a third species in the model. One interesting way to do this would be to create a species that ...

### Format for the 448548 research projectpaperthe image

Format for the 448/548 Research Project/Paper The Image Processing and Computer Vision Research Project/Paper is designed to be an opportunity for you explore a particular branch of this diverse field in more depth than ...

### Assignment questions -question 1 read the scenario in

Assignment Questions - Question 1: Read the scenario in Appendix 1 (Pickerings Properties). (a) List the functions of the system, as perceived by an external user. (b) List the external entities. Note that because we are ...

### 1 do research in the literature on sensorless vector

1. Do research in the literature on sensorless vector control-based systems and write a summary report. 2. Do research in the literature on space vector modulation as applied to vector control-based systems and write a s ...

### 1 what does cissp stand for use the internet to identify

1. What does CISSP stand for? Use the Internet to identify the ethical rules CISSP holders have agreed to follow. 2. For what kind of information security jobs does the NSA recruit? Use the Internet to visit its Web page ...

### Given an example of broadcast usage in the network and data

Given an example of broadcast usage in the network and data link layers. For each case, (1) name the protocol that utilizing the broadcast, (2) the reason why the broadcast rather that unicast is used, and (3) how the fa ...

### In an 80211 network three stations a b and c are contending

In an 802.11 network, three stations (A, B, and C) are contending to access the medium. The contention window for each station has 31 slots. Station A randomly picks up the first slot; station B picks up the fifth slot; ...

### 1 what three elements must be present for a fire to ignite

1. What three elements must be present for a fire to ignite and continue to burn? How do fire suppression systems manipulate the three elements to quell fires? 2. List and describe the three fire detection technologies c ...

• 13,132 Experts

## Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

### Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

### Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

### Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

### Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro

### Describe what you learned about the impact of economic

Describe what you learned about the impact of economic, social, and demographic trends affecting the US labor environmen