Question: 101 b = 26 10 , what is b? How the following numbers will be represented in 4-bit (a) sign-magnitude (b) twos complement and (c)

  1. 101b= 2610, what is b?

  1. How the following numbers will be represented in 4-bit (a) sign-magnitude (b) twos complement and (c) unsigned representations. Indicate if not possible.

2, 5, 7, 8

  1. How the following negative numbers will be represented in 4-bit (a) sign-magnitude and b) twos complement representations. Indicate if not possible. -2, -5, -7, -8

  1. Consider the following java program snippet (hint: byte is represented as 8-bit 2s complement number in java- run the program in java to check it). What will be printed? Explain.

byte x = 127, y = -128;

System.out.println(++x);

System.out.println(--y);

  1. Perform the indicated operations on 4-bit 2s compliment numbers. Which of the following will overflow?

1111 + 1100 b) 1000 + 1111 c) 0001 + 0011 d) 0111 + 00

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!