answersLogoWhite

0


Best Answer

Negative integers are typically encoded using two's complement notation. That is, to convert the sign of any given integer, the bits are flipped (as per ones' complement) and 1 is added. Thus to convert the value +1 to -1 using 8-bit notation:

00000001 = 11111110 + 1 = 11111111

And reversing the process (-1 to +1):

11111111 = 00000000 + 1 = 00000001

In hexadecimal notation, the value 0x80 is the largest negative integer (-128) and 0x7F is the largest positive integer (+127). That is, 10000000 and 01111111 respectively.

Note that ones' complement was used in the past and while some systems still use it they are few and far between today. One of the problems with ones' complement is that +0 and -0 (00000000 and 11111111 respectively) would be treated as being two separate values, when the value 0 is neither positive nor negative. In twos complement, flipping the sign of zero becomes:

00000000 = 11111111 + 1 = 00000000

Note that the actual value is 100000000, but the most-significant bit (the overflow) is ignored because there can only be 8-bits in an 8-bit value. The same is true of 16-bit values, 24-bit values, etc. When all bits are filled with 1s, adding 1 wraps the value back to 0 again.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

10y ago

The encoding method used by the majority of processors is known as "two's compliment." To calculate a negative value, you use the form 2N-X, where N is the width of the number field (e.g. 8 bits), and X is the positive form of the number. Thus, 42 in signed byte is 28-42 = 256-42 = 214 (1101 0110). In two's compliment, the largest positive value is 2(N-1)-1, and the lowest negative value is -2(N-1). For 8 bits, this means the range is from -128 to +127. Zero is considered "positive" in two's compliment, which is why the positive maximum is one less than the negative maximum.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the encoding technique called used to store negative numbers in the comouter's memory?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the encoding technique called that is used to store negative numbers in the computers?

What is called a two's complement. A computer cannot store negative values (non-positive logical values don't exist in binary logic), so it transforms the value into its "positive complement", which can be stored and acted upon.


What is the sign of the product of a three negative numbers?

The product. Of three negative numbers is negative I hope you can get 100 in your homework


What type of numbers is the sum of two negative numbers?

They will be negative numbers as for example -5+(-7) = -12


Where and how does EBCDIC encode the sign of a number?

It doesn't. EBCDIC is a code for encoding characters, not numbers. Of course you can store numbers in an alphanumeric variable, in which case you would use the minus sign for a negative number; but usually, numbers are stored in a more compact format. For example, 2's complement is commonly used to store integers.


Is a negative a whole numbers?

No. Whole numbers are counting numbers and zero.


What is the sign of product of three negative numbers?

The product of three negative numbers is negative.


Where do you see negative numbers?

Where do we see negative numbers


What set does a negative fraction belong to?

It belongs to the set of negative rational numbers, negative real numbers, fractionall numbers, rational numbers, real numbers.


Are all negative numbers are rational?

No, not all negative numbers are rational. There are many negative numbers that are irrational, just like the positive numbers.


Can rational numbers not be negative?

Rational numbers can be negative or positive.


What do you know about negative numbers?

What do I know about negative numbers? A lot.


Why do we have negative numbers?

We have negative numbers, because if there were no negative numbers, people wouldn't lose profit, they would always gain.