. Suppose: x = (1111 1111 1111 1111 1111 1111 1111 1100)2 y = (0011 1011 1001 1010 1000 1010 0000 0000)2 a. Is x bigger than y if using 32-bit unsigned binary system. Prove it. b. Is x bigger than y if using 32-bit signed binary system. Prove it and show your work

Respuesta :

Answer:

a. Using 32bit unsigned binary system, x is bigger than y

b. Using 32 bit signed system, x is not bigger than y.

Explanation:

a.

x = (1111 1111 1111 1111 1111 1111 1111 1100)2

y = (0011 1011 1001 1010 1000 1010 0000 0000)2

In an unsigned system all binary digits are used up as the magnitude bits;

First, we need to convert each number to decimal

x = 4294967292 (decimal)

y = 999983616 (decimal)

4294967292 is greater than 999983616

So, x is greater than y (in 32 bit unsigned binary system)

b.

x = (1111 1111 1111 1111 1111 1111 1111 1100)2

y = (0011 1011 1001 1010 1000 1010 0000 0000)2

In a signed system, the most significant bit is used as the signed bit, the remaining bits are used in representing the magnitude bits;

The most significant bit is always the first bit.

0 represents positive (+)

While

1 represents negative (-)

First we need to separate the most significant bit from the magnitude bits.

So x = 1 (111 1111 1111 1111 1111 1111 1111 1100)2

And y = 0 (011 1011 1001 1010 1000 1010 0000 0000)2

Then, we need to convert each number to decimal

x = -2147483644

y = +999983616

From the above, y is greater than x

Answer:

a. Using 32bit unsigned binary system, x is bigger than y

b. Using 32 bit signed system, x is not bigger than y.

Explanation:

a.

x = (1111 1111 1111 1111 1111 1111 1111 1100)2

y = (0011 1011 1001 1010 1000 1010 0000 0000)2

In an unsigned system all binary digits are used up as the magnitude bits;

First, we need to convert each number to decimal

x = 4294967292 (decimal)

y = 999983616 (decimal)

4294967292 is greater than 999983616

So, x is greater than y (in 32 bit unsigned binary system)

b.

x = (1111 1111 1111 1111 1111 1111 1111 1100)2

y = (0011 1011 1001 1010 1000 1010 0000 0000)2

In a signed system, the most significant bit is used as the signed bit, the remaining bits are used in representing the magnitude bits;

The most significant bit is always the first bit.

0 represents positive (+)

While

1 represents negative (-)

First we need to separate the most significant bit from the magnitude bits.

So x = 1 (111 1111 1111 1111 1111 1111 1111 1100)2

And y = 0 (011 1011 1001 1010 1000 1010 0000 0000)2

Then, we need to convert each number to decimal

x = -2147483644

y = +999983616

From the above, y is greater than x