A Arithmetical - Logical Unit (ALU) is the piece of a PC processor (CPU) that does number juggling and rationale tasks on the operands in PC guidance words. In certain processors, the ALU is separated into two units, a number-crunching unit (AU) and a rationale unit (LU). A few processors contain more than one AU - for instance, one for fixed-point activities and another for skimming point tasks. (In PCs gliding point activities are now and again done by a drifting point unit on a different chip called a numeric coprocessor.)
Arithmetical - Logical Unit
Arithmetical - Logical Unit

Commonly, the ALU has direct info and yield access to the processor controller, primary memory (arbitrary access memory or RAM in a PC), and information/yield gadgets. Sources of info and yields stream along an electronic way that is known as a transport. The information comprises of a guidance word (now and then called a machine guidance word) that contains an activity code (now and again called an "operation code"), at least one operands, and now and then an arrangement code. The task code advises the ALU what activity to perform and the operands are utilized in the activity. (For instance, two operands may be included or thought about legitimately.) The organization might be joined with the operation code and tells, for instance, regardless of whether this is a fixed-point or a coasting point guidance. The yield comprises of an outcome that is put in a capacity register and settings that demonstrate whether the activity was performed effectively. (In the event that it isn't, a type of status will be put away in a perpetual spot that is now and then called the machine status word.)

By and large, the ALU incorporates capacity places for info operands, operands that are being included, the gathered outcome (put away in a gatherer), and moved outcomes. The progression of bits and the tasks performed on them in the subunits of the ALU is constrained by gated circuits. The entryways in these circuits are constrained by an arrangement rationale unit that uses a specific calculation or succession for every activity code. In the number juggling unit, increase and division are finished by a progression of including or subtracting and moving tasks. There are a few different ways to speak to negative numbers. In the rationale unit, one of 16 conceivable rationale tasks can be performed -, for example, looking at two operands and recognizing where bits don't coordinate.

The structure of the ALU is clearly a basic piece of the processor and new ways to deal with accelerating guidance taking care of are persistently being created.

Signal


An ALU has an assortment of info and yield nets, which are the electrical conduits used to pass on advanced flag between the ALU and outside hardware. At the point when an ALU is working, outside circuits apply sign to the ALU inputs and, accordingly, the ALU creates and passes on sign to outer hardware by means of its yields.

Date

A fundamental ALU has three parallel information transports comprising of two info operands (An and B) and an outcome yield (Y). Every datum transport is a gathering of sign that passes on one twofold whole number. Regularly, the A, B and Y transport widths (the quantity of sign containing each transport) are indistinguishable and coordinate the local word size of the outer hardware (e.g., the typifying CPU or other processor).

Opcode 


The opcode information is a parallel transport that passes on to the ALU an activity choice code, which is an identified esteem that indicates the ideal number-crunching or rationale task to be performed by the ALU. The opcode measure (its transport width) decides the most extreme number of various activities the ALU can perform; for instance, a four-piece opcode can determine up to sixteen distinctive ALU tasks. For the most part, an ALU opcode isn't equivalent to a machine language opcode, however now and again it might be legitimately encoded as a bit field inside a machine language opcode.


Status 


Output


The status yields are different individual flag that pass on supplemental data about the aftereffect of the current ALU activity. Broadly useful ALUs usually have status flag, for example,

Do, which passes on the convey coming about because of an expansion activity, the acquire coming about because of a subtraction task, or the flood bit coming about because of a paired move activity.

Zero, which demonstrates all bits of Y are rationale zero.

Negative, which demonstrates the consequence of a number-crunching task is negative.

Flood, which demonstrates the consequence of a number-crunching task has surpassed the numeric scope of Y.

Equality, which demonstrates whether an even or odd number of bits in Y are rationale one.

Toward the finish of each ALU activity, the status yield sign are typically put away in outside registers to make them accessible for future ALU tasks (e.g., to execute numerous exactness number-crunching) or for controlling restrictive expanding. The accumulation of bit enlists that store the status yields are regularly treated as a solitary, multi-bit register, which is alluded to as the "status register" or "condition code register".

Input


The status data sources enable extra data to be made accessible to the ALU when playing out a task. Normally, this is a solitary "convey in" bit that is the put away do from a past ALU activity.
أحدث أقدم