Maximum and minimum values of 7s complement in base 7

  • Thread starter nautolian
  • Start date
  • #1
nautolian
34
0

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?

Homework Equations





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

  • #2
13,922
7,870
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:
  • #3
nautolian
34
0
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!
 
  • #4
rcgldr
Homework Helper
8,791
579
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".
 
  • #5
nautolian
34
0
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?
 
  • #6
rcgldr
Homework Helper
8,791
579
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?
 
  • #7
nautolian
34
0
Sorry, yes, I messed up on that. So it is base 7 with 7s complement. ie, numbers from 0-6.
 

Suggested for: Maximum and minimum values of 7s complement in base 7

  • Last Post
Replies
4
Views
177
  • Last Post
Replies
6
Views
163
  • Last Post
Replies
1
Views
444
  • Last Post
Replies
4
Views
2K
  • Last Post
Replies
2
Views
303
Replies
15
Views
4K
  • Last Post
Replies
6
Views
208
  • Last Post
Replies
3
Views
475
Replies
2
Views
898
Top