# Maximum and minimum values of 7s complement in base 7

nautolian

## Homework Statement

What are the maximum and minimum values that can be represented using a 7s complement representation in base 7, using a 5 digit number?

## The Attempt at a Solution

Would you divide the numbers so that any number starting with an odd digit is negative and any number starting with an even digit is positive? I actually have no idea how to do this. Would you start with 77777 as the lowest number? and then the highest would be 67777? Thanks in advance for the help

## Answers and Replies

Mentor
use binary as an example and then abstract to base 7

in java for example the min value 2^-31 and the max value is 2^31 -1

http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html [Broken]

Last edited by a moderator:
nautolian
In terms of seven's complement though, how would that work.

So for a 5 digit binary number, the highest value would be 01111 (15), and the lowest would be 10001(-15), right? So for seven's complement would you still say odd numbers are negative and evens are positive? So would you add 6 instead of one at the end for 7's complement vs. two's complement? Thanks!

Homework Helper
So for a 5 digit binary number, the highest value would be 01111 (15), and the lowest would be 10001(-15)
For a 5 digit 1's complent number, the lowest value is 10000 (-15), and the highest is 01111 (+15). Note that 11111 is "negative zero" and 00000 is "postive zero".

nautolian
Don't you have to add 1 at the end for the negative and isn't that two's complement? So how would it work for 7's complement in base 7?

Homework Helper
So how would it work for 7's complement in base 7?
I'm a bit confused by the original post. If each digit ranges from 0 to 7, isn't that a base 8 number? If so, then is the problem statement asking about 7's complement for a base 8 number, which would be similar to 1's complement for a base 2 number? If not, shouldn't each digit for a base 7 number range from 0 to 6, in which case 7's complement for a base 7 number would be similar to 2's complement for a base 2 number?

nautolian
Sorry, yes, I messed up on that. So it is base 7 with 7s complement. ie, numbers from 0-6.