Fri, 25 Aug 2023, 13:04 Re: Problem Set 1 Question #7



A student writes:


> Hi Dr. Patt,
> 
> For #7 on Problem Set 1, I'm a little confused about the wording of the question and the TA didn't have a 
> definitive answer during our discussion session today so I wanted to ask you for clarification.
> 
> #7: For the following 8-bit binary numbers, write down the decimal number they represent as unsigned, 
> signed magnitude, 1's complement, and 2's complement representations, respectively.
> a) 01010101
> b) 10000000
> c) 11111111
> 
> So for each binary number, am I supposed to write down all the decimal representations from looking at 
> the binary number "as" these 4:
> 1. an unsigned binary
> 2. a signed binary
> 3. 1's complement
> 4. 2's complement
> 
> or, am I supposed to write out the 1's & 2's complement representation of the binary numbers provided? 
> Meaning, converting those binary to complements instead of looking at the binary "as" complements 
> and converting to decimal?
> 
> Thank you!
> 
> Best,
> <<name withheld to protect the student who did not get help from the TA>>


Answer:

The question is asking you to do the following for each of the three representtions shown.  For example, 
part b is 10000000.  What decimal number is represented by 10000000 if the representation is an 
unsigned integer?
What decimal number if 10000000 represents a signed integer?  What decimal number if 10000000 
represents a 1's complement integer?  What decimal number if 10000000 represents a 2's complement 
integer?

Is it now clear?

Good luck with the rest of the problem set.

Yale Patt