Question: 1. Represent the decimal number 68 in 8-bit binary number using the following representation methods: a) ones complement b) Excess-M 2. What is the auxiliary

1. Represent the decimal number 68 in 8-bit binary number using the following representation methods:

a) ones complement

b) Excess-M

2. What is the auxiliary space complexity of merge sort?

Group of answer choices

a. O(n)

b. O(1)

c. O(n log n)

d. O(n2)

Sol99:

1a) To represent 68 in 8-bit binary using ones complement, we first convert 68 to binary: 01000100. Then, we flip all the bits to get the ones complement: 10111011.

1b) To represent 68 in 8-bit binary using Excess-M representation, we add M to the decimal value of 68 to get a new decimal value. Lets use M=128. So, 68 + 128 = 196, which in binary is 11000100.

  1. The auxiliary space complexity of merge sort is O(n), where n is the number of elements being sorted. This is because merge sort requires an auxiliary array of the same size as the input array to merge the subarrays. Therefore, the auxiliary space complexity grows linearly with the input size.

Top of Form

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 Programming Questions!