• Support PF! Buy your school textbooks, materials and every day products Here!

Maximum and minimum values of 7s complement in base 7

  • Thread starter nautolian
  • Start date
  • #1
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
11,700
5,272
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
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,682
520
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
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,682
520
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
34
0
Sorry, yes, I messed up on that. So it is base 7 with 7s complement. ie, numbers from 0-6.
 

Related Threads on Maximum and minimum values of 7s complement in base 7

Replies
3
Views
1K
Replies
15
Views
2K
  • Last Post
Replies
3
Views
2K
Replies
0
Views
985
Replies
2
Views
543
Replies
2
Views
2K
Replies
5
Views
454
  • Last Post
Replies
3
Views
1K
Replies
2
Views
640
Top