Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Write a MIPS assembly language program that asks the user for 10 integers one at a time and stores them in memory. (a). Each

1. Write a MIPS assembly language program that asks the user for 10 integers one at a time and stores them in memory.

(a). Each integer must be in the range 0 to 15 inclusive.

2. Converts each integer into the Hammering code according to the following rules.

(a). Convert the integer to a binary integer of length 4.

i. 3 -> 0011

ii. 8 -> 1000

iii. 12 -> 1100

(b). Assign values to d1 to d4.

i. 0110 -> d1 = 0, d2 = 1, d3 = 1, d4 = 0

ii. 1000 -> d1 = 1, d2 = 0, d3 = 0, d4 = 0

iii. 1100 -> d1 = 0, d2 = 1, d3 = 0, d4 = 0

(c). Compute p1 to p3.

i. (p1 + d1 + d2 + d4) % 2 = 0

ii. (p2 + d1 + d3 + d4) % 2 = 0

iii. (p3 + d2 + d3 + d4) % 2 = 0

(d). Build a binary number.

i. p1p2d1p3d2d3d4

(e). Convert this binary number back into a integer.

3. Prints the 10 Hammering code integers separated by a space.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago