Why does a computer store data in the form of complements

Updated on technology 2024-07-10
16 answers
  1. Anonymous users2024-02-12

    Complement, in fact, is a positive number that "replaces a negative number".

    With the use of complements, there are no negative numbers inside the computer, and therefore, there are no subtraction operations.

    So, with complements, you can simplify the hardware of your computer.

    And the original code and the reverse code.

    None of them have this kind of functionality.

    Therefore, in the computer, the original code and the reverse code do not exist.

    How can a complement (a positive number) replace a negative number?

    You see, the operation of 2-digit decimal numbers:

    25 + 99 = (one hundred) 24

    Discard the carry and only take the 2 digits, is the result the same?

    99 is called the complement of 1.

    98 is the complement of 2.

    How are complements calculated?

    Formulas, you can derive them yourself:

    Complement (positive) Negative period (10 2).

    A positive number is a positive number in itself and does not need to be transformed.

    So, positive, and no complement.

    The number of digits in the computer is also limited.

    An 8-bit machine, with every operation, is 8-bit binary.

    So, the complement of 1 is:

    1 + 2 8 = 255 = 1111 1111 (binary.)

    For example, 25 1 = 24, calculated with a complement as follows:

    1] Complement =

    Summing: (1).

    Discarding the carry and keeping the eight-digit result, this is 24.

    The ** of the complement has nothing to do with the original code and the reverse code.

    So,Learning the original code and the reverse code to take the negative plus a symbol bit unchanged are useless work.

    Foreigners are not good at math, so they will use these sao operations.

  2. Anonymous users2024-02-11

    Mainly for the convenience of calculation, whether it is the complement of positive or negative numbers, you can directly use the same adder to calculate without any judgment.

  3. Anonymous users2024-02-10

    Want to understand the complement,Complements should be understood first. On the face of the clock, there are 12 digits, which are reversed by 4 hours, and can be replaced by a forward dial of 8 hours.

    The complement of 4 is +8.

    Complement is also a positive number instead of a negative number, and an addition is used to do subtraction operations.

  4. Anonymous users2024-02-09

    Positive and negative numbers, the format in which they are stored in the computer, are complements.

    In the computer, there is no source code and reverse code, so there is no need to care about them.

    Below, we will explain the complement.

    For example, there is a small child, very young.

    He only knows 100 numbers (0 99) and doesn't do subtraction.

    Then, you can tell him: "minus one", just use "add 99" to count.

    Ignoring the 100 of the carry, isn't the result the same?

    Well, that is to say:

    99 is the complement of 1.

    98 is the complement of 2.

    With "complements", you can turn "subtraction" into "addition".

    Taking advantage of this feature, only one "adder" is needed in the computer, and it is enough.

    In a computer, all kinds of information are stored in binary, collectively called: **.

    Eight digits, as a unit of calculation.

    The range is: 0000 0000 1111 1111.

    Written in decimal, it is: 0 255.

    There are 256 in total**. This number is called: modulus.

    Then: 1111 1111(255), is the complement of 1.

    1111 1110(254), which is the complement of 2.

    1000 0000 (128), which is the complement of 128.

    Finding the complement of a negative number is as simple as that.

    Zeros and positive numbers can be directly involved in the operation, and there is no need to find the complement.

    So, here's the definition of a complement.

    The complement of zeros and positive numbers: is the number itself.

    Complement of negative numbers: Just use "modulus" and add the negative number.

    Modulus, is the total number of **.

    The original code and the reverse code are meaningless.

    So, in computers, they don't exist.

  5. Anonymous users2024-02-08

    In a computer, a negative number is expressed as a complement of its positive value.

    That is, negative numbers are represented by a positive number (i.e., a complement).

    With the complement, there are no negative numbers in the computer. In addition, subtraction operations are eliminated.

    Then, the computer, with just one adder, can run rampant.

  6. Anonymous users2024-02-07

    Benefits of using complements:

    Addition can be used instead of subtraction, [a-b] complement.

    a] complement + [-b] complement.

    Simplified computer computing hardware circuits to improve computing efficiency:

    Positive 0 and negative 0 are unified

    The positive 0 and negative 0 of the original code and the reverse code have different representations, and the 0 of the complement code is unique, for example, the word length is 8 bits, and the 0 of the complement code is represented as the unique 00000000

  7. Anonymous users2024-02-06

    In computer systems, numerical values are always represented and stored in complements. The reason is that, with complements, it is possible to unify the sign bits and numerical fields; At the same time, addition and subtraction can also be handled in a unified manner. In addition, the operation process of the complement and the original code is the same, and no additional hardware circuitry is required.

    Features of Complement:

    1. A negative integer (or original code) is added to its complement (or complement), and the sum is modulus.

    2. Find the complement of an integer and then find the complement, which is equal to the integer itself.

    3. The positive zero and negative zero of the complement are expressed in the same way.

  8. Anonymous users2024-02-05

    To put it simply, it is convenient to convert subtraction to addition, which simplifies the circuit design (only an adder is needed in the CPU, not a hair cutter).

    For example, 100 - 50 changes to (+100) +50).

  9. Anonymous users2024-02-04

    Computer (computer), commonly known as computer, is a modern electronic computer used for high-speed calculation, which can perform numerical calculations, logical calculations, and also has the function of storage and memory. It is a modern intelligent electronic device that can operate according to the program and process massive amounts of data automatically and at high speed. A computer that consists of a hardware system and a software system without any software installed is called bare metal.

    It can be divided into five categories: supercomputers, industrial control computers, network computers, personal computers, and embedded computers, and the more advanced computers include biological computers, photonic computers, quantum computers, etc.

    Inventor of the computer John von Neumann. The computer is one of the most advanced scientific and technological inventions of the 20th century, which has had an extremely important impact on human production and social activities, and has developed rapidly with strong vitality. Its application field has expanded from the initial military scientific research application to all fields of society, and has formed a huge computer industry, which has led to technological progress on a global scale, which has triggered profound social changes, and computers have spread all over ordinary schools, enterprises, and institutions, and have entered the homes of ordinary people, becoming an indispensable tool in the information society.

  10. Anonymous users2024-02-03

    Benefits of Computers Storing and Processing Data with Complements:

    1.You can use addition instead of subtraction, [a-b] complement = [a] complement + [-b] complement the simplified computer computing hardware circuit to improve the computing efficiency:

    2.Positive 0 and negative 0 are unified

    The positive 0 and negative 0 of the original code and the reverse code have different representations, and the 0 of the complement code is unique, for example, the word length is 8 bits, and the 0 of the complement code is represented as the unique 00000000

  11. Anonymous users2024-02-02

    in the computer system.

    , numeric values, all with complements.

    to represent and store.

    8-bit binary**, with a total of 2 8 = 256 combinations.

    If properly designed, they can representnumbers.

    But,The original code andReverse code, all defective, a 0, both occupy two code points.

    Therefore, the 8-digit original code can only represent 255 digits: 127 +127.

    (In the computer, the original code and the reverse code are not used, which is also one of the reasons.) )

    And the design scheme of the complement is perfectNumbers and codes are one-to-one.

    Therefore, an 8-digit complement can represent 256 positive and negative numbers.

    The range is: 128 1,0 +127.

    Therefore, in computer systems, numerical values are always represented and stored in complements.

    Both the original code and the reverse code do not exist in the computer.

    So, where are the original code and the reverse code?

    God knows!

  12. Anonymous users2024-02-01

    Data is stored in memory in the form of complements for three reasons:

    1. The uniqueness of 0 is ensured, and the accuracy of the representation of the number is ensured.

    2. Let the addition and subtraction be processed in a unified manner, and optimize the operation process of numbers.

    3. It solves the integrity of its own logical meaning.

    The data is stored in the form of complements in memory in order to simplify the structural design of the computing training machine, and also improve the computing speed. In computer systems, numerical values are always represented and stored in complements.

  13. Anonymous users2024-01-31

    The role of complement in the computer should be understood from the common sense of "complement".

    For clocks, turning back 3 hours can be replaced by a forward 9 hours.

    For two-digit decimal numbers, there are 100 numbers: 0 99.

    Subtract one, and you can replace it with +99.

    For example: 28 1 = 27

    Ignore 100 and the result is the same.

    Then, 9 is the complement of 3 and 99 is the complement of 1.

    Complement is to replace negative numbers with positive numbers with larger values.

    With complements, you can use addition instead of subtraction.

    Complement is a complement in binary form.

    There are 8 complements in the computer, with a total of 256 combinations.

    So, the complement of a negative number is: 256 + this negative number.

    So, the complement of the number 1 is: 1111 1111 = 255 (decimal).

    In the same way, the complement of the number 2 is: 1111 1110 = 254.

    In the end, the complement of the number 128 is: 1000 0000 = 128.

    To find the complement, you don't need to reverse the original code.

    In the computer, there is no original code and reverse code at all.

    The original code is reversed, and it is a useless thing.

    By replacing negative numbers with complements, you can use addition instead of subtraction.

    In a computer, as long as you have an adder, it is enough.

    This simplifies the hardware of the computer system.

  14. Anonymous users2024-01-30

    Through the original code, it is very convenient to convert the values in the real world into binary 01 sequences and save them in the computer, but the original code is difficult to efficiently support the addition and subtraction of the 01 sequence values in the computer. Therefore, in order to calculate the needs, it is necessary to save the numerical values in the form of complements in the computer, and the complements have three important meanings:

    Complement can easily convert subtraction operations into addition operations, and in terms of hardware implementation, only one adder is needed to complete addition and subtraction operations, and there is no need to design and produce subtractors.

    In the addition and subtraction of complement codes, the sign bits can be regarded as numerical values without difference, and directly participate in the operation, and the highest level of the final result is still understood according to the sign bits, and the calculation result is correct.

    The complement eliminates the interference of plus or minus zeros, so that the indication range is extended by one place in the negative direction, such as -127 to +127 in the original code, and -128 to +127

  15. Anonymous users2024-01-29

    There are three ways to represent the number of symbols in a computer, namely the original, inverse, and complement. The three representations have two parts, the sign bit is 0 for "positive", 1 for "negative", and the numerical bit is different for the three representations.

    A 64-bit computer can represent a maximum number of 18446744073709551616, if you add 1 to become a 18446744073709551617, but because there are only 64 bits, the highest bit 1 is naturally lost, and it returns to zero, so the modulo of the 64-bit binary system is 2 64. In such a system, the subtraction problem can also be reduced to an addition problem, and the subtraction can be represented by the corresponding complement. The use of complements in the processing of computer logarithms is called complements.

    The complement of a positive integer is its binary representation, which is the same as the original code.

    Find the complement of a negative integer, and add 1 after the negation of all bits corresponding to the positive binary representation (including the sign bits, 0 to 1, 1 to 0). The same number is different in different complement representations. For example, the complement of -15 is 11110001 in 8-bit binary, but in the 16-bit complement representation, it is 1111111111110001.

    The following are all represented in 8-bit binary.

    I hope I can help you with your doubts.

  16. Anonymous users2024-01-28

    Complement, in effect, is a positive number that "replaces a negative number".

    When the complement is used, there are no negative numbers in the computer.

    At the same time, there is no subtraction.

    Computers, as long as they are equipped with an adder, can run rampant in the world.

    That's where complements come in.

    How can a complement (a positive number) replace a negative number?

    Think about the cyclical pattern.

    For example, a 2-digit decimal number (0 99).The counting period is 10 2=100.

    There can be: 25 1 24

    25 + 99 = (one hundred) 24

    You discard the 100 digit and keep only the 2 digits+99 instead of 1!

    Moreover, addition can also replace subtraction!

    Similarly, +98 can be used in place of 2.

    These positive numbers are called "complements of negative numbers".

    The formula for finding complements is obviously this:

    Complement negative 10 n

    where n is the number of digits of the complement.

    10 n, is the period of the n-bit decimal number.

    This formula, in trigonometric functions, also has the same performance.

    Trigonometric function, which is based on a period of 2.

    WhateverNegative angle,Plus the cycle, you can convert toPositive angle

    For example: x = 2, and its equivalent positive angle is:

    x =-2 + 2π =3π/2

    Computers use binary, complements, and are calledComplement

    To find the complement of a negative number, the formula is:

    Complement Negative 2 n

    2 n is the counting period of the n-digit binary number.

    For8-digit decimal number, the cycle is

    So,The complement of 1 is 255 = 1111 1111 (binary).

    The complement of 2 is 254 = 1111 1110 (binary).

    The complement of 128 is 128 = 1000 0000 (binary).

    Positive, no conversion, no conversion, no conversion, you must go directly to participate in the calculation

    So, positive, and no complement.

    Find the complement, you don't need it".Symbol bitsThe original code is reversed, and the sign bit remains unchanged".

    There is no mathematical basis for these steps.

    Math is not goodofForeigners, there is no correct way of thinking, so I use those sassy operations.

Related questions
9 answers2024-07-10

The world's first electronic computer.

Actually, it's ABC (Atanasoff-Berry Computer). >>>More

2 answers2024-07-10

What is the important role of adopting the idea of "stored programs" and data for the development of computers? >>>More

10 answers2024-07-10

Read in a minute. Principles of Computer Composition.

8 answers2024-07-10

The basic unit of data stored in a hard disk is a sector, which we can understand as a page of a book. When we install or buy a portable hard drive, the first step is to facilitate the management of partitions. No matter what kind of partition tool is used, the first sector of the hard disk will be marked with the number of partitions of the hard disk, the size of each partition, the starting position and other information, the term is called Master Boot Record (MBR), and some people call it the partition information table. >>>More

14 answers2024-07-10

At present, the most widely used character set and its encoding in computers is the American Standard Code for Information Interchange (ASCII code) developed by the American National Bureau of Standards (ANSI), which has been set as an international standard by the International Organization for Standardization (ISO), called ISO 646 standard. Suitable for all Latin alphabets, ASCII codes are available in both 7-digit and 8-digit formats. >>>More