Home  >  Article  >  What logical operations can the operator perform?

What logical operations can the operator perform?

青灯夜游
青灯夜游Original
2022-08-26 11:40:328436browse

The operator can perform arithmetic operations and logical operations. The basic function of the arithmetic unit is to complete the processing of various data, such as the four arithmetic operations, logical operations such as AND, OR, and negation, arithmetic and logical shift operations, comparing values, changing symbols, calculating main memory addresses, etc. The arithmetic unit is a functional component in the computer that processes data. Data processing mainly includes arithmetic operations on data and logical operations on logical data; therefore, the core function of the arithmetic unit is to implement arithmetic and logical operations on data.

What logical operations can the operator perform?

The operating environment of this tutorial: Windows 7 system, Dell G3 computer.

The calculator can perform arithmetic operations and logical operations.

Arithmetic unit: arithmetic unit, a component in a computer that performs various arithmetic and logical operations.

The arithmetic unit consists of an arithmetic logic unit (ALU), an accumulator, a status register, a general-purpose register group, etc. The basic functions of the Arithmetic Logic Operation Unit (ALU) are the four arithmetic operations of addition, subtraction, multiplication, and division, logical operations such as AND, OR, NOT, and XOR, as well as operations such as shift and complement. When the computer is running, the operations and types of operations of the arithmetic units are determined by the controller. The data processed by the operator comes from the memory; the processed result data is usually sent back to the memory or temporarily stored in the operator. Together with the Control Unit, it forms the core part of the CPU.

What logical operations can the operator perform?

The calculator is a functional component in the computer that processes data. Data processing mainly includes arithmetic operations on data and logical operations on logical data. Therefore, implementing arithmetic and logical operations on data is the core function of the arithmetic unit.

The basic function of the arithmetic unit is to complete the processing of various data, such as the four arithmetic operations, logical operations such as AND, OR, and negation, arithmetic and logical shift operations, comparing values, changing symbols, and calculating Main memory address, etc.

The registers in the operator are used to temporarily save the data participating in the operation and the intermediate results of the operation. Corresponding components should also be set up in the operator to record the characteristics of an operation result, such as whether it overflows, the sign bit of the result, whether the result is zero, etc.

Operation of arithmetic unit

Adder

One-bit full adder:

Si=Ai⊕Bi⊕CiCi 1=AiBi (Ai⊕Bi)Ci
Delay operation: AND gate, OR gate 1T; XOR gate 3T

Complementary addition of traveling wave carry /Subtractor

What logical operations can the operator perform?

When M=0, each bit of the number B is Add; when M=1, each digit of the B number is XORed by 1 and then combined with the carry 1 of the lowest bit. The result is A (-B) = A-B

fixed-point multiplication

In a fixed-point computer, the operation rule for multiplying two numbers represented by original codes is: the sign bit of the product is obtained by the XOR operation of the sign bits of the two numbers, and the numerical part of the product is two positive The product of numbers multiplied together.

Since serial multipliers have been eliminated, only parallel multipliers will be introduced below. The key to the parallel multiplier is to quickly generate n*n bit products, and then add the bit products to generate n n-1 column sums.

Parallel multiplier:

The first step is to calculate nn bit products in parallel, for which nn AND gates are needed;
The second step is Calculate the column sum using n*(n-1) full adders.

What logical operations can the operator perform?

Indirect complement multiplication operation

Since the data in the computer exists in complement form, complement multiplication operation must be considered Simple interchange operation between complement and original code

Directly find the operation of original code from complement:

The complement of positive number remains unchanged, and the complement of negative number is equal to from After the first true value 1 encountered on the right, 1 becomes 0, and 0 becomes 1 except for the sign bit.

The idea of ​​the complement circuit:

If the sign bit is 0, the data remains unchanged

If the sign bit is 1, the sign bit remains unchanged, and the data bit changes from lowbit (x) Negate everything on the left except the sign bit

What logical operations can the operator perform?

The series-connected OR gates successively accept the numbers from the low-order bits and the last OR gate output. Once a certain low-order number is 1. This time the OR gate output and subsequent OR gate outputs are all 1. The OR gate output of each stage will be ANDed with the enable terminal E. When the enable terminal E=1, it is simplified to be directly controlled by the OR gate output. The output of the AND gate is connected to the XOR gate. When the OR gate is 1 and E=1, the XOR gate performs the negation function. When the enable end is 0, the XOR gates at all levels are all 0 and do not perform the inversion function, that is, all bits remain unchanged. Therefore, the sign bit of the termination number can be enabled.

Indirect complement multiplier, that is, the two numbers are first converted into the original code through the pre-complementor, then passed through the multiplier, and then the result is converted into the complemented code through the post-complementer.

What logical operations can the operator perform?

Direct complement multiplication operation

What logical operations can the operator perform?

According to this characteristic, we Adders whose inputs have negative weights can be designed to construct direct complement parallel multipliers. According to the number of input terminals with negative weights, it can be divided into four types of adders: 0, 1, 2, and 3. The parallel multiplier constructed using a hybrid adder is as shown below:

What logical operations can the operator perform?

For more related knowledge, please visit the FAQ column!

The above is the detailed content of What logical operations can the operator perform?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn