Question

Question: Could 53 and -14 both still be represented if we only used 5-bit 2’s complement?...

Question: Could 53 and -14 both still be represented if we only used 5-bit 2’s complement?

For each value, if it can be done then express it in 5-bit 2’s complement. If not, explain why.

Question: Translate the following C code segment into ARMv8 assembly

int x = 5, y = 15, z = 10;

x = ++x + y++;

y = (x++ + y++) * z;

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

1.

Ans: No

Because if we use 5-bit representation then

1 bit will be used for sign representation and 4 bits will be used for magnitude(data) representation.

So by using 4 bits we can represent - 24 to +(24 -1) i.e, -16 to +15

Here we are given 53 and -14

We can represent -14 because it is between -16 to +15

But 53 is not in the range of -16 to +15

So, we unable to represent it.

Add a comment
Know the answer?
Add Answer to:
Question: Could 53 and -14 both still be represented if we only used 5-bit 2’s complement?...
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
  • We are running programs on a machine where values of type int have a 32-bit two’s-complement...

    We are running programs on a machine where values of type int have a 32-bit two’s-complement representation. Values of type float use the 32-bit IEEE format, and values of type double use the 64-bit IEEE format. We generate arbitrary integer values x, y, and z, and convert them to values of type double as follows: /* Create some arbitrary values */ int x = random(); int y = random(); int z = random(); /* Convert to double */ double dx...

  • Design a four-bit combinational circuit 2'scomplementer. (The output generates the 2's complement of the input binary...

    Design a four-bit combinational circuit 2'scomplementer. (The output generates the 2's complement of the input binary number.) Construct a 5-to-32-line decoder with enable by using 3-to-8 and 2-to-4-line decoders with enables For the decimal-to-BCD encoder given in the text (Slide 33 of chapter 5), assume by error that the 6 input and the 3 input are both HIGH. What is the output code? Is it a valid BCD code? Construct a 16 times 1 multiplexer with 4 times 1 multiplexers....

  • 1. If we had two 4-bit signed 2's complement numbers, X--4 and Y-6 and we wanted to compare them, we might calculate X-Y (a) Show that calculation (b) Explain how the result tells us that Y>IX...

    1. If we had two 4-bit signed 2's complement numbers, X--4 and Y-6 and we wanted to compare them, we might calculate X-Y (a) Show that calculation (b) Explain how the result tells us that Y>IX (c) Now show the calculation for Y. X (d) Explain how this also shows us that Y>X 2. We talked about an ALU that takes two 4-bit inputs, A and B, and then generates a 4-bit result, S, based on a 2-bit command, F1FO....

  • C++ QUESTION 13 Still using the same code, what are the values of x AFTER the...

    C++ QUESTION 13 Still using the same code, what are the values of x AFTER the call to function Squirrel? void Chipmunk(int a, int b, int& c); void Squirrel(int& a, int& b); int Feature(int b, int c); int main( ) {      int w = 1;      int x = 2;      int y = 3;      int z = 4;      Chipmunk(w, x, y);      Squirrel(x, y);      Chipmunk(z, y, x);      z = Feature(x, w);      return 0;...

  • Problem A circuit consisting of 5 inputs and 2 outputs as shown below is used to...

    Problem A circuit consisting of 5 inputs and 2 outputs as shown below is used to drive a BCD to 7-Segment Code Converter, as well as a 7-Segment Display. X2 In this circuit X acts as a control signal, when LOW, the circuit compares the 2-bit binary numbers represented by X2X3 and X4Xs. If the first number is greater than the second, the output Y,Y2 equals 1. If the second number is greater than the first, the output equals 2....

  • PROBLEM STATEMENT The mini-calculator will use a small ALU to perform arithmetic operations on two 4-bit values which are set using switches. The ALU operations described below are implemented with a...

    PROBLEM STATEMENT The mini-calculator will use a small ALU to perform arithmetic operations on two 4-bit values which are set using switches. The ALU operations described below are implemented with an Adder/Subtractor component. A pushbutton input allows the current arithmetic result to be saved. An upgraded mini-calculator allows the saved value to be used in place of B as one of the operands. The small ALU that you will design will use the 4-bit adder myadder4 to do several possible...

  • I need to answer #3 could be done in only one way, we see that if...

    I need to answer #3 could be done in only one way, we see that if we take the table for G and rename the identity e, the next element listed a, and the last element b, the resulting table for G must be the same as the one we had for G. As explained in Section 3, this renaming gives an isomorphism of the group G' with the group G. Definition 3.7 defined the notion of isomorphism and of...

  • I need help with Question 2, Question 3, Question 4, and Question 5 please. Question ....

    I need help with Question 2, Question 3, Question 4, and Question 5 please. Question . A die was rolled twice、The first time it landed on a number that we will call "x" The second tme landed on a number that we will call "y" We will symbolize some events as follows: x is odd. xis a prime. y is odd. y is a prime. A: B: C: D: Express the following probabilities using the notation "p(.。.)". For example, the...

  • In the program, the zipcode will be represented by an integer and the corresponding barcode will...

    In the program, the zipcode will be represented by an integer and the corresponding barcode will be represented by a string of digits. The digit 1 will represent the long bar, and the digit 0 will represent the short bar, The first and last digits of a POSTNET code are always 1. Stripping these leaves 25 digits, which can be split into groups of 5. The above example translates into the following string and groups of five: 101100100010010101100110001 01100 10001...

  • Question 5 The shortest IEEE standard for rep- expnt fraction resenting rational numbers is calle...

    PLEASE NOTE: PLEASE ANSWER IN MATHEMATICAL FORM!! THIS IS NOT ESSAY QUESTION. THANKS Question 5 The shortest IEEE standard for rep- expnt fraction resenting rational numbers is called half-precision float- sign (S bit) ing point. It uses a 16-bit word partitioned as in the I diagram at right. (This diagram is taken from the Wiki can be found.) (10 bit) article on the subject, where more details 15 10 As described in lectures, to store a rational number r it...

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