Site Categories
Contributors

how to calculate minimum value computers stores?

how to calculate minimum value and maximum value that computer stores isn 2’s complement?

One Response to “how to calculate minimum value computers stores?”

  • SadButTrue says:

    n = bits

    min = -1 * 2 ^ ( n – 1 )
    max = ( 2 ^ ( n – 1 ) ) – 1

    For example:

    16 bits
    min = -32768
    max = 32767

    _

Leave a Reply