What are the encoding rules for original, inverse, and complement codes?

Updated on international 2024-05-24
9 answers
  1. Anonymous users2024-02-11

    Regarding the original code and the reverse complement, you can borrow this book.

    Principles of Computer Composition looks at the representation of data in a computer.

    First of all, correct the statement downstairs, the positive number of the original code and the complement of the code are the same, that is, the reverse code of 0011 is also 0011

    Remember. For example, for a positive number 3, its binary form is .

    0011, we put.

    0011 becomes the true value, and in the computer 0 or 1 is used to represent the plus or minus signs, then.

    The original code of 0011 in the computer can be represented as 00011 (the first bit is the sign bit). The inverse complement remains unchanged.

    For negative numbers, the inverse code is inverted by bits, for example, 10011 can mean -3, 10011 is the original code, then the sign bit remains unchanged, and the rest of the bits are inverted by bits, that is, the inverse code 11100

    Complements exist to simplify calculations, and their sign bits participate in the operation together, so that for subtraction they can be converted into addition. The essence of complement is mod2. For example, if our clock is mod12, then at 14 o'clock we can also say 2 o'clock in the afternoon.

    The way to get the complement is to "negate by bit, add 1 to the last digit", then the complement of 10011 is 11101...

    The number of machines is the representation of a numerical value in a computer.

    I don't know if you understand?

  2. Anonymous users2024-02-10

    Computers store data in binary fashion.

    There are several ways to represent integer data in a computer:

    1.Complement binary.

    2.Binary inverse.

    3.Offset notation.

    4.Symbolic notation of numbers.

    The most significant bit of the signed number notation is the sign bit, with 1 being negative and 0 being positive. For example, if 00000001 is 1, 10000001 is -1

    The inverse binary code is simply to invert the positive number to the corresponding negative number, for example, 00000001 is 1, 11111110 is -1

    Complement binary is more commonly used in computers, and when representing a negative number, 1 is added to the original code

    The offset notation takes a number and subtracts it to get the desired number. top

  3. Anonymous users2024-02-09

    Positive number: the original code, the complement code, and the reverse code are consistent.

    Negative number: original code: - (absolute value original code).

    Inverse code: The original code is reversed except for the symbol bit.

    Complement: +1 for inverse

  4. Anonymous users2024-02-08

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

    The original code is reversed, and it does not exist.

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

    For an octa-bit computer, the value 0 is stored in octa-bit binary.

    That is, the complement of 0 is 0000 0000.

    With a value of 1, you subtract 1 from the complement of 0.

    That is, the complement of 1 is 1111 1111, and the decimal is 255.

    2, you subtract one.

    This gives 1111 1110 = 254.

    This is the encoding rule for complements.

  5. Anonymous users2024-02-07

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

    Positive and negative data, in the computer, is stored only in the form of complements.

    BelowEight-bit binaryto illustrateComplementencoding rules.

    Eight-bit binary with a total of 256 complements.

    The number 0 is stored as 0000 0000.

    The number 1 is added to the number 1 to get 0000 0001.

    Others, continue to add, and that's it.

    The number 127 is 0111 1111.

    That's the complement of 0 127.

    Negative, decreasing is fine.

    The number 1 is subtracted from 0 by one, i.e

    0000 0000 1 = Borrow 1) 1111 1111.

    With only eight digits, that's 1111 1111 (decimal 255).

    The number 2 is subtracted by one to get 1111 1110 (=254).

    The number 3 is subtracted by one to get: 1111 1101 (=253).

    Others, continue to subtract, you can.

    With the number 128, you get: 1000 0000 (=128).

    That's the complement of 1 128.

    Calculation formula:

    The complement of a negative number is 256 this negative number

    The complement of a positive number is the positive number itself

    If you need binary, you can transform it yourself. )

    The eight-digit complement can be represented: 128 +127.

    By replacing negative numbers with complements, you can convert subtraction into addition.

    Therefore, as long as the computer has an adder, it is sufficient.

    For example: 7 3 = 4.

    The process of calculating with complement is as follows:

    7

    Complement 1 of 3

    Add

    Gotta := 4 complements.

    Discarding the carry and leaving only eight digits as a result, is 4.

    This solves the problem of negative numbers and subtraction by addition.

    The original code and the reverse code do not have these functions.

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

    The so-called "take the reverse plus one", who counts it?

    Computers, don't do these things.

  6. Anonymous users2024-02-06

    Positive number: the original code, the complement code, and the reverse code are consistent.

    Negative number: original code: - (absolute value original code).

    Inverse code: The original code is reversed except for the symbol bit.

    Complement: +1 for inverse

  7. Anonymous users2024-02-05

    All three are binary representations of numbers in a computer.

    Byte-type data occupies 8 bits, so its original, inverse, and complement codes are all 8 bits. Byte-type data has only 8 bits and can only represent 0 255.

    The font data accounts for 16 bits, then its original code, reverse code, and complement code are all 16 bits. The font data occupies 16 bits and can represent 0 65535.

    Negative numbers exist in the form of complements in computers! Regulation of the three:1. The original, inverse, and complementary codes of positive integers are exactly the same, that is, the sign bit is fixed at 0, and the numeric bit is the same.

    Second, the sign bit of the negative integer is fixed at 1, and when the original code changes from the original code to the reverse code and the complement code, the rules are as follows:

    If you want to find the original, complement, and reverse code of a certain number, you need to perform the following steps.

  8. Anonymous users2024-02-04

    In computer systems, numerical values are always represented and stored in complement codes.

    Both the original code and the reverse code are useless.

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

    Therefore, the original code is reversed and added to the symbol bit unchanged, which is a shadowless thing.

    Foreigners are not good at math, so make up these nonsense things, don't pay attention to it.

  9. Anonymous users2024-02-03

    Numbers become various yards, see Fig

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

    There is only a complement, which is a practical encoding.

    The law of its transformation can be found out by itself.

Related questions
12 answers2024-05-24

Original code: 10001101

Reverse code: 11110010 >>>More

11 answers2024-05-24

The binary positive number of the original code is the reverse complement of the codeWhy the same? >>>More

12 answers2024-05-24

in the computer system.

, numeric values, all with complements. >>>More

4 answers2024-05-24

That is, the original code of the positive number is itself, the original code of the negative number is the reverse code plus one, and the reverse code is all the negation except for the sign bit.

11 answers2024-05-24

Morning (one).

5 a.m. The day is starting to dawn. >>>More