Does the computer use a complement of 2 or a complement of 1?

Asked 2 years ago, Updated 2 years ago, 74 views

Does the computer use a complement of 2 or a complement of 1?
If I could, how would I look into it?
[Additional note]
If it depends on the processing system, why is the complement of 1 used?
I know the advantages of complement 2, but

information-theory

2022-09-30 18:07

3 Answers

Most modern CPUs use the complement system of 2 (or rather all).
Oira has experience using a CPU that is not enough with both hands, but
All of them adopted a complement system of 2.
(H8/H8S/H8SX/RX/8080/Z80/8086/80186/80286/x86/x64/68000/V850/MN101/MN103/RL/78K/78K0R)

In the 21st century, it is safe to assume that there is absolutely no way to use a CPU that is not a complement of 2.
If you ever use a complementary CPU of 1, you should be lucky to have a valuable experience.
You understand the benefits of using the complement system of 2.


2022-09-30 18:07

For example, by setting a negative number for the int variable in C language and displaying its internal representation (bit string),
I think you can judge whether the complement of 2 is used or the complement of 1 is used.
Therefore, if you suspect that the expression has been converted in C language itself,
Check the assembly output to see if such a conversion is taking place or
Check the CPU (other) documentation.


2022-09-30 18:07

In C language

  • 2 complement representation
  • 1 complement representation
  • Signed absolute value representation

It stipulates thatHowever, as it would not exist in real life, C++ language stipulated that the signed integer type is a complement expression of 2 in C++20.In the process, Survey was conducted, and the following were cited:

  • Ones' completion
    • Many early computers, including the CDC6600, the LINC, the PDP-1, and the UNIVAC1107.
    • Successors of the CDC 6600 continued to use others' completion until the late 1980s.
    • Descendants of the UNIVAC 1107, the UNIVAC 1100/2200 series, continue to do so, although ClearPath machines are a common platform that implement either the 1100/2200 architecture (the ClearPath IX series) or the Burroughs large systems architecture (the ClearPath NX series). Everything is common except the actual CPUs, which are implemented as ASICs. In addition to the IX (1100/2200) CPUs and the NX (Burrthrough large systems) CPU, the architecture had Xeon (and brief Itanium) CPUs.Unisys' goal was to provide an orderly transition for their 1100/2200 customers to a more modern architecture.
  • Signed magnitude
    • The IBM 700/7000 series scientific machines use sign/magnitude notation, except for the index registers which are two's completion.
  • Many early computers, including the CDC6600, the LINC, the PDP-1, and the UNIVAC1107.
  • Successors of the CDC 6600 continued to use others' completion until the late 1980s.
  • Descendants of the UNIVAC 1107, the UNIVAC 1100/2200 series, continue to do so, although ClearPath machines are a common platform that implement either the 1100/2200 architecture (the ClearPath IX series) or the Burroughs large systems architecture (the ClearPath NX series). Everything is common except the actual CPUs, which are implemented as ASICs. In addition to the IX (1100/2200) CPUs and the NX (Burrthrough large systems) CPU, the architecture had Xeon (and brief Itanium) CPUs.Unisys' goal was to provide an orderly transition for their 1100/2200 customers to a more modern architecture.
  • The IBM 700/7000 series scientific machines use sign/magnitude notation, except for the index registers which are two's completion.

I have a rough impression, but is it until around the 1980s? It seems that one byte is not necessarily 8 bits these days.


2022-09-30 18:07

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.