Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Signed number representations
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Encoding of negative numbers in binary number systems}} {{Refimprove|date=April 2013}} {{distinguish|Signed-digit representation}} In [[computing]], '''signed number representations''' are required to encode [[negative number]]s in binary number systems. In [[mathematics]], negative numbers in any base are represented by prefixing them with a minus sign ("−"). However, in [[RAM]] or CPU [[Processor register|registers]], numbers are represented only as sequences of [[bit]]s, without extra symbols. The four best-known methods of extending the [[binary numeral system]] to represent [[signed number]]s are: [[#Sign–magnitude|sign–magnitude]], [[#Ones' complement|ones' complement]], [[#Two's complement|two's complement]], and [[#Excess-K|offset binary]]. Some of the alternative methods use implicit instead of explicit signs, such as negative binary, using the [[#Base −2|base −2]]. Corresponding methods can be devised for [[positional notation|other bases]], whether positive, negative, fractional, or other elaborations on such themes. There is no definitive criterion by which any of the representations is universally superior. For integers, the representation used in most current computing devices is two's complement, although the [[UNIVAC 1100/2200 series|Unisys ClearPath Dorado series]] mainframes use ones' complement. <!-- Note: "For integers" to exclude the significand and the exponent field of IEEE 754 floating-point numbers. -->
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)