Question:

What system does a computer use to distinguish between positive and negative numbers when stored in memory?

by  |  earlier

0 LIKES UnLike

What system does a computer use to distinguish between positive and negative numbers when stored in memory?

 Tags:

   Report

4 ANSWERS


  1. they are all just a set of 1s and 0s. the computer can translate those numbers into whatever the program its using tells it to.


  2. Must electronic devices that deal with negative numbers have a bit place that indicates when the number is positive or negative.  

    So in the case where a computer uses a 32 bit word, only 31 bits can be used to indicate the value of the number and the other bit is a sign bit.

    So 0 in the sign bit location might indicate a  negative number and 1 in this location might mean the number is positive.

    This is the simplist method, but computers also use the Ones' complement method, Two's complement , Excess-N and Base −2 methods.  These are all just variations on what I have discribed.

    You can read about them here; http://en.wikipedia.org/wiki/One's_compl...

  3. twos  complement eg the msb of a word is used a the signed bit to distinguish +- numbers

    FFFFh = -1

    0000h = 0

    7FFFh =32767 max  +ve value in a 16 bit word

    8000h =-32768 max -ve value in a 16 bit word

  4. There are various ways of storing numbers, especially between real numbers and integers.  Number types that can be positive or negative use one bit of memory to store the sign, + or -.

Question Stats

Latest activity: earlier.
This question has 4 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.