Question

In: Computer Science

1a. What is the largest negative number that you could represent with 7 bits using signed...

1a. What is the largest negative number that you could represent with 7 bits using signed magnitude? Show your work.

1b. What is the largest positive number that you could represent with 7 bits using 2’s complement? Show your work.

1c. Add the following two binary numbers 10110111 + 1011 = :Show your work.

1d. Solve the following decimal notation equation using 8-bit binary numbers and 2’s complement notation: 69 - 7 = :Show your work

Solutions

Expert Solution

Solution:-

1a The range of integers in sign magnitude form is:- - (2 ^(n-1) -1) to + (2^(n-1) -1)

Therefore the largest negative number that can be represented in sign magnitude with 7 bits is :-

Take n = 7, therefore - (2^(7-1)-1) = - ( 64-1) = -63.

1b. The range of integers in sign magnitude form is:- - (2 ^(n-1) ) to + (2^(n-1) -1)

Therefore take n = 7.

So largest positive integer that can be represented in 2's complement using 7 bits is = + (2^(7-1) -1 ) = 63.

1c. To add the 2 binary bits, we must know the following:-

a. 1 + 0 = 1 with carry 0

b. 0 + 0 = 0 with carry 0

c. 0 + 1 = 1 with carry 0

d. 1 + 1 =0 with carry forward as 1.

e. 1 + 1 + 1 = 1 with carry as 1

f. 1 + 1 + 0 = 0 with carry as 1.

Our binary numbers are:- A= 10110111 and  B= 1011.

Here number B is of lesser length than A. Therefore we append 0's in front of B to make it of equal length as of A. Appending 0's will not cause any effect on the number.

updated numbers are :- A= 10110111 and B = 00001011

Now when we add the 2 binary numbers, we start addition of each bit pair from right to left by traversing.

For example- Take last bits of each of A and B which are 1 and 1. Therefore 1 + 1 = 0 with carry=1.

So this carry will be forward towards one distance left side.

ADDITION:-

A = 1 0 1 1 0 1 1 1

B = 0 0 0 0 1 0 1 1

_________________

C = 1 1 0 0 0 0 1 0 - Result/Sum

1d. We are given a substraction of 69 - 7 and we have to show it in binary substraction and use 2's complement notation in it.

Lets convert 69 into the binary format of 8 bits.

Idea - divide 69 by 2 and you will get a remainder, save it. Then divide the quotient we got while dividng 69 by 2, by 2 and save the remainder and repeat this until we are not able to divide.

Therefore binary representation of 69 = 0 1 0 0 0 1 0 1 (8bits)

Binary representation of 7 = 0 0 0 0 0 1 1 1 (8 bits).

Now we have to subtract 7 from 69 in binary.

Therefore we know that :- X - Y = X + (-Y)

Therefore we have to find the 2's complement of 7 which is = 1's complement of binary 7 + 1

Now 1's complement of binary 7 is = invert each of the bits of binary 7, therefore 1's complement of binary 7 is= 1 1 1 1 1 0 0 0

Lets now add binary representation of 69 and 2's complement of binary 7.

Therefore , using the previous addition concept we discussed above,

69 - 7 = 0 1 0 0 0 1 0 1 + 1 1 1 1 1 0 0 0

0 1 0 0 0 1 0 1

1 1 1 1 1 0 0 0

_____________

0 0 1 1 1 1 0 1 (leftmost carry will be discarded). -Result.

_______________________________________________________________________________________

Please rate the solution if it is helpful to you.

All the best.


Related Solutions

1a. What is the largest positive and negative number that you could represent with 7 bits...
1a. What is the largest positive and negative number that you could represent with 7 bits using signed magnitude? Show your work. 1c. Solve the following decimal notation equation using 8-bit binary numbers and 2’s complement notation: 69 - 7 = Show your work
if hexadecimal number FA16 represent a signed number in signed magnitude, what the decimal representation of...
if hexadecimal number FA16 represent a signed number in signed magnitude, what the decimal representation of that number? include the sign for that number with no spaces between the number and sign. for example -3 or +3
if hexadecimal number FF16 represent a signed number in one's compliments, what the decimal representation of...
if hexadecimal number FF16 represent a signed number in one's compliments, what the decimal representation of that number? include the sign for that number with no spaces between the number and sign. for example -3 or +3
Complete the matrix below (use 4 bits) Signed Integer Signed Magnitude 1’s Complement 2’s Complement Excess-7...
Complete the matrix below (use 4 bits) Signed Integer Signed Magnitude 1’s Complement 2’s Complement Excess-7 5 -3
Complete the matrix below (use 4 bits) Signed Integer Signed Magnitude 1’s Complement 2’s Complement Excess-7...
Complete the matrix below (use 4 bits) Signed Integer Signed Magnitude 1’s Complement 2’s Complement Excess-7 5 -3
Given the data-bits m = 11010110, determine the number of k (parity-bits) by using Hamming Code...
Given the data-bits m = 11010110, determine the number of k (parity-bits) by using Hamming Code requirements. Illustrate the error detection and correction scheme using Hamming code method, for both the sender and receiver to detect an error at the following positions: a.6thbit position. b.11thbit position.Assume an odd-parity scheme for this problem.
Given the data-bits m = 11010110, determine the number of k (parity-bits) by using Hamming Code...
Given the data-bits m = 11010110, determine the number of k (parity-bits) by using Hamming Code requirements. Illustrate the error detection and correction scheme using Hamming code method, for both the sender and receiver to detect an error at the following positions: a. 6th bit position. b. 11th bit position. Assume an odd-parity scheme for this problem.
What is a largest surplus cash amount? How could you find it out? What is the...
What is a largest surplus cash amount? How could you find it out? What is the largest shortage cash amount? How could you figure out it?
What is the minimum number of bits for representing the opcode if there are 62 different...
What is the minimum number of bits for representing the opcode if there are 62 different instructions? Please explain it, thanks.
Suppose you have a list containing k integer numbers. Each number could be positive, negative, or...
Suppose you have a list containing k integer numbers. Each number could be positive, negative, or zero. Write pseudocode for a program that first asks the user for each of the numbers. After that, it should determine and display the number from the list that is nearest to the positive number five (5). Notes: 1. Try working this out for k = 4 and k = 5. See if you can find an algorithmic pattern that can be extended for...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT