Question

HI guys is there a way to display an "n" number of bits in MARS for...

HI guys is there a way to display an "n" number of bits in MARS for a 32 bit number. In other words can u disable the left apdding in MARS?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

yes....we can make left padding bits to zero.....

Sample code

li $v0, 35 # service 1 is print integer

add $a0, $t0, $zero # load desired value into argument register

# $a0, using pseudo-op

syscall

*************************************************** Explaination ***********************************************************

$a0 = integer to print

Displayed value is 32 bits, left-padding with zeroes if necessary.

Add a comment
Know the answer?
Add Answer to:
HI guys is there a way to display an "n" number of bits in MARS for...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • If someone can help with 3 3) To multiply 2 n bit binary numbers the straightforward way takes (r) time because each digit of each number multiplies each digit of the other number. (The aditions f...

    If someone can help with 3 3) To multiply 2 n bit binary numbers the straightforward way takes (r) time because each digit of each number multiplies each digit of the other number. (The aditions from carying are lower order terms.) Consider the following divide- and-conquer algorithm, which assumes, for simplicity, that n is a power of 2: Split each number into 2 collections of bits, the high order bits and the low order bits. For convenience, call the two...

  • Networks Hi guys. I need some assistance with a few questions below. 1. Which of the...

    Networks Hi guys. I need some assistance with a few questions below. 1. Which of the following is TRUE regarding a TCP 3-way handshake. a.   Consists of 3 segments being sent between 2 hosts       b.   Segments only carry data in the SYN, ACK and sequence number bits and bytes with no data       c.   No ACK is needed for the SYNACK received from the receiver       d.   A, B and C       e.   None of the above 2. Which...

  • Given n bits, how many unsigned integers can be represented with the n bits? What is...

    Given n bits, how many unsigned integers can be represented with the n bits? What is the range of these integers? (6 points) There are 26 characters in the alphabet we use for writing English. What is the least number of bits needed to give each character a unique bit pattern? How many bits would we need to distinguish between upper- and lowercase versions of all 26 characters? (12 points)

  • Hi guys, this one needs to be done in MATLAB.thnx in advance. The capital letter N...

    Hi guys, this one needs to be done in MATLAB.thnx in advance. The capital letter N is determined by 8 points(given matrix in last picture, the first line of that matrix are these 8 points).The coordinates of these points can be stored in matrix A. Try to find a 3 * 3 matrix,It corresponds to multiplied by multiplied by 0.5, and then rotates 90 degrees, in the end each point of coordinate are added (-0.5,2) for translation .The program is...

  • A 64-bit word computer employs a 128KB cache. The address bus in this system is 32-bits....

    A 64-bit word computer employs a 128KB cache. The address bus in this system is 32-bits. Determine the number of bits in each field of the memory address register (MAR) as seen by cache in the following organizations (show your calculations):  a. Fully associative mapping with line size of 1 word. b. Fully associative mapping with line size of 4 words c. Direct mapping with the line size of 1 word. d. Direct mapping with the line size of 8...

  • Hi Guys, Just wondering if someone could help me with the below, specifically detailed so that...

    Hi Guys, Just wondering if someone could help me with the below, specifically detailed so that I can understand in the future. Thanks in advance! he Factor Finder takes a 4 bit binary number entered by the user (representing the values 0 to 15) and tells the user if the number is zero, odd, even or a multiple of 3, 4, or 5 The input and output details are as follows: Digital Inputs: I1: Bit O of the four digit...

  • Exercise 1 (9 pts) We have seen that ARM has 16*32 bits registers (plus floating point...

    Exercise 1 (9 pts) We have seen that ARM has 16*32 bits registers (plus floating point registers) There is also a status register: CPSR. It contains, among other things, the following important status bits N Negative, set when the result of an arithmetic operation is negative (according to the two's complement encoding of the natural numbers . Z- Zero, set when the result of an operation is zero . C Carry, set when an operation results in a carry bit...

  • ADC, DAC Equations ADC: Vin input voltage, Vreft= reference voltage, Vref- N=number of bits of precision...

    ADC, DAC Equations ADC: Vin input voltage, Vreft= reference voltage, Vref- N=number of bits of precision 0 V Vin/Vref output code/ 2N 2N output code Vref Vin Vref/2N 1 LSB DAC: Vout output voltage, Vref= reference voltage, N number of bits of precision 2Ninput code Vref Vout Vout/ Vref input_code/ 2N nn nun enhuu nnde Vref/2N 1 LSB Question 3 If Vref 5V, and a 8-bit A/D output code is OXFF, what is the ADC input voltage? If Vref 4V,...

  • (Packing Characters into an Integer) The left-shift operator can be used to pack four character values into a four-byt...

    (Packing Characters into an Integer) The left-shift operator can be used to pack four character values into a four-byte unsigned int variable. Write a program that inputs four characters from the keyboard and passes them to function packCharacters. To pack four characters into an unsigned int variable, assign the first character to the unsigned intvariable, shift the unsigned int variable left by 8 bit positions and combine the unsigned variable with the second character using the bitwise inclusive OR operator....

  • Let n = 6 be the number of bits used to represent an integer. (a) (4pts)...

    Let n = 6 be the number of bits used to represent an integer. (a) (4pts) What is the range of integers that can be represented in • UBI? • 1CF? • 2CF? • SMF? (b) (8pts) Make a table that lists all negative numbers in 1CF, 2CF and SMF

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT