1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Maximum and minimum values of 7s complement in base 7

  1. Sep 28, 2012 #1
    1. The problem statement, all variables and given/known data

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

    2. Relevant equations

    3. 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
  2. jcsd
  3. Sep 28, 2012 #2


    Staff: 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: May 6, 2017
  4. Sep 28, 2012 #3
    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!
  5. Sep 29, 2012 #4


    User Avatar
    Homework Helper

    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".
  6. Sep 29, 2012 #5
    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?
  7. Sep 29, 2012 #6


    User Avatar
    Homework Helper

    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?
  8. Sep 29, 2012 #7
    Sorry, yes, I messed up on that. So it is base 7 with 7s complement. ie, numbers from 0-6.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook